Skip to content
This repository has been archived by the owner on Jan 26, 2024. It is now read-only.

Failed to embed PCH #57

Open
pvelesko opened this issue Jan 3, 2023 · 2 comments
Open

Failed to embed PCH #57

pvelesko opened this issue Jan 3, 2023 · 2 comments

Comments

@pvelesko
Copy link

pvelesko commented Jan 3, 2023

Trying to build HIP using a fresh install of Ubuntu 22.04

Following this guide: https://docs.amd.com/en-US/bundle/HIP-Programming-Guide-v5.0/page/Installing_HIP.html

rocm-5.4.x

pvelesko@cupcake:~/HIPAMD/hipamd$ cd "$HIPAMD_DIR"
mkdir -p build; cd build
cmake -DHIP_COMMON_DIR=$HIP_DIR -DAMD_OPENCL_PATH=$OPENCL_DIR -DROCCLR_PATH=$ROCCLR_DIR -DCMAKE_PREFIX_PATH="/opt/rocm/" -DCMAKE_INSTALL_PREFIX=$PWD/install ..
make -j$(nproc)
sudo make install
-- HIPCC_BIN_DIR found at
-- HIP_COMMON_DIR found at /home/pvelesko/HIPAMD/hip
-- Using CPACK_DEBIAN_PACKAGE_RELEASE local
-- CPACK_RPM_PACKAGE_RELEASE: local
-- HIP Platform: amd
-- HIP Runtime: rocclr
-- HIP Compiler: clang
-- ROCM Installation path(ROCM_PATH): /opt/rocm
-- HIP will be installed in: /home/pvelesko/HIPAMD/hipamd/build/install
-- Could NOT find NUMA (missing: NUMA_LIBRARIES NUMA_INCLUDE_DIR)
-- Could NOT find LibXml2 (missing: LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR)
'sh' '-c' '/home/pvelesko/HIPAMD/hipamd/src/hip_embed_pch.sh /home/pvelesko/HIPAMD/hip/include /home/pvelesko/HIPAMD/hipamd/build/include /home/pvelesko/HIPAMD/hipamd/include /opt/rocm/llvm/lib/cmake/llvm/../../..'
+ /opt/rocm/llvm/lib/cmake/llvm/../../../bin/clang -O3 --rocm-path=/home/pvelesko/HIPAMD/hipamd/build/include/.. -std=c++17 -nogpulib -isystem /home/pvelesko/HIPAMD/hipamd/build/include -isystem /home/pvelesko/HIPAMD/hip/include -isystem /home/pvelesko/HIPAMD/hipamd/include --cuda-device-only --cuda-gpu-arch=gfx1030 -x hip /tmp/hip_pch.146539/hip_pch.h -E
In file included from /tmp/hip_pch.146539/hip_pch.h:1:
/home/pvelesko/HIPAMD/hip/include/hip/hip_runtime.h:54:10: fatal error: 'thread' file not found
#include <thread>
         ^~~~~~~~
1 error generated when compiling for gfx1030.
CMake Error at src/CMakeLists.txt:186 (message):
  Failed to embed PCH
@pvelesko
Copy link
Author

pvelesko commented Jan 3, 2023

Fixed by installing g++12 and making my /usr/bin/g++ soft link to /usr/bin/g++-12 but I think there should be a check for this.

@pvelesko
Copy link
Author

pvelesko commented Jan 4, 2023

This issue was also observed on another system when trying to compile 5.4.x with clang-14

'sh' '-c' '/home/pvelesko/space/HIPAMD/hipamd/src/hip_embed_pch.sh /gpfs/jlse-fs0/users/pvelesko/HIPAMD/hip/include /home/pvelesko/space/HIPAMD/build/include /home/pvelesko/space/HIPAMD/hipamd/include /home/pvelesko/space/install/clang/clang14/clang14-spirv-omp/lib/cmake/llvm/../../..'
+ /home/pvelesko/space/install/clang/clang14/clang14-spirv-omp/lib/cmake/llvm/../../../bin/clang -O3 --rocm-path=/home/pvelesko/space/HIPAMD/build/include/.. -std=c++17 -nogpulib -isystem /home/pvelesko/space/HIPAMD/build/include -isystem /gpfs/jlse-fs0/users/pvelesko/HIPAMD/hip/include -isystem /home/pvelesko/space/HIPAMD/hipamd/include --cuda-device-only --cuda-gpu-arch=gfx1030 -x hip /tmp/hip_pch.123898/hip_pch.h -E
clang (LLVM option parsing): Unknown command line argument '-amdgpu-internalize-symbols'.  Try: 'clang (LLVM option parsing) --help'
clang (LLVM option parsing): Did you mean '--large-interval-size-threshold'?
CMake Error at src/CMakeLists.txt:186 (message):
  Failed to embed PCH


-- Configuring incomplete, errors occurred!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant