llvm-sys does not compile #4

Closed
opened 2021-07-24 09:22:28 +08:00 by sb10q · 4 comments
Owner

Using the supplied shell.nix environment

> cargo test
[...]
   Compiling llvm-sys v100.2.1
error: No suitable version of LLVM was found system-wide or pointed
       to by LLVM_SYS_100_PREFIX.

       Consider using `llvmenv` to compile an appropriate copy of LLVM, and
       refer to the llvm-sys documentation for more information.

       llvm-sys: https://crates.io/crates/llvm-sys
       llvmenv: https://crates.io/crates/llvmenv
   --> /home/sb/.cargo/registry/src/github.com-1ecc6299db9ec823/llvm-sys-100.2.1/src/lib.rs:483:1
    |
483 | / std::compile_error!(concat!(
484 | |       "No suitable version of LLVM was found system-wide or pointed
485 | |        to by LLVM_SYS_", env!("CARGO_PKG_VERSION_MAJOR"), "_PREFIX.
486 | |
...   |
490 | |        llvm-sys: https://crates.io/crates/llvm-sys
491 | |        llvmenv: https://crates.io/crates/llvmenv"));
    | |____________________________________________________^

Using the supplied shell.nix environment ```text > cargo test [...] Compiling llvm-sys v100.2.1 error: No suitable version of LLVM was found system-wide or pointed to by LLVM_SYS_100_PREFIX. Consider using `llvmenv` to compile an appropriate copy of LLVM, and refer to the llvm-sys documentation for more information. llvm-sys: https://crates.io/crates/llvm-sys llvmenv: https://crates.io/crates/llvmenv --> /home/sb/.cargo/registry/src/github.com-1ecc6299db9ec823/llvm-sys-100.2.1/src/lib.rs:483:1 | 483 | / std::compile_error!(concat!( 484 | | "No suitable version of LLVM was found system-wide or pointed 485 | | to by LLVM_SYS_", env!("CARGO_PKG_VERSION_MAJOR"), "_PREFIX. 486 | | ... | 490 | | llvm-sys: https://crates.io/crates/llvm-sys 491 | | llvmenv: https://crates.io/crates/llvmenv")); | |____________________________________________________^ ```
sb10q closed this issue 2021-07-24 09:31:43 +08:00
Contributor

Interesting, running nix-shell --pure with the previous shell.nix would work. Is this due to nix channel version?

https://gitlab.com/taricorp/llvm-sys.rs/-/blob/master/build.rs#L69-122

I think they are searching the path for llvm-config, which should be present if we have llvm in our dependencies.

Interesting, running `nix-shell --pure` with the previous `shell.nix` would work. Is this due to nix channel version? https://gitlab.com/taricorp/llvm-sys.rs/-/blob/master/build.rs#L69-122 I think they are searching the path for `llvm-config`, which should be present if we have `llvm` in our dependencies.
Author
Owner

It works on the master branch indeed, but it seems you updated some crates in the hm-inference branch.

It works on the master branch indeed, but it seems you updated some crates in the hm-inference branch.
Contributor

It works on the master branch indeed, but it seems you updated some crates in the hm-inference branch.

I just cloned the repository on zeus, removed the LLVM_SYS_100_PREFIX, and did a nix-shell --pure --run "cd nac3core && cargo test". It works fine. Weird problem... Anyway this is not a big issue.

> It works on the master branch indeed, but it seems you updated some crates in the hm-inference branch. I just cloned the repository on zeus, removed the `LLVM_SYS_100_PREFIX`, and did a `nix-shell --pure --run "cd nac3core && cargo test"`. It works fine. Weird problem... Anyway this is not a big issue.
Author
Owner

Can't reproduce it either with the latest nixpkgs 21.05 channel.

Can't reproduce it either with the latest nixpkgs 21.05 channel.
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#4
No description provided.