AfZheng126 / MORA

MetagenOmic read Re-Assigner and abundance quantifier
MIT License
17 stars 1 forks source link

Rust compilation issue #2

Closed sternp closed 1 year ago

sternp commented 1 year ago

Hi - I'm having trouble compiling MORA as it seems like there might be a missing library? Can you have a look please?

mamba create -n mora rust
mamba install cmake

cargo build --release
   Compiling libc v0.2.134
   Compiling autocfg v1.1.0
   Compiling pkg-config v0.3.27
   Compiling cfg-if v1.0.0
   Compiling proc-macro2 v1.0.46
   Compiling quote v1.0.21
   Compiling unicode-ident v1.0.4
   Compiling libm v0.2.5
   Compiling syn v1.0.102
   Compiling crossbeam-utils v0.8.12
   Compiling memchr v2.5.0
   Compiling semver v0.1.20
   Compiling rustversion v1.0.12
   Compiling tinyvec_macros v0.1.1
   Compiling quick-error v1.2.3
   Compiling rayon-core v1.9.3
   Compiling thiserror v1.0.37
   Compiling ppv-lite86 v0.2.16
   Compiling glob v0.3.1
   Compiling matrixmultiply v0.1.15
   Compiling scopeguard v1.1.0
   Compiling serde v1.0.145
   Compiling rawpointer v0.1.0
   Compiling heck v0.4.1
   Compiling unicode-bidi v0.3.13
   Compiling percent-encoding v2.2.0
   Compiling regex-syntax v0.7.1
   Compiling hashbrown v0.12.3
   Compiling os_str_bytes v6.3.0
   Compiling lazy_static v1.4.0
   Compiling cfg-if v0.1.10
   Compiling bitflags v1.3.2
   Compiling termcolor v1.1.3
   Compiling textwrap v0.15.1
   Compiling linear-map v1.2.0
   Compiling strsim v0.10.0
   Compiling ieee754 v0.2.6
   Compiling custom_derive v0.1.7
   Compiling either v1.8.0
   Compiling byteorder v1.4.3
   Compiling tinyvec v1.6.0
   Compiling fs-utils v1.1.4
   Compiling form_urlencoded v1.1.0
   Compiling rustc_version v0.1.7
   Compiling clap_lex v0.2.4
   Compiling num-traits v0.2.15
   Compiling memoffset v0.6.5
   Compiling num-integer v0.1.45
   Compiling crossbeam-epoch v0.9.11
   Compiling num-iter v0.1.43
   Compiling indexmap v1.9.1
   Compiling rayon v1.5.3
   Compiling newtype_derive v0.1.6
   Compiling unicode-normalization v0.1.22
   Compiling idna v0.3.0
   Compiling crossbeam-channel v0.5.6
   Compiling url v2.3.1
   Compiling aho-corasick v1.0.1
   Compiling jobserver v0.1.26
   Compiling getrandom v0.2.7
   Compiling rand v0.4.6
   Compiling dirs-sys v0.3.7
   Compiling num_cpus v1.13.1
   Compiling atty v0.2.14
   Compiling clap v3.2.22
   Compiling directories v2.0.2
   Compiling cc v1.0.79
   Compiling rand_core v0.6.4
   Compiling rand_chacha v0.3.1
   Compiling crossbeam-deque v0.8.2
   Compiling openssl-src v111.25.3+1.1.1t
   Compiling cmake v0.1.50
   Compiling rand v0.8.5
   Compiling openssl-sys v0.9.87
   Compiling bzip2-sys v0.1.11+1.0.8
   Compiling curl-sys v0.4.61+curl-8.0.1
   Compiling lzma-sys v0.1.20
   Compiling hts-sys v2.0.3
   Compiling rand v0.3.23
   Compiling libz-sys v1.1.9
   Compiling regex v1.8.1
   Compiling toml v0.5.9
   Compiling mathru v0.13.0
   Compiling rand_distr v0.4.3
   Compiling thiserror-impl v1.0.37
   Compiling derive-new v0.5.9
   Compiling strum_macros v0.24.3
   Compiling num v0.1.42
   Compiling confy v0.4.0
   Compiling rulinalg v0.3.7
   Compiling rusty-machine v0.5.4
   Compiling bio-types v0.13.0
   Compiling rust-htslib v0.42.0
   Compiling mora v0.1.0 (/mnt/hpccs01/work/microbiome/users/sternesp/MORA)
