Skip to content

LLVM ERROR: Module has aliases, which NVPTX does not support. #13

@ahendriksen

Description

@ahendriksen

Hi,

Thanks for creating this great package! I have tried to get rust-ptx-builder to work, but I have not yet succeeded. I get the error 'LLVM ERROR: Module has aliases, which NVPTX does not support.'. To make sure that I was not an error on my part, I have tried to build one of the example projects in rust-ptx-support.

This is what I get:

$ cargo build
   Compiling cuda-println v0.1.0 (/export/scratch1/hendriks/projects/rustacuda_example/rust-ptx-support/examples/cuda-println)
error: failed to run custom build command for `cuda-println v0.1.0 (/export/scratch1/hendriks/projects/rustacuda_example/rust-ptx-support/examples/cuda-println)`
process didn't exit successfully: `/export/scratch1/hendriks/projects/rustacuda_example/rust-ptx-support/target/debug/build/cuda-println-0022aa50cae5c930/build-script-build` (exit code: 1)
--- stderr
[PTX] Unable to build a PTX crate!
[PTX]    Compiling cuda-println v0.1.0 (/export/scratch1/hendriks/projects/rustacuda_example/rust-ptx-support/examples/cuda-println)
[PTX] error: linking with `ptx-linker` failed: exit code: 1
[PTX]   |
[PTX]   = note: "ptx-linker" "-L" "/ufs/hendriks/.xargo/lib/rustlib/nvptx64-nvidia-cuda/lib" "/tmp/ptx-builder-0.5/cuda_println/d623bafb1eb4deca/nvptx64-nvidia-cuda/release/deps/cuda_println-01803fec47121bc1.cuda_println.2jagi3my-cgu.0.rcgu.o" "/tmp/ptx-builder-0.5/cuda_println/d623bafb1eb4deca/nvptx64-nvidia-cuda/release/deps/cuda_println-01803fec47121bc1.cuda_println.2jagi3my-cgu.1.rcgu.o" "-o" "/tmp/ptx-builder-0.5/cuda_println/d623bafb1eb4deca/nvptx64-nvidia-cuda/release/deps/cuda_println-01803fec47121bc1.ptx" "/tmp/ptx-builder-0.5/cuda_println/d623bafb1eb4deca/nvptx64-nvidia-cuda/release/deps/cuda_println-01803fec47121bc1.1w5kxn6gnyc7w18l.rcgu.o" "-O1" "-L" "/tmp/ptx-builder-0.5/cuda_println/d623bafb1eb4deca/nvptx64-nvidia-cuda/release/deps" "-L" "/tmp/ptx-builder-0.5/cuda_println/d623bafb1eb4deca/release/deps" "-L" "/ufs/hendriks/.xargo/lib/rustlib/nvptx64-nvidia-cuda/lib" "--start-group" "-Bstatic" "--whole-archive" "/tmp/rustchm5YG8/libptx_support-bac6370d784080de.rlib" "--no-whole-archive" "--whole-archive" "/tmp/rustchm5YG8/libcore-5040dc495f9f5fc0.rlib" "--no-whole-archive" "--end-group" "/tmp/rustchm5YG8/libcompiler_builtins-44064ef211638321.rlib" "-shared" "-Bdynamic"
[PTX]   = note:  [INFO] Going to link 3 bitcode modules and 3 rlibs...
[PTX]                   
[PTX]            [INFO] Linking with Link Time Optimisation
[PTX]           LLVM ERROR: Module has aliases, which NVPTX does not support.
[PTX]           
[PTX] 
[PTX] error: aborting due to previous error
[PTX] 
[PTX] error: Could not compile `cuda-println`.
[PTX] 

Unfortunately, I cannot seem to get more verbose output than this. I have installed xargo and ptx-linker. I have CUDA_LIBRARY_PATH set correctly. I do not have LLVM installed locally.

I tried with the following versions of rustc:

  • rustc 1.32.0-nightly (14997d56a 2018-12-05) failed: same reason
  • rustc 1.32.0-nightly (b3af09205 2018-12-04) failed: same reason
  • rustc 1.32.0-nightly (5aff30734 2018-11-19) failed: different reason - "note: Unable to find LLVM shared lib in possible locations:"
  • rustc 1.32.0-nightly (653da4fd0 2018-11-08) failed: different reason - "note: Unable to find LLVM shared lib in possible locations:"
  • rustc 1.32.0-nightly (36a50c29f 2018-11-09) failed: different reason - "note: Unable to find LLVM shared lib in possible locations:"
  • rustc 1.31.0-nightly (de9666f12 2018-10-31) failed: different reason - "note: Unable to find LLVM shared lib in possible locations:"

I am not sure which of these errors occurs earlier in the compilation process, the module alias error, or the LLVM shared lib error.

If there is anything I can do to make this issue more specific, please let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions