cross-rs / cross

“Zero setup” cross compilation and “cross testing” of Rust crates
Apache License 2.0
6.82k stars 381 forks source link

ld: unknown option: --version-script #639

Open tbillington opened 2 years ago

tbillington commented 2 years ago

Hi, I'm hitting a linker error trying to compile for linux from mac (m1/arm if that's important). I can test different things if you have ideas but not sure where to start with linker errors.

> cross build -v --bin sm --target x86_64-unknown-linux-gnu
+ "cargo" "build" "-v" "--bin" "sm" "--target" "x86_64-unknown-linux-gnu"
       Fresh unicode-xid v0.2.2
       Fresh version_check v0.9.4
       Fresh itoa v1.0.1
       Fresh bytes v1.1.0
       Fresh pin-project-lite v0.2.8
       Fresh smallvec v1.8.0
       Fresh fnv v1.0.7
       Fresh once_cell v1.9.0
       Fresh scopeguard v1.1.0
       Fresh futures-sink v0.3.19
       Fresh pin-utils v0.1.0
       Fresh matches v0.1.9
       Fresh tinyvec_macros v0.1.0
       Fresh cfg-if v1.0.0
       Fresh percent-encoding v2.1.0
       Fresh slab v0.4.5
       Fresh bumpalo v3.9.1
       Fresh lazy_static v1.4.0
       Fresh mime v0.3.16
       Fresh opaque-debug v0.3.0
       Fresh cpufeatures v0.2.1
       Fresh unicode-bidi v0.3.7
       Fresh ppv-lite86 v0.2.16
       Fresh base64 v0.13.0
       Fresh ryu v1.0.9
       Fresh regex-syntax v0.6.25
       Fresh httpdate v1.0.2
       Fresh tower-service v0.3.1
       Fresh try-lock v0.2.3
       Fresh byteorder v1.4.3
       Fresh termcolor v1.1.2
       Fresh Inflector v0.11.4
       Fresh utf-8 v0.7.6
       Fresh bitflags v1.3.2
       Fresh tower-layer v0.3.1
       Fresh either v1.6.1
       Fresh http-range-header v0.3.0
       Fresh num_threads v0.1.3
       Fresh itoa v0.4.8
       Fresh ansi_term v0.12.1
       Fresh sync_wrapper v0.1.1
       Fresh roots v0.0.6
       Fresh matchit v0.4.4
       Fresh instant v0.1.12
       Fresh http v0.2.6
       Fresh lock_api v0.4.5
       Fresh tracing-core v0.1.21
       Fresh sharded-slab v0.1.4
       Fresh thread_local v1.1.4
       Fresh tinyvec v1.5.1
       Fresh form_urlencoded v1.0.1
       Fresh regex-automata v0.1.10
       Fresh regex v1.5.4
       Fresh itertools v0.10.3
       Fresh proc-macro2 v1.0.36
       Fresh libc v0.2.114
       Fresh futures-core v0.3.19
       Fresh typenum v1.15.0
       Fresh futures-task v0.3.19
       Fresh memchr v2.4.1
       Fresh http-body v0.4.4
       Fresh headers-core v0.2.0
       Fresh log v0.4.14
       Fresh wasm-bindgen-shared v0.2.79
       Fresh unicode-normalization v0.1.19
       Fresh httparse v1.5.1
       Fresh quote v1.0.15
       Fresh parking_lot_core v0.8.5
       Fresh signal-hook-registry v1.4.0
       Fresh num_cpus v1.13.1
       Fresh mio v0.7.14
       Fresh getrandom v0.2.4
       Fresh futures-channel v0.3.19
       Fresh socket2 v0.4.4
       Fresh want v0.3.0
       Fresh matchers v0.1.0
       Fresh tracing-log v0.1.2
       Fresh flo_curves v0.6.0
       Fresh generic-array v0.14.5
       Fresh futures-util v0.3.19
       Fresh idna v0.2.3
       Fresh unicase v2.6.0
       Fresh syn v1.0.86
       Fresh parking_lot v0.11.2
       Fresh rand_core v0.6.3
       Fresh tokio-macros v1.7.0
       Fresh tracing-attributes v0.1.18
       Fresh serde_derive v1.0.136
       Fresh thiserror-impl v1.0.30
       Fresh wasm-bindgen-backend v0.2.79
       Fresh digest v0.9.0
       Fresh block-buffer v0.9.0
       Fresh pin-project-internal v1.0.10
       Fresh url v2.2.2
       Fresh async-trait v0.1.52
       Fresh ts-rs-macros v6.1.2
       Fresh tokio v1.16.0
       Fresh serde v1.0.136
       Fresh thiserror v1.0.30
       Fresh tracing v0.1.29
       Fresh wasm-bindgen-macro-support v0.2.79
       Fresh rand_chacha v0.3.1
       Fresh sha-1 v0.9.8
       Fresh pin-project v1.0.10
       Fresh tokio-util v0.6.9
       Fresh wasm-bindgen-macro v0.2.79
       Fresh rand v0.8.4
       Fresh serde_json v1.0.78
       Fresh ts-rs v6.1.2
       Fresh time v0.3.7
       Fresh headers v0.3.5
   Compiling hyper v0.14.16
       Fresh serde_urlencoded v0.7.1
       Fresh axum-core v0.1.1
       Fresh tracing-subscriber v0.3.7
       Fresh tungstenite v0.16.0
       Fresh wasm-bindgen v0.2.79
       Fresh mime_guess v2.0.3
       Fresh tower v0.4.11
     Running `rustc --crate-name hyper --edition=2018 /Users/choc/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.16/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --crate-type staticlib --crate-type cdylib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="default"' --cfg 'feature="http1"' --cfg 'feature="server"' --cfg 'feature="socket2"' --cfg 'feature="stream"' --cfg 'feature="tcp"' -C metadata=9abd2301eac42e16 -C extra-filename=-9abd2301eac42e16 --out-dir /Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -L dependency=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/Users/choc/code/sm/target/debug/deps --extern bytes=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libbytes-b15c66793f5b8889.rlib --extern futures_channel=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_channel-422fa16b1e0a3f57.rlib --extern futures_core=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_core-01d95fcc1d31c9a6.rlib --extern futures_util=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_util-7be1e11672ab6787.rlib --extern http=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttp-c66cec1d95a93370.rlib --extern http_body=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttp_body-1ae0e0b7577a65af.rlib --extern httparse=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttparse-74ab5debec6d846d.rlib --extern httpdate=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttpdate-ed6d76b26a1f504f.rlib --extern itoa=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libitoa-6e55b437502f6ffd.rlib --extern pin_project_lite=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libpin_project_lite-e8bcc26311aed3f1.rlib --extern socket2=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libsocket2-c4a454f73089195a.rlib --extern tokio=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtokio-b2910a18a9d5a488.rlib --extern tower_service=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtower_service-a145cf65f282436e.rlib --extern tracing=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtracing-9db903af87efa27a.rlib --extern want=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libwant-3ab158f2cb94f3d6.rlib --cap-lints allow`
       Fresh tower-http v0.2.1
       Fresh console_error_panic_hook v0.1.7
       Fresh tokio-tungstenite v0.16.1
   Compiling sm-lib v0.1.0 (/Users/choc/code/sm/sm-lib)
     Running `rustc --crate-name sm_lib --edition=2018 sm-lib/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --crate-type rlib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="console_error_panic_hook"' --cfg 'feature="default"' -C metadata=fe4d61989b395f42 --out-dir /Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/Users/choc/code/sm/target/debug/deps --extern console_error_panic_hook=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libconsole_error_panic_hook-31d5ab45b9f54f15.rlib --extern serde=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libserde-f2862e769179cd0a.rlib --extern serde_json=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libserde_json-72a6761f9a159490.rlib --extern time=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtime-9c18c9004983d88a.rlib --extern ts_rs=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libts_rs-075d4be8295ca51f.rlib --extern wasm_bindgen=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libwasm_bindgen-383d8265a6532d0a.rlib`