error: linking with `/mnt/hpccs01/work/microbiome/conda/envs/mora/bin/x86_64-conda-linux-gnu-cc` failed: exit status: 1
  |
  = note: LC_ALL="C" PATH="/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/bin:/mnt/hpccs01/work/microbiome/conda/envs/mora/bin:/mnt/hpccs01/work/microbiome/sw/hpc_scripts/bin:/mnt/hpccs01/work/microbiome/conda/condabin:/opt/clmgr/sbin:/opt/clmgr/bin:/opt/sgi/sbin:/opt/sgi/bin:/mnt/hpccs01/work/microbiome/sw/hpc_scripts/bin:/home/sternesp/bin:/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games:/opt/c3/bin:/opt/pbs/bin:/sbin:/bin" VSLANG="1033" "/mnt/hpccs01/work/microbiome/conda/envs/mora/bin/x86_64-conda-linux-gnu-cc" "-m64" "/tmp/rustcfLDsrZ/symbols.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.0.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.1.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.10.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.11.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.12.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.13.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.14.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.15.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.2.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.3.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.4.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.5.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.6.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.7.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.8.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.mora.6e1aff7f-cgu.9.rcgu.o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40.2r1vc5lohf73i5uo.rcgu.o" "-Wl,--as-needed" "-L" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps" "-L" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/build/hts-sys-481339d63e045130/out" "-L" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/build/bzip2-sys-21cede83f263a608/out/lib" "-L" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/build/curl-sys-3861c782392c7e1f/out/build" "-L" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/build/libz-sys-8dddf66b46f42804/out/lib" "-L" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/build/openssl-sys-1ebabb6426cd294b/out/openssl-build/install/lib" "-L" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/build/lzma-sys-5ecc49222b27b776/out" "-L" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/librand_distr-264dc52b86a3e4ee.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libnum_traits-a2a2d835a483ea92.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/librand-8fe593ae1e8a15fc.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/librand_chacha-1f6f1565fc50ede2.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libppv_lite86-4b760262d5302e66.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/librand_core-6f7179a19b63aa00.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libgetrandom-ade461ecdbaf7228.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/librust_htslib-fca9f67027a54f81.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libhts_sys-c5301a8cec918ee6.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/liblzma_sys-995fc7c705dbc95f.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libcurl_sys-068b20b91cd1943e.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libopenssl_sys-1c282eb058167e89.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/liblibz_sys-868cdd162a3eaff4.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libbzip2_sys-5f7703dd5ddd703d.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libieee754-e228d3b8334973d1.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/liburl-a3762e5631a807b3.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libidna-d20442cba0b68cb5.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libunicode_normalization-edfa44779162ef13.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libtinyvec-6c603ee2ec640e26.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libtinyvec_macros-54f6d059279fb3ea.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libunicode_bidi-c8c0a00fbcb78a86.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libform_urlencoded-ce47cb9bc81afee9.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libpercent_encoding-86ff0529650ae623.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libbio_types-97c957e71ae0ee3f.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libthiserror-104079e241efbaab.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libbyteorder-e76e6a68a7c9ca04.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libregex-f6d9af43a89d1bcc.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libaho_corasick-416f011993128f69.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libmemchr-87d9c2fcea594ec6.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libregex_syntax-5ef1494a76c597b7.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/liblinear_map-9cea53c9c125b3f6.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/liblazy_static-db18e9ec431bf4c5.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libnewtype_derive-9f87cc3750196e5e.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libcustom_derive-daa8f56e468dad9a.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/librayon-aa95348d8d626535.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/librayon_core-018f6aff72e84279.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libnum_cpus-9635de8275f177dc.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libcrossbeam_deque-6506f37c1df95e21.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libcrossbeam_epoch-331ad63b88acdd22.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libmemoffset-5418d9f94d80d8b9.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libscopeguard-2631b368c393d54d.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libcrossbeam_channel-755c79ddedfd75f5.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libcrossbeam_utils-5681459981d2f917.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libcfg_if-6f550b5f918c5df3.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libeither-5eeda953d9a01ea6.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libclap-9449c02929f0b2d3.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libatty-ea6746a668af8512.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/liblibc-a9bbef7d773e1a88.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libstrsim-fb863042cfbd6f5e.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libtermcolor-041eb3c61cc797e8.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libtextwrap-ae5cabeea81be21a.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libclap_lex-ec9abbf1b3deb0aa.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libos_str_bytes-5baade4d9aeea72e.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libindexmap-9400de645c3f63a4.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libhashbrown-a73d7b159ad9a2bc.rlib" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/libbitflags-1d7a8887f2d6908a.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-89bc084783fdc439.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-8bee4b287d4367c1.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-d61707aed80694c0.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-d85366256f22345b.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-96069b86b8a8cae9.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-d19d53abf68dfa6c.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-787cbccd19d64ac6.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-b3837a36b830e0d0.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-e3deb0e7e3f04966.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-dabbb79c9815def4.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-305b01f34c9409f2.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-f833521df6074e73.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-9ac333113350d171.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-1c126114322d0eee.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-bad9164fdeeecf92.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-f9374b1e480fa681.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-207f06e41d9603af.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-7e2768e66e984e85.rlib" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-957b4aff41f8cd46.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "/mnt/hpccs01/work/microbiome/conda/envs/mora/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/mnt/hpccs01/work/microbiome/users/sternesp/MORA/target/release/deps/mora-380c12fa5132df40" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-nodefaultlibs"
  = 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/release/deps/libopenssl_sys-1c282eb058167e89.rlib(getenv.o): in function `ossl_safe_getenv':
          getenv.c:(.text.ossl_safe_getenv+0x1): 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
sternp commented 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
AfZheng126 commented 1 year ago

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.

sternp commented 1 year ago

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

AfZheng126 commented 1 year ago

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.

sternp commented 1 year ago

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.

bluenote-1577 commented 1 year ago

@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.

sternp commented 1 year ago

@bluenote-1577

Thanks! It compiles on our server now using Rust 1.65