jhuber6 added a comment.

In D141861#4060028 <https://reviews.llvm.org/D141861#4060028>, @srj wrote:

> This change appears to have broken the build when crosscompiling to x86-32 on 
> a Linux x86-64 system; on the Halide buildbots, we now fail at link time with
>
>   FAILED: bin/nvptx-arch 
>   : && /usr/bin/g++-7  -m32 -Wno-psabi -fPIC -fno-semantic-interposition 
> -fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra 
> -Wno-unused-parameter -Wwrite-strings -Wcast-qual 
> -Wno-missing-field-initializers -pedantic -Wno-long-long 
> -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-noexcept-type 
> -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation 
> -fdiagnostics-color -ffunction-sections -fdata-sections -fno-common 
> -Woverloaded-virtual -fno-strict-aliasing -O3 -DNDEBUG 
> -Wl,-rpath-link,/home/halidenightly/build_bot/worker/llvm-16-x86-32-linux/llvm-build/./lib
>   -Wl,--gc-sections 
> tools/clang/tools/nvptx-arch/CMakeFiles/nvptx-arch.dir/NVPTXArch.cpp.o -o 
> bin/nvptx-arch  -Wl,-rpath,"\$ORIGIN/../lib"  lib/libLLVMSupport.a  -lpthread 
>  -lrt  -ldl  -lpthread  -lm  lib/libLLVMDemangle.a && :
>   /usr/bin/ld: 
> tools/clang/tools/nvptx-arch/CMakeFiles/nvptx-arch.dir/NVPTXArch.cpp.o: in 
> function `handleError(cudaError_enum)':
>   NVPTXArch.cpp:(.text._ZL11handleError14cudaError_enum+0x2b): undefined 
> reference to `cuGetErrorString'
>   /usr/bin/ld: 
> tools/clang/tools/nvptx-arch/CMakeFiles/nvptx-arch.dir/NVPTXArch.cpp.o: in 
> function `main':
>   NVPTXArch.cpp:(.text.startup.main+0xcf): undefined reference to `cuInit'
>   /usr/bin/ld: NVPTXArch.cpp:(.text.startup.main+0xf9): undefined reference 
> to `cuDeviceGetCount'
>   /usr/bin/ld: NVPTXArch.cpp:(.text.startup.main+0x11e): undefined reference 
> to `cuDeviceGet'
>   /usr/bin/ld: NVPTXArch.cpp:(.text.startup.main+0x131): undefined reference 
> to `cuDeviceGetAttribute'
>   /usr/bin/ld: NVPTXArch.cpp:(.text.startup.main+0x146): undefined reference 
> to `cuDeviceGetAttribute'
>   collect2: error: ld returned 1 exit status

I'm guessing here it's finding the `cuda.h` header but not the libraries? Maybe 
we should determine this via the CMake and add a definition instead of 
`has_include`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141861/new/

https://reviews.llvm.org/D141861

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to