llvm icon indicating copy to clipboard operation
llvm copied to clipboard

Compiling with Spack Installed GCC Errors

Open kaanolgu opened this issue 1 year ago • 1 comments

Describe the bug

I am trying to install with spack provided GCC, followed this solution here for external CUDA support but having similar problem for non default located GCC installation.

It's a long line of errors related with GLIBCXX like :

/bin/ld: /workspace/tools/llvm/build/bin/../lib/libsycl.so: undefined reference to std::filesystem::__cxx11::directory_iterator::directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)@GLIBCXX_3.4.26'

Seems like something is not linking properly with my spack load [email protected] is there any other lines I need to set like the CUDA_LIB_PATH for non default GCC ?

Because if I use the system GCC with module load everything works fine

To reproduce

git clone https://github.com/intel/llvm.git
spack load [email protected]
CUDA_LIB_PATH=$(spack location -i cuda%$COMPILER@${COMPVER})/lib64/stubs CC=gcc CXX=g++ python ${DPCPP_HOME}/llvm/buildbot/configure.py --cuda --cmake-opt="-DCUDA_TOOLKIT_ROOT_DIR=$(spack location -i cuda%$COMPILER@${COMPVER})" -t Release
CUDA_LIB_PATH=$(spack location -i cuda%$COMPILER@${COMPVER})/lib64/stubs CC=gcc CXX=g++ python ${DPCPP_HOME}/llvm/buildbot/compile.py -j8

Environment

  • OS: Linux
  • Target device and vendor: Nvidia GPU with Intel LLVM Clang compiler
  • DPC++ version: fda7dc722161 ( 2024.2.0) also sycl branch gives the same error
  • Dependencies version: cuda 12.6

Additional context

No response

kaanolgu avatar Oct 13 '24 22:10 kaanolgu

@kaanolgu, I don't think this is a bug in our build system since you're able to get it working using your system's GCC.

Could you please try comparing the LD_LIBRARY_PATH from your system's environment to the one from the Spack-configured environment? I don't use Spack but I've encountered similar issues when my LD_LIBRARY_PATH or PATH variables were misconfigured.

0x12CC avatar Oct 16 '24 19:10 0x12CC

Hello @kaanolgu, were you able to resolve the issue with help from @0x12CC above (or using other method)?

dm-vodopyanov avatar Jan 08 '25 14:01 dm-vodopyanov

Hi @dm-vodopyanov, It didn't work for me so instead of using daily builds on this system I used spack install intel-oneapi-compilers+nvidia and applied the codeplay plugin (couldn't test the daily builds), but used the feature testing on a Ubuntu based VM where I didn't encounter this issue.

kaanolgu avatar Jan 08 '25 23:01 kaanolgu

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be automatically closed in 30 days.

github-actions[bot] avatar Jul 08 '25 02:07 github-actions[bot]

This issue was closed because it has been stalled for 30 days with no activity. Please, re-open if the issue still exists.

github-actions[bot] avatar Aug 07 '25 02:08 github-actions[bot]