warning: function is never used: `set_panic_hook`
 --> sm-lib/src/utils.rs:1:8
  |
1 | pub fn set_panic_hook() {
  |        ^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-Wl,--version-script=/var/folders/1q/23ryfghd1xd_h_wh_tkbqhk80000gn/T/rustczyXNgj/list" "-m64" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.10df6q53xyuncgqt.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.10uvnwpzwzc95xqo.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.11udbgfyglbxib2r.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.1fyqgsc8u6d0rk7b.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.1g4q7jxxgwreqojm.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.1h4op0n3mq8zoxww.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.1m8loopr63adn8ob.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.1pvp331tf85es1bx.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.1q21r9p4a3944yca.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.23be214si3azrdgr.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.27llehaggw2hp90e.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2dfpxp8egftov0lw.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2jdujhgwcr48g7cw.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2l482vofx00e0m8g.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2ldkr7k002tvo7a3.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2n8bwmf4u5463kfv.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2trnxa14cj9laydj.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2w67htd2oxfmi9e0.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.2xnnep2prsllcw1z.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.30ef2admxqw0c68j.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.35fn8n9caylkfvl4.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.37xb5lhnrg3p6jkx.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3fgigytfkb8ow62h.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3kj5qu1aqw0mlzj9.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3no83n279smvacih.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3r9jrzvtv8zilmjq.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3rolj2to6me0c1la.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3rs5tb8rejgqx7ze.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3sn80nya09yw4mfn.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3stxuax3nizru8wm.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3uthf2bglplpuiq6.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.3vnskyi267za8hk0.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.46imfyf5adlonelx.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4digpn3g9stff1c6.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4djtv6oijzboqzsg.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4jsl2q9d9j9y8g6r.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4o29awejlath2y62.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4qpzeluq2olid0ed.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4rc6zgpzibz8gel0.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4sufytqamcmiykmj.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4w9gl0hvok695h9z.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4xilin7kt4bcq742.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4ypx6cpl0dt1wvua.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.4zidb47qwugagzwp.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.50485gw06dpkgus9.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.508oh5wzdcu9oraq.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.59p0wahre1ltmxeo.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.5a0jkoack4b7kkoe.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.5ci5vvedrrxk0osi.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.5dj7mxs26wqsh012.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.5s91uymqqon1ua7.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.86nytzf0noww0ni.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.89mlqjfiq888izn.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.d4leibvy6bzb97b.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.ds979s5bh2t6z8g.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.m9km5irkguay5l3.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.rvoykeodaa18i8z.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.unicvbzc20wjoed.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.x129b6bw0snqxyx.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/sm_lib.28zdnobg5t2o5kpo.rcgu.o" "-Wl,--as-needed" "-L" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps" "-L" "/Users/choc/code/sm/target/debug/deps" "-L" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtime-9c18c9004983d88a.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libnum_threads-51d8171f9e999f12.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-5942ee8b63f9368f.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libitoa-0e99a4cd01c95011.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libconsole_error_panic_hook-31d5ab45b9f54f15.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libwasm_bindgen-383d8265a6532d0a.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libcfg_if-c14d177d50bbcfe8.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libts_rs-075d4be8295ca51f.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libthiserror-e6d0241ef63afa85.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libserde-f2862e769179cd0a.rlib" "-Wl,--start-group" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1e1088264352fcd6.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-a969816f41e59f04.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-18e12a7cddee847a.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-f32cf3bc142978d3.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-a0e394a75c0959fe.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-9b944335c98e9e5a.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-53ff769910bef363.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-99cc1718e48a21ca.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-c6d3e92e16ddaaea.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-3bca69e5bcc0a46e.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-391afe94b4105cde.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-e310d903422b1611.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-f892a560e94b36bb.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-89b36d2fd36f710b.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-3edad9197d8d2a0e.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-6123b310ab5947a4.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-125fb607b0118c1e.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-690babb9362d4823.rlib" "-Wl,--end-group" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c39f82cdaf262b3f.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libsm_lib.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: ld: unknown option: --version-script=/var/folders/1q/23ryfghd1xd_h_wh_tkbqhk80000gn/T/rustczyXNgj/list
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

warning: `sm-lib` (lib) generated 1 warning
error: could not compile `sm-lib` due to previous error; 1 warning emitted

Caused by:
  process didn't exit successfully: `rustc --crate-name sm_lib --edition=2018 sm-lib/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type cdylib --crate-type rlib --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="console_error_panic_hook"' --cfg 'feature="default"' -C metadata=fe4d61989b395f42 --out-dir /Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps --target x86_64-unknown-linux-gnu -C incremental=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/incremental -L dependency=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps -L dependency=/Users/choc/code/sm/target/debug/deps --extern console_error_panic_hook=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libconsole_error_panic_hook-31d5ab45b9f54f15.rlib --extern serde=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libserde-f2862e769179cd0a.rlib --extern serde_json=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libserde_json-72a6761f9a159490.rlib --extern time=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtime-9c18c9004983d88a.rlib --extern ts_rs=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libts_rs-075d4be8295ca51f.rlib --extern wasm_bindgen=/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libwasm_bindgen-383d8265a6532d0a.rlib` (exit status: 1)
warning: build failed, waiting for other jobs to finish...
error: linking with `cc` failed: exit status: 1
  |
  = note: "cc" "-Wl,--version-script=/var/folders/1q/23ryfghd1xd_h_wh_tkbqhk80000gn/T/rustcWK4ZNf/list" "-m64" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.0.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.1.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.10.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.11.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.12.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.13.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.14.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.15.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.2.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.3.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.4.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.5.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.6.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.7.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.8.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.hyper.97dac873-cgu.9.rcgu.o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/hyper-9abd2301eac42e16.3sj0e76ujoo249f4.rcgu.o" "-Wl,--as-needed" "-L" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps" "-L" "/Users/choc/code/sm/target/debug/deps" "-L" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libsocket2-c4a454f73089195a.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libitoa-6e55b437502f6ffd.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttparse-74ab5debec6d846d.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtower_service-a145cf65f282436e.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtracing-9db903af87efa27a.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtracing_core-c6b3c01a35f0625b.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/liblazy_static-8fc48e08cccab8d4.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_channel-422fa16b1e0a3f57.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttp_body-1ae0e0b7577a65af.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_util-7be1e11672ab6787.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libslab-e05937fa94a2a2a3.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_sink-b335773f2369a242.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_task-520f4a3a2aea1df8.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libpin_utils-68d8bf4f370d7fc5.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfutures_core-01d95fcc1d31c9a6.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libtokio-b2910a18a9d5a488.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libsignal_hook_registry-ec64508f58eced54.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libnum_cpus-e7f1018f2fd81576.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libmemchr-3251f95cee846e25.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libonce_cell-3a8c19da1cfcc71c.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libmio-a496f52587647bbb.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/liblog-8a5834ab9cb965a2.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libparking_lot-e678ed590c4369ab.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libparking_lot_core-6e745da9af99c444.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/liblibc-5942ee8b63f9368f.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libsmallvec-c26d7dede215c98c.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/liblock_api-00b4a9550a14b806.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libscopeguard-c9ea4142c5a7b5f7.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libinstant-69dab629199e8554.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libcfg_if-c14d177d50bbcfe8.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libpin_project_lite-e8bcc26311aed3f1.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttpdate-ed6d76b26a1f504f.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhttp-c66cec1d95a93370.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libitoa-0e99a4cd01c95011.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libbytes-b15c66793f5b8889.rlib" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libfnv-d40b885c3539f321.rlib" "-Wl,--start-group" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-1e1088264352fcd6.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-a969816f41e59f04.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-18e12a7cddee847a.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-f32cf3bc142978d3.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-a0e394a75c0959fe.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libmemchr-9b944335c98e9e5a.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-53ff769910bef363.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-99cc1718e48a21ca.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd_detect-c6d3e92e16ddaaea.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-3bca69e5bcc0a46e.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-391afe94b4105cde.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-e310d903422b1611.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-f892a560e94b36bb.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-89b36d2fd36f710b.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-3edad9197d8d2a0e.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-6123b310ab5947a4.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-125fb607b0118c1e.rlib" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-690babb9362d4823.rlib" "-Wl,--end-group" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c39f82cdaf262b3f.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-znoexecstack" "-L" "/Users/choc/.rustup/toolchains/stable-aarch64-apple-darwin/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-o" "/Users/choc/code/sm/target/x86_64-unknown-linux-gnu/debug/deps/libhyper-9abd2301eac42e16.so" "-Wl,--gc-sections" "-shared" "-Wl,-zrelro,-znow" "-nodefaultlibs"
  = note: ld: unknown option: --version-script=/var/folders/1q/23ryfghd1xd_h_wh_tkbqhk80000gn/T/rustcWK4ZNf/list
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: build failed
John0x commented 2 years ago

Having the same issue with a different package. Mac m1 as well