xd009642 / tarpaulin

A code coverage tool for Rust projects
https://crates.io/crates/cargo-tarpaulin
Apache License 2.0
2.5k stars 180 forks source link

Link error on `cargo build` after `cargo tarpaulin` #617

Closed rhysd closed 3 years ago

rhysd commented 3 years ago

I'm using tarpaulin on GitHub Actions Linux worker. I'm facing the following mysterious link error. cargo build caused the link error only when running after cargo tarpaulin.

cargo tarpaulin --out Xml
cargo build  # This causes the link error

Of course removing cargo tarpaulin line did not cause this issue.

cargo build  # This runs successfully

And running cargo clean just after `cargo tarpaulin also did not cause this issue.

cargo tarpaulin --out Xml
cargo clean
cargo build  # This runs successfully

Link error:

error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.1b1wklja3fenw37.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.1ck59scgy620i536.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.1ho51y1u45o3fu1z.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.1jpu3vlvwlpmdhb8.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.1l0mg9xkuad7rsdr.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.1rxhqxjevm5yvhsh.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.1zum7o70833cd3sf.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.28ewhu0qldsnqnq4.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2azcesg8eo5vq76o.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2ge9a4xc9g87gvz8.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2grb6rwhj2xb2wvg.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2gu8l6e7c37qxawj.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2i2bl2zjuyye588h.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2rx30sa95p0n61dy.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2ti838bk81rexz73.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2udqdfplpistuuo.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2w6i74euxl9ozeo3.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2wgt331odpsgucop.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2y3tpj2cllt1zle4.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2yxbrpvdmqth0qx8.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2zqlr191yt5z0ikd.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.32cxig1ndyas4y8.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.332t5v1dfzj7upoq.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.33em6rrplgcouiqr.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.33s31uf445xk5ot5.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.37wthkoetsnxo3ee.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.382bzhvyya38rkxj.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3901roi06dzfef6b.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.397pfuneqq3dfcp5.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3a3j0t7e4yizowl6.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3cgkcqj39n35r9b2.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3g7quexytx5hqczn.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3hby7vnsufe2m0su.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3hg4w104ysuyzs61.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3inoxfrvssyu1jcy.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3jhjpdfmg4l5j846.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3nu1hjkudmt1mceb.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3pno865ztervq8ri.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3qvq80x7hk72z3ao.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3rkzf6fn32qcrfqm.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3umma4i7wbe0lywl.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3vkm5514bu32mxhr.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3ypal66k76me5knc.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.3yy6j02pa38uh7kg.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.42vw6fhe5knpj0ou.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.45opmvjddocmvwzk.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4g9rc5gklyp2exlh.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4kzgh524anbin9t1.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4qbnr6wdcd0gdzvd.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4tmjd8iysnar5izd.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4xc3ocg0tiv8tpxd.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4xnumnvr9d2c041y.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4ynzci142o94nuyz.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4zdx884wam1ergwh.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.52y9ou7rtv773yd1.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.54v5fm9laqojsstq.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.5cseyna3c0mgfn0u.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.5fx5wc1kxh73rf06.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.94ez0y20df0tvs1.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.c5wc5qubew8benu.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.g1m1b0lclc65005.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.gmgh1sx0chen32r.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.mk8opoev63wa7u.rcgu.o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.r9xv4i7jp1a2khp.rcgu.o" "-o" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255" "/home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.2qtpuhk04eff7qzk.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/home/runner/work/git-brws/git-brws/target/debug/deps" "-L" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libopen-f675e437b646f4e8.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libenvy-56cfdd2e9417e2b1.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libfutures-e412a7968c538d4d.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libgetopts-499d2cd53cd50fea.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libunicode_width-0465a15c15895916.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libreqwest-b0d7d1fab9f44388.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libhyper_tls-335668fbcc142c9c.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libserde_urlencoded-9df3cacbbcdba0a7.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libdtoa-c2573f6ef35ed3b1.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libipnet-014b94505cfda325.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtokio_tls-60f9f16a3698d8f0.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libencoding_rs-222dfc5e1064d478.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libserde_json-2f9be9284029e5a2.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libryu-e4c369ce3a152f38.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libserde-93f678746e69300c.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libbase64-eb62641585788673.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libmime_guess-efeb10d589d9c6e3.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libunicase-cb51c047ed799a1c.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libmime-0d19f4c38dbd3e4b.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libnative_tls-5ebd2f5961044225.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libopenssl_probe-d2addc7c319bc593.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libopenssl-963f97a68e65b6ed.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libopenssl_sys-bf90cf735e16d87f.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libforeign_types-4d1b2e9c1fce2955.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libforeign_types_shared-0653b0c1cc990258.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libbitflags-e8b42ad6d332332e.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libhyper-aa9f9b57c115dad4.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libhttparse-abee927cf9cebbdc.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libwant-da6d4495dd0a0207.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtry_lock-e6a599d225798fd6.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libh2-d00fed5a5d872c24.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libindexmap-54e0205b31ede618.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libhashbrown-230f6e0ba25badb0.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtokio_util-cc53252e31d5b7aa.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libhttpdate-a5e8a28ad5af2641.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libsocket2-c9c230c9f8a51f0b.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtower_service-1163206a64c25b8a.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libfutures_channel-ac7dca9f0cf92aba.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtracing-2f90322af32b56b1.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtracing_core-b432845e53faa962.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libfutures_util-a0d1401a6efd7533.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libproc_macro_nested-756fc9a35f0fc78d.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libpin_project-63de9bc7044c1485.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libfutures_sink-ae7e5383baf7553f.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libfutures_task-0a038a91889607e8.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libpin_utils-e7fadc93d11de894.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libhttp_body-50ba9089b328498f.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/liburl-145f0afc8b39cba3.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libpercent_encoding-b8f70c4d24b687b1.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libidna-79aef12d482dc3c9.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libunicode_normalization-3f480855bf8ae03b.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtinyvec-e3eaa191be4c7509.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libunicode_bidi-dade267ce787880d.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libmatches-d4a8209e39f39d5c.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libhttp-a959022440293b8b.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libitoa-26d93e58b9ab4ae6.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libtokio-30c49ea68340297f.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libmemchr-d49ac1e01d7c87e9.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libfnv-551fbd3154ffd6a8.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libmio-98855881ec50b559.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/liblog-08d572310e53ae0e.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libslab-2ac6dc832fffd6a6.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libiovec-4acd85e73405b378.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libnet2-49ae846ffcff676e.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libcfg_if-d2033c938d1688fd.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/liblibc-0a43f320b0d2a047.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libfutures_core-c37ea765d59cd195.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libbytes-08650bc8a1092bcf.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/libpin_project_lite-e14b98c809abda04.rlib" "/home/runner/work/git-brws/git-brws/target/debug/deps/liblazy_static-bf21cfb31a9e28ca.rlib" "-Wl,--start-group" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-f14aca24435a5414.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-48d342a8b48d1d01.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libminiz_oxide-14bc0820888c8eb3.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libadler-9cbd9e217bff06bc.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libobject-31826136df98934e.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libaddr2line-075976a117c8fd5d.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libgimli-2d5cbedfbf17a011.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-0474372ff08c5319.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-d437c34460d2315a.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-fb61ed1b8cc4de79.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-bf76d1b643bfc9f0.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-a1b53aa7fddcf418.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-28585e57fac45c73.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-64801769bc15ab28.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-541997b56bb98660.rlib" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-cdea3c81adab3d12.rlib" "-Wl,--end-group" "/usr/share/rust/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-cd9f15a39fb65cbc.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
  = note: /home/runner/work/git-brws/git-brws/target/debug/deps/git_brws-4c1ebc489853a255.4kzgh524anbin9t1.rcgu.o: In function `core::ptr::drop_in_place':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ptr/mod.rs:184: undefined reference to `core::ptr::drop_in_place'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.26745eu8n1jrknen.rcgu.o): In function `core::ptr::drop_in_place':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:194: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:194: undefined reference to `core::ptr::drop_in_place'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.26745eu8n1jrknen.rcgu.o): In function `core::ptr::drop_in_place':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ptr/mod.rs:184: undefined reference to `core::ptr::drop_in_place'
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ptr/mod.rs:184: undefined reference to `core::ptr::drop_in_place'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.26745eu8n1jrknen.rcgu.o): In function `core::ptr::drop_in_place':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:259: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:259: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:259: undefined reference to `core::ptr::drop_in_place'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.26745eu8n1jrknen.rcgu.o): In function `core::ptr::drop_in_place':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/ptr/mod.rs:184: undefined reference to `core::ptr::drop_in_place'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.28mf9zjcxeza7px8.rcgu.o): In function `core::slice::<impl [T]>::iter_mut':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/slice/mod.rs:719: undefined reference to `core::ptr::mut_ptr::<impl *mut T>::wrapping_add'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4t2sn9moro4io49f.rcgu.o): In function `<core::str::pattern::StrSearcher as core::str::pattern::ReverseSearcher>::next_back':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/str/pattern.rs:1075: undefined reference to `core::cmp::min'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4uboy75p6uflm323.rcgu.o): In function `git_brws::page::BrowsePageParser::wrong_number_of_args':
          /home/runner/work/git-brws/git-brws/src/page.rs:74: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4uboy75p6uflm323.rcgu.o): In function `git_brws::page::BrowsePageParser::try_parse_commit':
          /home/runner/work/git-brws/git-brws/src/page.rs:80: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4uboy75p6uflm323.rcgu.o): In function `git_brws::page::BrowsePageParser::try_parse_tag':
          /home/runner/work/git-brws/git-brws/src/page.rs:91: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4uboy75p6uflm323.rcgu.o): In function `git_brws::page::BrowsePageParser::try_parse_diff':
          /home/runner/work/git-brws/git-brws/src/page.rs:103: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/src/page.rs:131: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4uboy75p6uflm323.rcgu.o): In function `git_brws::page::BrowsePageParser::try_parse_file_or_dir':
          /home/runner/work/git-brws/git-brws/src/page.rs:178: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4uboy75p6uflm323.rcgu.o): In function `git_brws::page::BrowsePageParser::try_parse_issue_number':
          /home/runner/work/git-brws/git-brws/src/page.rs:245: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.5ci1m0wq1t92dbk2.rcgu.o): In function `git_brws::service::azure_devops_slug_from_path':
          /home/runner/work/git-brws/git-brws/src/service.rs:383: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.nxrwp4m56bwvepo.rcgu.o): In function `alloc::vec::Vec<T>::extend_desugared':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/vec.rs:2243: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.nxrwp4m56bwvepo.rcgu.o): In function `alloc::vec::Vec<T>::is_empty':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/vec.rs:1401: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.nxrwp4m56bwvepo.rcgu.o): In function `alloc::vec::Drain<T>::fill':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/vec.rs:3004: undefined reference to `core::slice::<impl core::iter::traits::collect::IntoIterator for &mut [T]>::into_iter'
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/vec.rs:3004: undefined reference to `<core::slice::IterMut<T> as core::iter::traits::iterator::Iterator>::next'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.nxrwp4m56bwvepo.rcgu.o): In function `alloc::vec::Drain<T>::fill':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/vec.rs:3004: undefined reference to `core::slice::<impl core::iter::traits::collect::IntoIterator for &mut [T]>::into_iter'
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/vec.rs:3004: undefined reference to `<core::slice::IterMut<T> as core::iter::traits::iterator::Iterator>::next'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.nxrwp4m56bwvepo.rcgu.o): In function `<alloc::vec::Vec<u8> as bytes::buf::buf_mut::BufMut>::put':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/bytes-0.5.6/src/buf/buf_mut.rs:1038: undefined reference to `bytes::buf::buf_impl::Buf::has_remaining'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.nxrwp4m56bwvepo.rcgu.o): In function `<alloc::vec::Vec<T> as alloc::vec::SpecExtend<T,I>>::spec_extend':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/vec.rs:2163: undefined reference to `alloc::vec::Vec<T>::len'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.vg4nwhoekvs330t.rcgu.o): In function `alloc::string::<impl core::cmp::PartialEq<alloc::string::String> for str>::eq':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/alloc/src/string.rs:1925: undefined reference to `core::str::traits::<impl core::ops::index::Index<I> for str>::index'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.1qthralm7mod8ai.rcgu.o): In function `<T as core::slice::SliceContains>::slice_contains::{{closure}}':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/slice/mod.rs:6792: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.1qthralm7mod8ai.rcgu.o): In function `core::slice::IterMut<T>::post_inc_start':
          /rustc/18bf6b4f01a6feaf7259ba7cdae58031af1b7b39/library/core/src/slice/mod.rs:3691: undefined reference to `core::ptr::mut_ptr::<impl *mut T>::wrapping_offset'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.2qwnfvsq9b4eqpeo.rcgu.o): In function `reqwest::async_impl::response::Response::text_with_charset::{{closure}}':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:194: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:194: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:194: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:194: undefined reference to `core::ptr::drop_in_place'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.2qwnfvsq9b4eqpeo.rcgu.o): In function `reqwest::async_impl::response::Response::bytes::{{closure}}':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:259: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:259: undefined reference to `core::ptr::drop_in_place'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/reqwest-0.10.8/src/async_impl/response.rs:259: undefined reference to `core::ptr::drop_in_place'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.33vl4oe6fi9e3vfo.rcgu.o): In function `<http::header::value::HeaderValue as core::convert::TryFrom<alloc::string::String>>::try_from':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/http-0.2.1/src/header/value.rs:526: undefined reference to `<T as core::convert::Into<U>>::into'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.33vl4oe6fi9e3vfo.rcgu.o): In function `<http::header::value::HeaderValue as core::convert::TryFrom<&str>>::try_from':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/http-0.2.1/src/header/value.rs:500: undefined reference to `core::str::<impl str>::parse'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.1kk3f0u2ppqjs3nq.rcgu.o): In function `serde::private::de::size_hint::cautious':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/serde-1.0.117/src/private/de.rs:203: undefined reference to `core::cmp::min'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.2noddgc75wt0g0gt.rcgu.o): In function `encoding_rs::Encoding::for_bom':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.24/src/lib.rs:2814: undefined reference to `core::slice::<impl [T]>::starts_with'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.24/src/lib.rs:2816: undefined reference to `core::slice::<impl [T]>::starts_with'
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/encoding_rs-0.8.24/src/lib.rs:2818: undefined reference to `core::slice::<impl [T]>::starts_with'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.3faa23zqy81ivox8.rcgu.o): In function `git_brws::pull_request::find_github_pr_url_for_branch::{{closure}}':
          /home/runner/work/git-brws/git-brws/src/pull_request.rs:32: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.3faa23zqy81ivox8.rcgu.o): In function `git_brws::pull_request::find_github_pr_url_for_branch::{{closure}}':
          /home/runner/work/git-brws/git-brws/src/pull_request.rs:32: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          /home/runner/work/git-brws/git-brws/target/debug/deps/libgit_brws-1e317729c6fdf1fb.rlib(git_brws-1e317729c6fdf1fb.4dlfz0qanmrt99zg.rcgu.o): In function `<mime::Name as core::cmp::PartialEq>::eq':
          /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/mime-0.3.16/src/lib.rs:66: undefined reference to `core::cmp::impls::<impl core::cmp::PartialEq<&B> for &A>::eq'
          collect2: error: ld returned 1 exit status

error: aborting due to previous error

error: could not compile `git-brws`.

https://github.com/rhysd/git-brws/runs/1386448015?check_suite_focus=true#step:7:91

Repro

I tried to reproduce this issue with minimal Rust project just after running cargo init. But it did not reproduce. I guess some dependency of my project caused this issue, but I could not know which crate caused it from the link error. Instead, I prepared a branch to reproduce this issue with my personal project which could cause this issue:

https://github.com/rhysd/git-brws/tree/cargo-tarpaulin-issue

It contains my project and the minimal CI workflow to cause this issue.

How to run the workflow:

  1. Fork https://github.com/rhysd/git-brws
  2. Go to 'Actions' tab in the forked repository page and enable GitHub Actions
  3. Clone the original repository, switch branch to cargo-tarpaulin-issue, commit something and push it to your fork
    git clone https://github.com/rhysd/git-brws.git && cd git-brws
    git checkout cargo-tarpaulin-issue
    git commit --allow-empty -m test
    git remote add fork git@github.com:{your-name}/git-brws.git
    git push -u fork cargo-tarpaulin-issue
  4. Go to 'Actions' tab in the forked repository page and check if this issue occur

Environment

xd009642 commented 3 years ago

So "-Wl,--as-needed" conflicts with -C link-dead-code https://github.com/rust-lang/rust/issues/64685 I'll try to push this issue along some how as it's quite an old one and a big pain point with coverage on linux. Does tarpaulin work for you at all because I'd expect it to fail if the cargo build afterwards fails?

I'm guessing here there's a further issue with incremental building and the RUSTFLAGS changing not rebuilding dependencies when they should be which should probably be raised on rustc. Or just general confusion with the artefacts from a build that failed with linker issues then being linked against.

rhysd commented 3 years ago

Thank you for the quick clarification. I did not catch the Rust issue. I'll subscribe the issue. And meanwhile I will put cargo clean to clean up built things by tarpaulin for avoiding succeeding cargo build failure.

Does tarpaulin work for you at all because I'd expect it to fail if the cargo build afterwards fails?

Yes, tarpaulin itself works for me.

xd009642 commented 3 years ago

Good to know it works :smile: I'll just close this as it seems the questions answered and you're now following a better issue for updates :smile: