Skip to content

linking with cc failed when using reqwest #608

@rossmacarthur

Description

@rossmacarthur

I tried to run the following on the playground to test what reqwest's default user agent was. See here

fn main() -> reqwest::Result<()> {
    let resp = reqwest::blocking::get("https://httpbin.org/user-agent")?.text()?;
    println!("{}", resp);
    Ok(())
}

I got the following error:

   Compiling playground v0.0.1 (/playground)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/playground/target/debug/deps/playground-10d0f4970c48b65e.playground.d7r56jmx-cgu.0.rcgu.o" "-o" "/playground/target/debug/deps/playground-10d0f4970c48b65e" "/playground/target/debug/deps/playground-10d0f4970c48b65e.3uw1ioucieuxjqcu.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/playground/target/debug/deps" "-L" "/playground/target/debug/build/backtrace-sys-32bcf89470b8d3aa/out" "-L" "/playground/target/debug/build/libsqlite3-sys-98a57be678c5b323/out" "-L" "/playground/target/debug/build/ring-f6ddcdec1b5ae3e9/out" "-L" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/playground/target/debug/deps/libreqwest-2280737fd6cb0595.rlib" "/playground/target/debug/deps/libcookie_store-c223e7d70e85293f.rlib" "/playground/target/debug/deps/libpublicsuffix-6dd998283457cd55.rlib" "/playground/target/debug/deps/libregex-f1c74f820e3ec550.rlib" "/playground/target/debug/deps/libthread_local-e617baee21ca79d3.rlib" "/playground/target/debug/deps/libregex_syntax-0189bac681565790.rlib" "/playground/target/debug/deps/libaho_corasick-89501e9b76a037af.rlib" "/playground/target/debug/deps/liberror_chain-e7868d1bb28fa0d7.rlib" "/playground/target/debug/deps/libbacktrace-06efc8c4bb53bcb9.rlib" "/playground/target/debug/deps/libaddr2line-401a1d679484e73a.rlib" "/playground/target/debug/deps/libobject-9c3db9924d95875e.rlib" "/playground/target/debug/deps/libflate2-95399be61abacee0.rlib" "/playground/target/debug/deps/libminiz_oxide-8ae2fa4c54176a13.rlib" "/playground/target/debug/deps/libadler32-dabb69e1005042f0.rlib" "/playground/target/debug/deps/libcrc32fast-fcde5916c07e4f26.rlib" "/playground/target/debug/deps/libwasmparser-881b152855ace1a0.rlib" "/playground/target/debug/deps/libgimli-a51353504cbfbdbb.rlib" "/playground/target/debug/deps/libstable_deref_trait-0d8b026896f361ce.rlib" "/playground/target/debug/deps/libfallible_iterator-c8d5475a3031b0bf.rlib" "/playground/target/debug/deps/libcpp_demangle-884a5e60165ce391.rlib" "/playground/target/debug/deps/librustc_demangle-1bfac37b2734a801.rlib" "/playground/target/debug/deps/libcookie-ea115a27fa6ec467.rlib" "/playground/target/debug/deps/liburl-36c1caba00bcc009.rlib" "/playground/target/debug/deps/libpercent_encoding-4e9c3c43218ce03d.rlib" "/playground/target/debug/deps/libidna-6f34e7616da35ae8.rlib" "/playground/target/debug/deps/libhyper_tls-835d0888faa11e00.rlib" "/playground/target/debug/deps/libtokio_tls-6b83977b343b795f.rlib" "/playground/target/debug/deps/libencoding_rs-6e0bc81a6ec0ba54.rlib" "/playground/target/debug/deps/libserde_urlencoded-b8812078e731064d.rlib" "/playground/target/debug/deps/libdtoa-52e527c8c058b6e8.rlib" "/playground/target/debug/deps/libserde_json-d7e8145a356cac7f.rlib" "/playground/target/debug/deps/libryu-b5989423790b4439.rlib" "/playground/target/debug/deps/libbase64-010124b19fc20ea5.rlib" "/playground/target/debug/deps/libmime_guess-8ba3135b443ec937.rlib" "/playground/target/debug/deps/libunicase-d76c45be6dbce423.rlib" "/playground/target/debug/deps/libmime-73bc9f22bc430aef.rlib" "/playground/target/debug/deps/libnative_tls-2fc0be2f13e115bd.rlib" "/playground/target/debug/deps/libopenssl_probe-902432bffe965011.rlib" "/playground/target/debug/deps/libopenssl-013a7e9335dbb3bd.rlib" "/playground/target/debug/deps/libopenssl_sys-c3bfe3687da8e99b.rlib" "/playground/target/debug/deps/libforeign_types-422831084902015b.rlib" "/playground/target/debug/deps/libforeign_types_shared-b111b3e697fcd7a3.rlib" "/playground/target/debug/deps/libbitflags-51b414dbb2d0309e.rlib" "/playground/target/debug/deps/libhyper-ca8044cc86d90866.rlib" "/playground/target/debug/deps/libhttparse-9836726372fa1443.rlib" "/playground/target/debug/deps/libwant-63c7283356f102eb.rlib" "/playground/target/debug/deps/libtry_lock-feedce41dabd060c.rlib" "/playground/target/debug/deps/libh2-7d652811d4bd0b93.rlib" "/playground/target/debug/deps/libindexmap-afbcb0028fc47504.rlib" "/playground/target/debug/deps/libtokio_util-815bbeb7fe3711df.rlib" "/playground/target/debug/deps/libtime-6aa2d228350c9609.rlib" "/playground/target/debug/deps/libtower_service-52f761d6455a13b0.rlib" "/playground/target/debug/deps/libtokio-f83dade162a1582f.rlib" "/playground/target/debug/deps/libsignal_hook_registry-e5f25d77d1702e52.rlib" "/playground/target/debug/deps/libarc_swap-cfabb452f5587e2e.rlib" "/playground/target/debug/deps/libnum_cpus-98a7aa9328adfead.rlib" "/playground/target/debug/deps/libmio_uds-d93074ab1d08151e.rlib" "/playground/target/debug/deps/libmio-4240446a618a88e4.rlib" "/playground/target/debug/deps/libnet2-f4afb0b77ac981d0.rlib" "/playground/target/debug/deps/libpin_project_lite-9a9267b3d3e16d94.rlib" "/playground/target/debug/deps/libhttp_body-7bff627ce05f2057.rlib" "/playground/target/debug/deps/libfutures_util-1965ab0b028f3856.rlib" "/playground/target/debug/deps/libmemchr-736c846c8a1198ab.rlib" "/playground/target/debug/deps/libproc_macro_nested-3599413c1588fe90.rlib" "/playground/target/debug/deps/libtokio_io-83684c2cacee1133.rlib" "/playground/target/debug/deps/libbytes-3b8558ccd2537f1a.rlib" "/playground/target/debug/deps/libiovec-1757b2413d81bfd9.rlib" "/playground/target/debug/deps/liblibc-ec470d9121043438.rlib" "/playground/target/debug/deps/libbyteorder-0ac0d90ee31ce7f8.rlib" "/playground/target/debug/deps/liblog-e0018a0ac2ea7c74.rlib" "/playground/target/debug/deps/libserde-11ca70569c1e1173.rlib" "/playground/target/debug/deps/libcfg_if-0d9222ca75505dc1.rlib" "/playground/target/debug/deps/libfutures-7075a4f59b000939.rlib" "/playground/target/debug/deps/libfutures_io-57baa15e13deea65.rlib" "/playground/target/debug/deps/libslab-2a9925d0c90a766f.rlib" "/playground/target/debug/deps/libfutures_channel-cbd92f366a3fba9a.rlib" "/playground/target/debug/deps/libpin_project-f86e700cd22f48fa.rlib" "/playground/target/debug/deps/libfutures_sink-24fbe2a1b4480001.rlib" "/playground/target/debug/deps/libfutures_task-083f3a5abe40c116.rlib" "/playground/target/debug/deps/libonce_cell-d45f5dabdcfccff2.rlib" "/playground/target/debug/deps/libpin_utils-2adc1b6a9e7678e8.rlib" "/playground/target/debug/deps/libfutures_core-f26fb5d7b8f566b0.rlib" "/playground/target/debug/deps/liblazy_static-54523ee2f52eccea.rlib" "/playground/target/debug/deps/liburl-d7d166735c60b66a.rlib" "/playground/target/debug/deps/libpercent_encoding-75d94e355323a5bd.rlib" "/playground/target/debug/deps/libidna-641140f40140b114.rlib" "/playground/target/debug/deps/libunicode_normalization-006cabcac5e9a7e3.rlib" "/playground/target/debug/deps/libsmallvec-1acbfad24b6a0393.rlib" "/playground/target/debug/deps/libunicode_bidi-af62199127b515b7.rlib" "/playground/target/debug/deps/libmatches-e2a3b756f8dfb8d1.rlib" "/playground/target/debug/deps/libhttp-4a4677cb101097d5.rlib" "/playground/target/debug/deps/libitoa-33f876512c0aa49a.rlib" "/playground/target/debug/deps/libbytes-1cdfc6af6ba62504.rlib" "/playground/target/debug/deps/libfnv-e59a7073ce90425d.rlib" "-Wl,--start-group" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-205127404fcba336.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-a657948fb7763780.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libhashbrown-4af901391177f653.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_alloc-9bdd51edf637d1e0.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace-df9a9630b2ea2e1e.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-fddbfe63d5cc9339.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-dc1fcc6e43806791.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-e2f4bff19e00107e.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcfg_if-a152d13c1d7ed405.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-d92b841792fc008d.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-a64c249515c023f5.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-57654524b3e40c00.rlib" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-72180f1527a726a2.rlib" "-Wl,--end-group" "/playground/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-990cc8f4a91a3ab4.rlib" "-Wl,-Bdynamic" "-lssl" "-lcrypto" "-lutil" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-ldl" "-lutil"
  = note: collect2: fatal error: ld terminated with signal 9 [Killed]
          compilation terminated.
          

error: aborting due to previous error

error: could not compile `playground`.

To learn more, run the command again with --verbose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions