michaeleisel / zld

A faster version of Apple's linker
MIT License
1.19k stars 50 forks source link

Q: How to report build issues? #56

Closed dvdplm closed 4 years ago

dvdplm commented 4 years ago

This is a meta issue. I have a rust project that fails to build when using zld but builds fine otherwise. Should I just open an issue with the info I have (almost none, other than the rustc error) or do you have a set of troubleshooting steps I can follow to provide more useful issue reports?

Thanks! :)

michaeleisel commented 4 years ago

the best thing would be a way for me to reproduce it, along with the rustc error you're seeing

bjorn3 commented 4 years ago

Rustc will write the compiled object files to the output directory (usually target/debug/deps or target/release/deps). If there was a linker error then the object files are not removed afterwards. You can force it to never remove the object files using -Csave-temps.

Does running the linker invocation shown in the error message give a more descriptive error message? It is possible that rustc accidentally swallows part of the error message shown by the linker. Also does it say that the linker exited with a signal or with a non-zero exit code?

dvdplm commented 4 years ago

This is the repository where i encountered the error: substrate-telemetry. My RUSTFLAGS were set to: -C target-cpu=native -C lto=off -C link-arg=-fuse-ld=/usr/local/bin/zld.

This is the full error:

     Running `rustc --crate-name telemetry --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C metadata=70ca924abe45c51f --out-dir /Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps -L dependency=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps --extern actix=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix-1a4b1825b21d5151.rlib --extern actix_http=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_http-bab744fae1aac9c3.rlib --extern actix_web=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_web-90e618aa5b3e87f0.rlib --extern actix_web_actors=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_web_actors-150789a07fa09f2b.rlib --extern bytes=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbytes-2ef3e110a8d8195d.rlib --extern chrono=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libchrono-ee4d44e074d41a8d.rlib --extern clap=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libclap-31b8d34eb8ebc5e4.rlib --extern fnv=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libfnv-61bdf8b96b30bb73.rlib --extern log=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblog-c0602f2fd405248d.rlib --extern num_traits=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnum_traits-8a2b5570300c873c.rlib --extern parking_lot=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libparking_lot-ddabb453eb34f874.rlib --extern primitive_types=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libprimitive_types-6a0ee4dd0266c0d2.rlib --extern reqwest=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libreqwest-1d6656637b4a24f9.rlib --extern rustc_hash=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librustc_hash-e7d9c3bef0f1f45b.rlib --extern serde=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde-73682945330ebe67.rlib --extern serde_json=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde_json-4d9aa296b4e557b8.rlib --extern simple_logger=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsimple_logger-323bd902aa319acf.rlib -C target-cpu=native -C lto=off -C link-arg=-fuse-ld=/usr/local/bin/zld -L native=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/backtrace-sys-589b1933001a9f77/out -L native=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/brotli-sys-5bc4bffc110cb482/out -L native=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/miniz-sys-7a5ed3438b12ef50/out`
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-m64" "-arch" "x86_64" "-L" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.0.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.1.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.10.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.11.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.12.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.13.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.14.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.15.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.2.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.3.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.4.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.5.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.6.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.7.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.8.rcgu.o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.telemetry.dpzu91my-cgu.9.rcgu.o" "-o" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/telemetry.36e9qihm250n1d5e.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps" "-L" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/backtrace-sys-589b1933001a9f77/out" "-L" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/brotli-sys-5bc4bffc110cb482/out" "-L" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/miniz-sys-7a5ed3438b12ef50/out" "-L" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsimple_logger-323bd902aa319acf.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcolored-ad75d4500c45302a.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libreqwest-1d6656637b4a24f9.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libuuid-782dc5080f3dcc2d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde_urlencoded-f5f14fe0bb7a86bc.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmime_guess-2085b462a8df9890.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libunicase-b834d106b3a9b56b.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhyper_tls-020275014277a84d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnative_tls-0a739c9c3f06b9f3.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtempfile-e0328a536a205e84.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libremove_dir_all-ff8e116eb43751dc.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsecurity_framework-03e9af615b3200ee.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcore_foundation-8b1ca7a9344442cc.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsecurity_framework_sys-cc3921d81b642738.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcore_foundation_sys-db3b12b759f90d6c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhyper-1c68fbd2442d8c99.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libwant-af5f2efe12a57822.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtry_lock-f4b7cd85ade8aa34.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio-f05aedd715331921.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_threadpool-ecc37acb8c71931f.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcrossbeam_queue-79be54995146690e.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcrossbeam_deque-a3bcacbe7c59db72.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcrossbeam_epoch-b5fe11b4e2b920b1.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmemoffset-4676495e7895a4d7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhttp_body-6711f3e408392bb3.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_buf-5ce19ddda4869063.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libfutures_cpupool-38780ea9234fb517.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcookie_store-37487aed8811938d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libpublicsuffix-ffac0f06e4c4ccd8.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liberror_chain-cc4a50655c37ef65.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtry_from-307ba96f491405aa.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcookie-da8ba6d51b860beb.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libprimitive_types-6a0ee4dd0266c0d2.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libimpl_codec-abe24ce1f14169d3.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libparity_scale_codec-f23154845cc79cd7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libarrayvec-c174240bae9c46fc.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnodrop-f4f5b9131133fbb7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libimpl_serde-ef5e78f216f96343.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libfixed_hash-a8801ad04415c485.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand-1c86d35ad1c630b0.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libstatic_assertions-e3c61bcc9396e1e3.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libuint-ecb039fd8d6623c8.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcrunchy-b4ec6944307a5f52.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libstatic_assertions-e187eb1fa533b393.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librustc_hex-55fd2d9ac99b6e37.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librustc_hash-e7d9c3bef0f1f45b.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libclap-31b8d34eb8ebc5e4.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libstrsim-d07388dc1b0e10ab.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libatty-311a8b89743d3326.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtextwrap-405ff01469345b39.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtermcolor-1d37cc930558c836.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libvec_map-8030ab59d24c6f68.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libos_str_bytes-81210055be3f799e.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libunicode_width-27e4878b1160bfa3.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_web_actors-150789a07fa09f2b.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_web-90e618aa5b3e87f0.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libawc-69fd086dda05bc1c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_testing-1c612e0fa96b4243.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_server-db067e031e5fe26f.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_signal-4a21428bf98cbf06.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsignal_hook-8dba8c6710dfd528.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsignal_hook_registry-38bdfb0cb08983f4.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libarc_swap-5c96a41d9e17488b.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmio_uds-935219d400f009ae.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_router-b1823b7f4a1796d0.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix-1a4b1825b21d5151.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_http-bab744fae1aac9c3.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsha1-589a683f0b9e51ea.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbase64-1d965a42d41b5302.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand-4dfd550b0e994493.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_chacha-58c2bc8ae6b3b546.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libc2_chacha-2ae2e24307d1eeb7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libppv_lite86-12cbae369e18bd50.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_core-70a9140d6149c868.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libgetrandom-5342b1b72d572639.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde_urlencoded-8f312b6b46bb2d8c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liburl-62cefbd39d599ad7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libidna-e60c12a1d8b94b61.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libdtoa-f7d291ac8f00b9c4.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhttparse-eda383a3423c7157.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libchrono-ee4d44e074d41a8d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnum_integer-021e034680c2435e.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnum_traits-8a2b5570300c873c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde_json-4d9aa296b4e557b8.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libryu-d420952d8120cb46.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde-73682945330ebe67.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libencoding_rs-358696a0acd63a91.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libregex-3d728705cbbe0414.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libthread_local-940fb17dc8fcd777.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libregex_syntax-63a180dc4f769728.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libaho_corasick-6c5b83babfc4020d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmemchr-9c1e053f6e15dcd4.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblanguage_tags-d081a1b559d19943.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libpercent_encoding-16239df7cff2a9c4.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmime-65b24ecf1d15cc29.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libflate2-8c08bac75544b334.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libminiz_sys-e78c3d99d9a23a90.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcrc32fast-5db7f5250c8fe49c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbrotli2-31daf4299189f3fc.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbrotli_sys-606cb6d72f28cded.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtime-5cbccb709d7eca95.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhashbrown-51293c226045d36f.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_utils-5cfa69ef1c20e178.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_connect-5f83594e26900f05.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libh2-91629cd9c1237855.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libindexmap-a32f6ab421973047.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libstring-3809545938a90d33.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhttp-556d5a393de12ff0.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libitoa-4bace5b31d068e5a.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_service-ac175677a4fa78ec.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_server_config-2b6ad1f2213426b1.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_codec-cb85dcfe0c2eb5b4.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcrossbeam_channel-9b3a813c89b42d96.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhashbrown-f940ff5388bd1a73.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtrust_dns_resolver-80b7003ea1faedef.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtrust_dns_proto-24f78cb0b410b416.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liburl-b20688c796e1338b.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libpercent_encoding-50983ebaea2d4713.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_udp-63168b86f79bb5bc.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_codec-9d7d1a1188fa801c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsocket2-8c6ca43749de02da.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libidna-2bded6a3f9b852c9.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libunicode_normalization-11f3fe1e665361bd.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libunicode_bidi-a02fba8f4d8c5528.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmatches-142703749bcdc52d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libresolv_conf-50f9744bbe8d4997.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhostname-f5de5c168d060058.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libquick_error-fccca030fafb358b.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblru_cache-4986ab6c9396c585.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblinked_hash_map-4046336601289131.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libfailure-4333cd13ff452a68.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbacktrace-d9da1b6cfba8fbb7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbacktrace_sys-c5ead2ce1485029f.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librustc_demangle-817b06e142ebf782.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_tcp-33cdd1cdc93fa859.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libparking_lot-4c5076beec83d9ba.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libparking_lot_core-2781b1eab53a2b4d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand-dc11beab476344fd.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_xorshift-f31a97ef19298eed.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_pcg-c0a8c1436302cfe3.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_hc-318c93cf369f7466.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_chacha-fc2a37be5180ada4.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_isaac-1922ee5edc9cae5c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_core-f9563065c1787eac.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_os-b79db94652da49dd.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_jitter-872fd2af3f1575d8.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librand_core-adc4e73aab6c24c6.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblock_api-98fb7445b795e58e.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbitflags-c9349caf0a463a2c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_rt-c442b5caaa852ac9.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_threadpool-a8ab0828a8feea63.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libthreadpool-5f84ee1dc6ce76c6.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_timer-2583985b547a0b68.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_reactor-e52b9e574d022b98.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_sync-88b435b9976eee21.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libfnv-61bdf8b96b30bb73.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_io-5647d8ef6ee87f01.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbytes-2ef3e110a8d8195d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libeither-03bd1045e412fc29.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbyteorder-999397565d59f12f.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libparking_lot-ddabb453eb34f874.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libparking_lot_core-35fb2f6b088b92ec.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsmallvec-41961a109ed15564.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmaybe_uninit-57783e3bab68dd85.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblock_api-802061a88e4a162f.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libscopeguard-b5eed0dfd751b5da.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnum_cpus-ba5f05cabbc6810d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libmio-027f55d66f2679a7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libslab-6832d5b4a23a7b94.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libiovec-7007aeef75f7ce60.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnet2-b5359a99820064b6.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblibc-1cd78e5bba61de7c.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcopyless-0e3a586342b86879.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_current_thread-6773ffd8a63518ca.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libtokio_executor-1f0e12b494c1b9df.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcrossbeam_utils-901d4f9c15ca8aa7.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblazy_static-1daaa7b35fc84e3d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libfutures-f9c717b5415d01ed.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblog-c0602f2fd405248d.rlib" "/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libcfg_if-32c2c039cc398fff.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-bc221c54ec897892.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_abort-f0032823af2020a1.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libobject-32d7317b578893eb.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-230dc94f5ea00cfc.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgimli-f883e06376208f62.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-f339657fea18b5cf.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-fa402a5dbe38099d.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-9a8f7d7dd668792e.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-514ad6df8351dc50.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-5b56ac308e21b9e4.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-77be018a2e7be2ba.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-bd02f044a982ab26.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-a05f9dd2c49fa330.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-4d3168f6264ce7fb.rlib" "/Users/dvd/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-56bf0be46b5f5195.rlib" "-framework" "Security" "-framework" "CoreFoundation" "-framework" "Security" "-framework" "Security" "-lSystem" "-lresolv" "-lc" "-lm" "-fuse-ld=/usr/local/bin/zld"
  = note: ld: in /Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhttp-556d5a393de12ff0.rlib(http-556d5a393de12ff0.http.1a0td9xo-cgu.11.rcgu.o), could not parse object file /Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libhttp-556d5a393de12ff0.rlib(http-556d5a393de12ff0.http.1a0td9xo-cgu.11.rcgu.o): 'Unknown attribute kind (62) (Producer: 'LLVM11.0.0-rust-1.47.0-nightly' Reader: 'LLVM APPLE_1_1103.0.32.62_0')', using libLTO version 'LLVM version 11.0.3, (clang-1103.0.32.62)' for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

