Closed sternp closed 1 year ago
Weirdly, MORA compiled correctly once, but now is running into same issue as above. Something regarding secure_getenv
? Do you have any recommendation on how to fix this?
= note: /mnt/hpccs01/work/microbiome/conda/envs/mora/bin/../lib/gcc/x86_64-conda-linux-gnu/12.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/debug/deps/libopenssl_sys-caa122cff83dce1a.rlib(getenv.o): in function `ossl_safe_getenv':
/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/debug/build/openssl-sys-8e2289bb94829a5e/out/openssl-build/build/src/crypto/getenv.c:22: undefined reference to `secure_getenv'
collect2: error: ld returned 1 exit status
= note: some `extern` functions couldn't be found; some native libraries may need to be installed or have their path specified
= note: use the `-l` flag to specify native libraries to link
= note: use the `cargo:rustc-link-lib` directive to specify the native libraries to link with Cargo (see https://doc.rust-lang.org/cargo/reference/build-scripts.html#cargorustc-link-libkindname)
error: could not compile `mora` due to previous error
I personally don't have much experience with using mamba to install repositories from Github. When I try to use Mora, I directly use git clone to download the repository and it works for me. A quick search with secure_getenv seems to show that it is related to libc paths, but I am not sure how to solve this issue. Sorry I couldn't be more helpful with mamba.
Thanks for your reply. Using a non-conda/mamba solution gives this:
error[E0599]: the method `join` exists for struct `Vec<&OsStr>`, but its trait bounds were not satisfied
--> /home/sternesp/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.25.3+1.1.1t/src/lib.rs:336:55
|
336 | ar.get_args().collect::<Vec<_>>().join(OsStr::new(" ")),
| ^^^^ method cannot be called on `Vec<&OsStr>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`[&OsStr]: Join<_>`
error[E0599]: the method `join` exists for struct `Vec<&OsStr>`, but its trait bounds were not satisfied
--> /home/sternesp/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.25.3+1.1.1t/src/lib.rs:343:42
|
343 | configure.env("RANLIB", args.join(OsStr::new(" ")));
| ^^^^ method cannot be called on `Vec<&OsStr>` due to unsatisfied trait bounds
|
= note: the following trait bounds were not satisfied:
`[&OsStr]: Join<_>`
For more information about this error, try `rustc --explain E0599`.
error: could not compile `openssl-src` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed
Is there any chance you can compile it into a docker image or similiar? Presumably other people will begin running into similiar issues
I tested Mora on a Linux system and everything seems to work fine. The error might be to how Rust views string on different operating systems as seen here: https://doc.rust-lang.org/std/ffi/struct.OsString.html. Since the error seems to be from the directory for cargo, I am not sure how to solve this issue. Sorry about this.
Okay thanks.
I couldn't get MORA is compile on our server after a lot of messing around with glibc.
I eventually was able to compile MORA within a singularity container on my local PC. Works fine on the server now.
@sternp Catching up on this thread now:
Thanks for your reply. Using a non-conda/mamba solution gives this:
error[E0599]: the method `join` exists for struct `Vec<&OsStr>`, but its trait bounds were not satisfied --> /home/sternesp/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.25.3+1.1.1t/src/lib.rs:336:55 | 336 | ar.get_args().collect::<Vec<_>>().join(OsStr::new(" ")), | ^^^^ method cannot be called on `Vec<&OsStr>` due to unsatisfied trait bounds | = note: the following trait bounds were not satisfied: `[&OsStr]: Join<_>` error[E0599]: the method `join` exists for struct `Vec<&OsStr>`, but its trait bounds were not satisfied --> /home/sternesp/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-src-111.25.3+1.1.1t/src/lib.rs:343:42 | 343 | configure.env("RANLIB", args.join(OsStr::new(" "))); | ^^^^ method cannot be called on `Vec<&OsStr>` due to unsatisfied trait bounds | = note: the following trait bounds were not satisfied: `[&OsStr]: Join<_>` For more information about this error, try `rustc --explain E0599`. error: could not compile `openssl-src` due to 2 previous errors warning: build failed, waiting for other jobs to finish... error: build failed
Is there any chance you can compile it into a docker image or similiar? Presumably other people will begin running into similiar issues
This looks like a rust versioning issue to me. MORA requires at least rust version 1.60 (and possibly higher), I believe, according to a simple check on the dependencies. It works fine on the latest version of rust for me (1.70).
The first issue you reported looks like a gcc or perhaps a cmake issue? cmake turns out to be a requirement of MORA. Nevertheless, the culprit is the openssl dependency, which we don't actually need.
@AfZheng126 I've updated the Cargo.toml in MORA's repository so that rust-htslib = { version = "*", default-features = false }
is set. This turns off additional unneeded dependecies, including openssl.
@bluenote-1577
Thanks! It compiles on our server now using Rust 1.65
Hi - I'm having trouble compiling MORA as it seems like there might be a missing library? Can you have a look please?