error: aborting due to previous error

error: could not compile `telemetry`.

Caused by:
  process didn't exit successfully: `rustc --crate-name telemetry --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C panic=abort -C lto -C metadata=70ca924abe45c51f --out-dir /Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps -L dependency=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps --extern actix=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix-1a4b1825b21d5151.rlib --extern actix_http=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_http-bab744fae1aac9c3.rlib --extern actix_web=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_web-90e618aa5b3e87f0.rlib --extern actix_web_actors=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libactix_web_actors-150789a07fa09f2b.rlib --extern bytes=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libbytes-2ef3e110a8d8195d.rlib --extern chrono=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libchrono-ee4d44e074d41a8d.rlib --extern clap=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libclap-31b8d34eb8ebc5e4.rlib --extern fnv=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libfnv-61bdf8b96b30bb73.rlib --extern log=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/liblog-c0602f2fd405248d.rlib --extern num_traits=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libnum_traits-8a2b5570300c873c.rlib --extern parking_lot=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libparking_lot-ddabb453eb34f874.rlib --extern primitive_types=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libprimitive_types-6a0ee4dd0266c0d2.rlib --extern reqwest=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libreqwest-1d6656637b4a24f9.rlib --extern rustc_hash=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/librustc_hash-e7d9c3bef0f1f45b.rlib --extern serde=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde-73682945330ebe67.rlib --extern serde_json=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libserde_json-4d9aa296b4e557b8.rlib --extern simple_logger=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/deps/libsimple_logger-323bd902aa319acf.rlib -C target-cpu=native -C lto=off -C link-arg=-fuse-ld=/usr/local/bin/zld -L native=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/backtrace-sys-589b1933001a9f77/out -L native=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/brotli-sys-5bc4bffc110cb482/out -L native=/Users/dvd/dev/parity/substrate-telemetry/backend/target/release/build/miniz-sys-7a5ed3438b12ef50/out` (exit code: 1)

It looks like the interesting part is 'Unknown attribute kind (62) (Producer: 'LLVM11.0.0-rust-1.47.0-nightly' Reader: 'LLVM APPLE_1_1103.0.32.62_0')', using libLTO version 'LLVM version 11.0.3, (clang-1103.0.32.62)' for architecture x86_64

bjorn3 commented 4 years ago

https://github.com/paritytech/substrate-telemetry/blob/530132a3bb7fd3cf09ed8c2278eccf56c86b07e2/backend/Cargo.toml#L28

telemetry enables LTO.

dvdplm commented 4 years ago

telemetry enables LTO.

Aha, indeed. Thank you so much. 👍

Closing as invalid.

michaeleisel commented 4 years ago

is this really invalid? there's still a difference in behavior between ld and zld, no?

dvdplm commented 4 years ago

is this really invalid? there's still a difference in behavior between ld and zld, no?

I believe it is. Here's what I did: With RUSTFLAGS set to -C target-cpu=native -C lto=off -C link-arg=-fuse-ld=/usr/local/bin/zld the build fails, and I erroneously assumed zld was the problem; to verify I unset RUSTFLAGS and recompiled (which works). The real culprit is the lto setting.

Sorry for the noise!

michaeleisel commented 4 years ago

no worries