Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to linker error when using dylibs #82151

Closed
alexkornitzer opened this issue Feb 15, 2021 · 25 comments · Fixed by #113695
Closed

undefined reference to linker error when using dylibs #82151

alexkornitzer opened this issue Feb 15, 2021 · 25 comments · Fixed by #113695
Assignees
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@alexkornitzer
Copy link

alexkornitzer commented Feb 15, 2021

When including mongodb (2.0.0-alpha) into a dylib'd crate that is included in an application, the linker is failing to resolve all references. It is fine when using mongodb (1.0) which makes me think this is something that tokio 1.0 is bringing to light.

This seems similar to #67276 except the workarounds it suggested at the time do not work.

Code

Due to the nature of this making a truly small example is quite challenging, I assume isolating tokio 1.2 out might work? But anyway for now, an repo for the example is here:

https://github.com/alexkornitzer/dylib-errors/tree/error/mongodb

Meta

rustc --version --verbose:

rustc 1.50.0 (cb75ad5db 2021-02-10)
binary: rustc
commit-hash: cb75ad5db02783e8b0222fee363c5f63f7e2cf5b
commit-date: 2021-02-10
host: x86_64-unknown-linux-gnu
release: 1.50.0

Error output

Click to see (large) error output
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/dylib-errors/target/debug/deps/serverctl-075ec1ba25a9db57.1itguawvaqi4tz09.rcgu.o" "/tmp/dylib-errors/target/debug/deps/serverctl-075ec1ba25a9db57.2e2vi1eic3cq1uv0.rcgu.o" "/tmp/dylib-errors/target/debug/deps/serverctl-075ec1ba25a9db57.2xnsa9e8fo0f3vfx.rcgu.o" "/tmp/dylib-errors/target/debug/deps/serverctl-075ec1ba25a9db57.381d3dpcz550aiga.rcgu.o" "/tmp/dylib-errors/target/debug/deps/serverctl-075ec1ba25a9db57.439rmo5cmtvxqijq.rcgu.o" "/tmp/dylib-errors/target/debug/deps/serverctl-075ec1ba25a9db57.m2w4nr06rairzye.rcgu.o" "-o" "/tmp/dylib-errors/target/debug/deps/serverctl-075ec1ba25a9db57" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/tmp/dylib-errors/target/debug/deps" "-L" "/tmp/dylib-errors/target/debug/build/nng-sys-f3e266d23dd4e472/out/lib" "-L" "/tmp/dylib-errors/target/debug/build/nng-sys-f3e266d23dd4e472/out/lib64" "-L" "/tmp/dylib-errors/target/debug/build/ring-bb20fb99fa6aa7fb/out" "-L" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/tmp/dylib-errors/target/debug/deps" "-lshared" "-L" "/tmp/dylib-errors/target/debug/deps" "-lhyper-76617ad6dff947a6" "-Wl,-Bstatic" "/tmp/dylib-errors/target/debug/deps/libenv_logger-a71078fee9c4b7c4.rlib" "/tmp/dylib-errors/target/debug/deps/libtermcolor-a5f039500e7d00fb.rlib" "/tmp/dylib-errors/target/debug/deps/libatty-19a75323732422a2.rlib" "/tmp/dylib-errors/target/debug/deps/libhumantime-96e834ce26cdaa11.rlib" "/tmp/dylib-errors/target/debug/deps/libregex-9283b86347eb36d1.rlib" "/tmp/dylib-errors/target/debug/deps/libthread_local-a7feb37262151fce.rlib" "/tmp/dylib-errors/target/debug/deps/libregex_syntax-a1379624b565cc38.rlib" "/tmp/dylib-errors/target/debug/deps/libaho_corasick-6617b386ca598d8a.rlib" "-Wl,--start-group" "-L" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bdynamic" "-lstd-6f77337c1826707d" "-Wl,--end-group" "-Wl,-Bstatic" "/home/alex/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d36087076e1dd756.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
  = note: /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::client::ClientTask<B> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::headers::set_content_length_if_missing'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_body_write_aborted'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Body::h2'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_read_head::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::role::parse_headers::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_shutdown::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::pool::Checkout<T> as core::ops::drop::Drop>::drop::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_closed'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::vec::Vec<T>::with_capacity'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Expiration::expires'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::option::Option<T>::is_some'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hashbrown::raw::RawIterHash<T> as core::iter::traits::iterator::Iterator>::next'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::connect::http::ConnectError as core::fmt::Display>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::get_host_port'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_user_unsupported_request_method'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::alloc::box_free'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::ReadStrategy::next'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::option::Option<T> as core::clone::Clone>::clone'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::result::Result<T,E>::expect'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Client<C,B>::send_request::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::result::Result<T,E> as core::ops::try::Try>::into_result'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::PipeToSendStream<S> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::encode::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::any::TypeId::of'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::option::Option<T>::take'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Pool<T>::reuse::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::body::length::DecodedLength as core::fmt::Display>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `futures_channel::lock::Lock<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::origin_form'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::error::Error as core::fmt::Display>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::IdlePopper<T>::pop::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::Decoder::decode::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::maybe_notify::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Builder::pool_max_idle_per_host'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::HeaderMap<T>::len'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::dispatch::Client<B> as hyper::proto::h1::dispatch::Dispatch>::poll_msg::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::Bucket<T>::as_ref'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::calculate_layout'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::PipeToSendStream<S> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Buffered<T,B>::poll_flush_flattened::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::is_read_closed'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::with'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::connect::http::ConnectError as std::error::Error>::source'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::sync::Arc<T>::inner'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::conn::Builder::handshake::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::with'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::body::body::Body as http_body::Body>::size_hint'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::HttpInfo::remote_addr'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::Bucket<T>::from_base_index'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_unexpected_message'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::sync::Arc<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::response::Response<T>::extensions_mut'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_read_body::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::PoolInner<T>::put::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectingTcp::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::fmt::ArgumentV1::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::ping::Recorder::ensure_not_timed_out'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::result::Result<T,E> as core::ops::try::Try>::from_error'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<dyn core::any::Any>::is'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::result::Result<T,E>::ok'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::Connected::negotiated_h2'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_read_head::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<futures_channel::lock::TryLock<T> as core::ops::deref::DerefMut>::deref_mut'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hashbrown::raw::RawIter<T> as core::iter::traits::iterator::Iterator>::next'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::role::encode_headers::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_read_body::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Client<C,B>::connect_to::{{closure}}::{{closure}}::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::sync::Arc<T>::from_inner'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::ping::Config::is_enabled'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<h2::share::SendStream<hyper::proto::h2::SendBuf<B>> as hyper::proto::h2::SendStreamExt>::on_user_err::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `std::sync::mutex::Mutex<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::Bucket<T>::as_ptr'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_read_head::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<alloc::sync::Arc<T> as core::clone::Clone>::clone'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::body::body::Body as http_body::Body>::poll_data'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `futures_channel::lock::Lock<T>::try_lock'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Buffered<T,B>::parse::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::dns::Name::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::HttpConnector::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_read_head::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::extract_domain'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Sender::poll_ready'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::Bucket<T>::drop'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::require_empty_read::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::Wants::add'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::read'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::close_write'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::headers::connection_keep_alive'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::option::Option<T>::as_ref'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_canceled'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::option::Option<T>::take'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::is_idle'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_shutdown'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<std::collections::hash::map::HashMap<K,V,S> as core::default::Default>::default'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::decode::Kind as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::conn::Proto as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::disable_keep_alive'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::client::handshake::{{closure}}::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `tokio::sync::oneshot::Sender<T>::send'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_h2'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<T as core::convert::Into<U>>::into'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::maybe_notify::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::connect::http::ConnectError as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::HeaderMap<T>::remove'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::ChunkedState::read_body::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::uri::builder::Builder::authority'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::is_close_delimited'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_read_body::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::force_io_read::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectingTcpRemote::connect'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::client::ResponseFuture as core::future::future::Future>::poll'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::ChunkedState::read_trailer::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::PoolInner<T>::put::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `futures_channel::mpsc::queue::Queue<T>::pop_spin'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::task::poll::Poll<core::result::Result<T,E>> as core::ops::try::Try>::into_result'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::option::Option<T>::take'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::body::body::Body as http_body::Body>::is_end_stream'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::prepare_upgrade'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_shutdown::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::is_write_closed'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::fmt::ArgumentV1::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::role::Client as hyper::proto::h1::Http1Transaction>::parse'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::conn::Http2SendRequest<B>::send_request_retryable::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Sender::send_error'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::ReadStrategy::record'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Body::delayed_eof'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_read_body::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Buffered<T,B>::parse::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::is_canceled'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::common::never::Never as std::error::Error>::description'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<T as core::convert::From<T>>::from'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::RawTable<T>::iter'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::PipeToSendStream<S> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::role::Client as hyper::proto::h1::Http1Transaction>::encode'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::dispatch::Client<B> as hyper::proto::h1::dispatch::Dispatch>::recv_msg::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Checkout<T>::checkout::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::Decoder::decode::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::decode_content_length'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::HeaderMap<T>::insert_occupied'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::dispatch::Client<B> as hyper::proto::h1::dispatch::Dispatch>::poll_ready::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::conn::Builder::http2_only'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::ChunkedState::read_extension::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::mem::drop'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::pool::Pooled<T> as core::ops::drop::Drop>::drop::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::with'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::ReadStrategy::max'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<alloc::sync::Arc<T> as core::ops::deref::Deref>::deref'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::client::new_builder'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Body::new_channel'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::client::ClientTask<B> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::RawTable<T>::data_end'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::client::ClientTask<B> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::ResponseFuture::error_version'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::h2_reason'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::uri::builder::Builder::scheme'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::close_read'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Buffered<T,B>::parse::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::fmt::ArgumentV1::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_read_head::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::error::Error as core::convert::From<hyper::error::Parse>>::from'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectError::m'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::maybe_notify::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::RawTable<T>::buckets'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::ResponseFuture::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::option::Option<T> as core::clone::Clone>::clone'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Buffered<T,B>::poll_flush::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::Connected::clone'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::dispatch::Callback<T,U>::send_when::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_too_large'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::upgrade::OnUpgrade::is_none'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::require_empty_read::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::vec::Vec<T,A>::reserve'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_flush::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::RawTable<T>::is_empty_singleton'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::role::Client as hyper::proto::h1::Http1Transaction>::is_client'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<http::uri::scheme::Scheme2<T> as core::clone::Clone>::clone'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<&mut T as core::ops::deref::DerefMut>::deref_mut'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::KA::status'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::try_keep_alive::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `std::error::<impl core::convert::From<E> for alloc::boxed::Box<dyn std::error::Error+core::marker::Sync+core::marker::Send>>::from'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<futures_util::future::ready::Ready<T> as core::future::future::Future>::poll'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::Wants::contains'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::upgrade::Pending::fulfill'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<futures_channel::oneshot::Receiver<T> as core::future::future::Future>::poll'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::fmt::ArgumentV1::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::HttpConnector<R>::config_mut'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::PoolInner<T>::put::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<T as core::borrow::Borrow<T>>::borrow'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::write'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::connect::dns::GaiResolver as tower_service::Service<hyper::client::connect::dns::Name>>::poll_ready'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Checkout<T>::checkout::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::task::poll::Poll<core::result::Result<T,E>> as core::ops::try::Try>::from_error'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::RawTable<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::is_last'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::ChunkedState::read_size_lws::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::on_read_head_error::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Buffered<T,B>::poll_flush::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::is_parse'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `futures_channel::mpsc::queue::Queue<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::client::conn_task::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Pool<T>::connecting::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Builder::http2_only'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::Extra::set'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<alloc::sync::Arc<T> as core::ops::deref::Deref>::deref'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::slice::iter::Iter<T> as core::iter::traits::iterator::Iterator>::next'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::client::new_ping_config'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::close'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::HeaderMap<T>::remove'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_read::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::io::ReadStrategy as core::default::Default>::default'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::option::Option<T> as core::cmp::PartialEq>::eq'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::client::ClientTask<B> as core::future::future::Future>::poll::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::encode_and_end::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Client<C,B>::connect_to::{{closure}}::{{closure}}::{{closure}}::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::KA::idle'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_io'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::map::make_hash'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Config::is_enabled'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::Connected::proxy'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::option::Option<T> as core::clone::Clone>::clone'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::PoolInner<T>::put::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Sender::try_send_data'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::ChunkSize::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::dispatch::Client<B> as hyper::proto::h1::dispatch::Dispatch>::poll_msg::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::mem::drop'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<&T as core::fmt::Display>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::connect::dns::GaiResolver as tower_service::Service<hyper::client::connect::dns::Name>>::call'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::RawTable<T>::free_buckets'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::PoolInner<T>::put::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<T as core::convert::From<T>>::from'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::ReadStrategy::with_max'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::encode::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_loop::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::ping::disabled'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::connect'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::dns::SocketAddrs::try_parse'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::mid_message_detect_eof::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::HeaderMap<T>::remove'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Expiration::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::VacantEntry<T>::insert'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::ping::Recorder::record_non_data'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::require_empty_read::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::HeaderMap<T>::entry'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::result::Result<T,E>::expect'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::danger_full_buf::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_flush::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Body::take_full_data'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::slice::raw::from_raw_parts_mut'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectError::m::{{closure}}'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Buffered<T,B>::poll_flush_flattened::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::ChunkedState::read_size_lf::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::sync::Arc<T>::inner'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `std::collections::hash::map::HashMap<K,V,S>::insert'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectingTcp::connect'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::role::Client as hyper::proto::h1::Http1Transaction>::on_error'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::client::ClientTask<B> as core::future::future::Future>::poll::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::vec::Vec<T,A>::set_len'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `tokio::loom::std::unsafe_cell::UnsafeCell<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::boxed::Box<T,A>::into_raw_with_allocator'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::<impl hyper::client::connect::Connection for tokio::net::tcp::stream::TcpStream>::connected'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_user'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::dns::SocketAddrs::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Client<C,B>::connect_to::{{closure}}::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectingTcpRemote::connect::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::sync::Arc<T>::inner'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::on_read_head_error::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::common::never::Never as core::fmt::Display>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::vec::Vec<T,A>::capacity'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::absolute_form'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::poll_drain_or_close_read::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::client::Builder as core::default::Default>::default'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::decode::IncompleteBody as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `std::collections::hash::set::HashSet<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::PoolInner<T>::put::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::common::never::Never as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::ping::Ponger::poll'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<dyn core::any::Any>::is'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::any::TypeId::of'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::Decoder::is_eof'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<I as core::iter::traits::collect::IntoIterator>::into_iter'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::ping::Recorder::for_stream'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::client::ClientTask<B> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::IdlePopper<T>::pop::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::non_null::NonNull<T>::as_ptr'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::require_empty_read::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::authority_form'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Client<C,B>::request::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::vec::Vec<T>::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::conn::KA as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hashbrown::raw::RawTable<T>::iter_hash'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_version_h2'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::ChunkedState::read_size_lf::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::is_connect'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::Decoder::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::domain_as_uri'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_read::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::io::Cursor<alloc::vec::Vec<u8>>::reset'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectingTcpRemote::connect::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::pool::Checkout<T>::poll_waiter::CANCELED'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `tokio::sync::oneshot::Inner<T>::drop_tx_task'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<std::sync::mutex::MutexGuard<T> as core::ops::deref::DerefMut>::deref_mut'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectingTcpRemote::connect::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `futures_util::future::ready::err'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::is_eof'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::decode::ChunkedState::read_size::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<alloc::boxed::Box<T,A> as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::conn::State as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::common::task::yield_now'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::error::Error as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<alloc::sync::Arc<T> as core::ops::deref::Deref>::deref'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::conn::KA as core::ops::bit::BitAndAssign<bool>>::bitand_assign'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::slice::<impl [T]>::iter'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::ConnectError::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<alloc::sync::Arc<T> as core::ops::deref::Deref>::deref'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::HttpConnector<R>::set_keepalive'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::option::Option<T>::as_ref'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::conn::SendRequest<B>::send_request_retryable::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::connect::dns::GaiFuture as core::future::future::Future>::poll'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::result::Result<T,E>::unwrap'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Builder::http1_title_case_headers'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::body::body::Body::new'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::option::Option<T> as core::default::Default>::default'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::conn::Writing as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<alloc::sync::Arc<T> as core::clone::Clone>::clone'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::ping::channel'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h2::client::ClientTask<B> as core::future::future::Future>::poll::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<I as core::iter::traits::collect::IntoIterator>::into_iter'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<T as core::convert::Into<U>>::into'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<h2::share::SendStream<hyper::proto::h2::SendBuf<B>> as hyper::proto::h2::SendStreamExt>::send_eos_frame::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::connect::http::HttpConnector<R>::call_async::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::headers::method_has_defined_payload_semantics'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Client<C,B>::connection_for::{{closure}}::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::error::Error as std::error::Error>::source'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::option::Option<T>::map'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::conn::Reading as core::fmt::Debug>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<core::result::Result<T,E> as core::ops::try::Try>::into_result'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::Conn<I,B,T>::on_upgrade::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `std::sync::mutex::Mutex<T>::lock'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::client::client::Client<C,B>::retryably_send_request::{{closure}}::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::ptr::drop_in_place'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `alloc::boxed::Box<dyn core::any::Any,A>::downcast'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::error::Error::new_incomplete'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::wants_keep_alive'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::conn::State::busy'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::proto::h1::decode::IncompleteBody as core::fmt::Display>::fmt'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `core::mem::needs_drop'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `http::header::map::OccupiedEntry<T>::into_mut'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `<hyper::client::connect::dns::GaiAddrs as core::iter::traits::iterator::Iterator>::next'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h1::encode::Encoder::encode_and_end::CALLSITE'
          /usr/bin/ld: /tmp/dylib-errors/target/debug/deps/libshared.so: undefined reference to `hyper::proto::h2::strip_connection_headers'
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `serverctl`

To learn more, run the command again with --verbose.
@alexkornitzer alexkornitzer added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 15, 2021
@jonas-schievink jonas-schievink added A-linkage Area: linking into static, shared libraries and binaries E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Feb 15, 2021
@alexkornitzer
Copy link
Author

Hi @jonas-schievink, could you let me know how small the example needs to be? I have managed to shrink it to just reqwest & tokio, but might be able to get it much smaller assuming I dont need intimate compiler knowledge in order to guess what the issue could potentially be.
https://github.com/alexkornitzer/dylib-errors/tree/error/tokio

@jonas-schievink
Copy link
Contributor

Ideally it would not contain any external dependencies

@alexkornitzer
Copy link
Author

alexkornitzer commented Feb 15, 2021

Okay let me see if I can isolate it down further, but it might be beyond me.

Musings

Not managed to reduce it down yet but I have observed the following which seems interesting, when using reqwest "0.11" which fails the libshared.so tries to link against libhyper-*.so:

        linux-vdso.so.1 (0x00007fff2f1bd000)
	libhyper-e9510aa4920192e8.so => not found
	libstd-6f77337c1826707d.so => not found
	libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f0536a4c000)
	libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f053676e000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f0536754000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f0536733000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f0536564000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007f0537707000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f053655d000)

but if we drop to reqwest "0.10" which succeeds then this .so is missing:

	linux-vdso.so.1 (0x00007ffea26f3000)
	libstd-6f77337c1826707d.so => not found
	libssl.so.1.1 => /usr/lib/libssl.so.1.1 (0x00007f8294541000)
	libcrypto.so.1.1 => /usr/lib/libcrypto.so.1.1 (0x00007f8294263000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f8294249000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8294228000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8294221000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f8294052000)
	/usr/lib64/ld-linux-x86-64.so.2 (0x00007f8295434000)

and if we try and bring hyper "0.14" straight into the shared lib we get dep tree errors:

error: cannot satisfy dependencies so `hyper` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: aborting due to previous error

error: could not compile `serverctl`

but not with hyper "0.13", I wonder if this dep tree issue is the problem?

@alexkornitzer
Copy link
Author

alexkornitzer commented Feb 15, 2021

Hey @jonas-schievink,

Right got it, so its looks like the issue is when you have the following:

application <- shared (dylib) <- foo (rlib) <- bar (["lib", "staticlib", "cdylib"])

where shared is accessing bar by calling foo::bar where foo re-exports bar.

---bar
pub struct Bar;
pub fn bar() -> Bar {
  Bar
}

---foo
pub use bar::bar;
pub struct Foo;
pub fn foo() -> Foo {
  Foo
}

--shared
pub struct Test;
impl Test {
  pub fn new() -> Self {
    let _ = foo::foo();
    let _ = foo::bar();
    Self
  }
}

--app
fn main() {
  let _ = shared::Test::new();
}

I have a minimal example here: https://github.com/alexkornitzer/dylib-errors/tree/error/nested

@jonas-schievink jonas-schievink added I-prioritize Issue: Indicates that prioritization has been requested for this issue. and removed E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example labels Feb 15, 2021
@hameerabbasi
Copy link
Contributor

hameerabbasi commented Feb 17, 2021

Bisected, but this goes back to at least 2018-01-01. I ran cargo-bisect-rustc --test-dir=. --start=<date> with date being the first day of 2018, 2019, and 2020. Got errors of the form:

ERROR: the start of the range (nightly-<date>) must not reproduce the regression

@apiraino
Copy link
Contributor

apiraino commented Feb 17, 2021

@rustbot label I-nominated

We would like the compiler team to have a closer look at this (tomorrow during the meeting) to help assessing the implicatons (Zulip discussion)

@nagisa nagisa removed the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Feb 25, 2021
@apiraino
Copy link
Contributor

Assigning P-high as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@rustbot label -I-prioritize +P-high

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Feb 25, 2021
@nagisa
Copy link
Member

nagisa commented Mar 11, 2021

Potentially related to #56784

@pnkfelix
Copy link
Member

looking at aforementioned example from comment above ...

I have a minimal example here: https://github.com/alexkornitzer/dylib-errors/tree/error/nested

... It seems like something is different between stable/beta and nightly here, because here's what I see on this reduced test case:

Click to see output
% rustc +stable --version
rustc 1.50.0 (cb75ad5db 2021-02-10)
% rustc +beta --version
rustc 1.51.0-beta.6 (6a1835ad7 2021-03-12)
% rustc +nightly --version
rustc 1.52.0-nightly (107896c32 2021-03-15)
% cargo +stable build
   Compiling bar v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/bar)
   Compiling foo v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/foo)
   Compiling shared v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/shared)
   Compiling serverctl v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/serverctl)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/pnkfelix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debu\
g/deps/serverctl-642e3662be52c6ef.28rusxpaitpdkpbf.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-642e3662be52c6ef.2xx1yk5xpkast9tl.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-642\
e3662be52c6ef.2zhtm7t7vp8cvj7s.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-642e3662be52c6ef.36qkof5ube8vo2b4.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-642e3662be52c6ef.3madvt\
h8zr5q2ma6.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-642e3662be52c6ef.8zawlhhi2fxrgml.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-642e3662be52c6ef.fexpwlmspuji93d.rcgu.o" "-o\
" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-642e3662be52c6ef" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-L" "/home/pnkfel\
ix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-lshared" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-lba\
r" "-Wl,--start-group" "-L" "/home/pnkfelix/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-6f77337c1826707d" "-Wl,--end-group" "-Wl,-Bstatic" "/home/pnkfelix/.rustup/toolchains/stable-x86_64-unknown-li\
nux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-d36087076e1dd756.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
  = note: /usr/bin/ld: /media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/libshared.so: undefined reference to `bar::bar'
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `serverctl`

To learn more, run the command again with --verbose.
% cargo +beta build
   Compiling bar v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/bar)
   Compiling foo v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/foo)
   Compiling shared v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/shared)
   Compiling serverctl v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/serverctl)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/pnkfelix/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/\
deps/serverctl-2e2840cf7d082ebe.2tw89ydr2vaopk7g.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-2e2840cf7d082ebe.343edvd2044ixf22.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-2e284\
0cf7d082ebe.3nj5822awiovzjf.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-2e2840cf7d082ebe.3wbp9hhnvmlx8kc8.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-2e2840cf7d082ebe.4hc0pgqcp\
fq2cts9.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-2e2840cf7d082ebe.c2mibyzt4rt6ta3.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-2e2840cf7d082ebe.nj2vcu3x1adrnm9.rcgu.o" "-o" "\
/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-2e2840cf7d082ebe" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-L" "/home/pnkfelix/\
.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-lshared" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-lbar" "-\
Wl,--start-group" "-L" "/home/pnkfelix/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-6945ccf6d83f593c" "-Wl,--end-group" "-Wl,-Bstatic" "/home/pnkfelix/.rustup/toolchains/beta-x86_64-unknown-linux-gnu/l\
ib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-ab7901d69c9d509b.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
  = note: /usr/bin/ld: /media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/libshared.so: undefined reference to `bar::bar'
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `serverctl`

To learn more, run the command again with --verbose.
% cargo +nightly build
   Compiling bar v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/bar)
   Compiling foo v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/foo)
   Compiling shared v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/shared)
   Compiling serverctl v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/serverctl)
error: cannot satisfy dependencies so `std` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `compiler_builtins` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `rustc_std_workspace_core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `libc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `cfg_if` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `hashbrown` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `rustc_std_workspace_alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `rustc_demangle` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `addr2line` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `gimli` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `object` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `miniz_oxide` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `adler` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
error: cannot satisfy dependencies so `panic_unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `bar` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: aborting due to 18 previous errors

error: could not compile `serverctl`

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

(I also think the nightly behavior seems better. The diagnostic we see with those nightly runs is not itself new though; it dates from PR #64324 in 2019... so something must have changed elsewhere to make rustc's control flow start flowing into that code path.

@pnkfelix
Copy link
Member

pnkfelix commented Mar 16, 2021

Wow, that is actually a very recent change, introduced in between nightlies for 2021-03-14 and 2021-03-15 ...!

@pnkfelix
Copy link
Member

pnkfelix commented Mar 16, 2021

cargo-bisect-rustc result:

searched toolchains acca818 through d6eaea1


Regression in 1381dcf


searched nightlies: from nightly-2021-03-13 to nightly-2021-03-15
regressed nightly: nightly-2021-03-15
searched commits: from acca818 to d6eaea1
regressed commit: 1381dcf

bisected with cargo-bisect-rustc v0.6.0

Host triple: x86_64-unknown-linux-gnu
Reproduce with:

cargo bisect-rustc --access github --start 2021-03-13 --end 2021-03-15 --prompt

@pnkfelix
Copy link
Member

Hmm well now I'm wondering if a change to cargo is what caused the change in behavior between 2021-03-14 and 2021-03-15...

at least, my attempts to investigate via local builds of rustc itself have been flummoxed. And I think these commands lines provide an argument that the change there is due to a change in cargo itself, not rustc:

Click to see a pair of invocations, both (attempting to?) override the rustc version to keep it fixed while also selecting different `cargo` version to drive the build
21-13-22 issue_82151/dylib-errors (git:error/nested) [ERROR#1] % ( RUSTC=/home/pnkfelix/.rustup/toolchains/nightly-2021-03-15-x86_64-unknown-linux-gnu/bin/rustc ; V=nightly-2021-03-14 ; cargo +$V clean ; cargo +$V -\
-version ; cargo +$V build  )
cargo 1.52.0-nightly (970bc67c3 2021-03-07)
   Compiling bar v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/bar)
   Compiling foo v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/foo)
   Compiling shared v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/shared)
   Compiling serverctl v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/serverctl)
error: linking with `cc` failed: exit code: 1
  |
  = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,--eh-frame-hdr" "-L" "/home/pnkfelix/.rustup/toolchains/nightly-2021-03-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/media\
/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-6c04b63e1d5ee98d.266n9v3ct69lmd5x.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-6c04b63e1d5ee98d.36w4j5atbcbca\
9ft.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-6c04b63e1d5ee98d.4aoqsl8y7dke2vsk.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-6c04b63e1d5\
ee98d.4kwx94anssc9hetr.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-6c04b63e1d5ee98d.54ihl5vihuy8m9gk.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/se\
rverctl-6c04b63e1d5ee98d.gssdicypgme7176.rcgu.o" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/serverctl-6c04b63e1d5ee98d.r966a0ktyvsy5up.rcgu.o" "-o" "/media/pnkfelix/Rust/issue_82151/dylib-error\
s/target/debug/deps/serverctl-6c04b63e1d5ee98d" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-nodefaultlibs" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-L" "/home/pnkfelix/.rust\
up/toolchains/nightly-2021-03-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-L" "/media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps" "-lshared" "-L" "/media/pnkfelix/Rust/issue_\
82151/dylib-errors/target/debug/deps" "-lbar" "-Wl,--start-group" "-L" "/home/pnkfelix/.rustup/toolchains/nightly-2021-03-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-lstd-3d933644112ba794\
" "-Wl,--end-group" "-Wl,-Bstatic" "/home/pnkfelix/.rustup/toolchains/nightly-2021-03-14-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-761b290f47712921.rlib" "-Wl,-Bdynamic" \
"-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc"
  = note: /usr/bin/ld: /media/pnkfelix/Rust/issue_82151/dylib-errors/target/debug/deps/libshared.so: undefined reference to `bar::bar'
          collect2: error: ld returned 1 exit status


error: aborting due to previous error

error: could not compile `serverctl`

To learn more, run the command again with --verbose.
21-13-44 issue_82151/dylib-errors (git:error/nested) [ERROR#1] % ( RUSTC=/home/pnkfelix/.rustup/toolchains/nightly-2021-03-15-x86_64-unknown-linux-gnu/bin/rustc ; V=nightly-2021-03-15 ; cargo +$V clean ; cargo +$V -\
-version ; cargo +$V build  )
cargo 1.52.0-nightly (32da9eaa5 2021-03-13)
   Compiling bar v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/bar)
   Compiling foo v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/foo)
   Compiling shared v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/shared)
   Compiling serverctl v0.1.0 (/media/pnkfelix/Rust/issue_82151/dylib-errors/serverctl)
error: cannot satisfy dependencies so `std` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `compiler_builtins` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `rustc_std_workspace_core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `libc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `cfg_if` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `hashbrown` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `rustc_std_workspace_alloc` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `rustc_demangle` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `addr2line` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `gimli` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `object` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `miniz_oxide` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `adler` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `panic_unwind` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `bar` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: aborting due to 18 previous errors

error: could not compile `serverctl`

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

@pnkfelix
Copy link
Member

pnkfelix commented Mar 17, 2021

@alexkornitzer It looks to me like the nightly version of cargo produces a different, more actionable error for this scenario. (I.e. I ran it on the other less reduced test cases, and they produce an error similar to what I pasted in my previous comment, which complains about the mix of different formats for upstream crates).

While I imagine that this outcome is not ideal for you, I am still curious whether it at least gives you something you can act on? (In other words, I'm trying to figure out how to triage this issue, given the changes in its behavior after the cargo change.)

@pnkfelix
Copy link
Member

pnkfelix commented Mar 17, 2021

1I will say the fact that two of the messages are:

error: cannot satisfy dependencies so `std` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away

error: cannot satisfy dependencies so `core` only shows up once
  |
  = help: having upstream crates all available in one format will likely make this go away
...

does seem unhelpful. At least, without knowing why std/core are showing up multiple times, knowing what action to take is tough.

@alexkornitzer
Copy link
Author

@pnkfelix thanks for looking into this. I think what you have discovered with the new cargo nightly is what the correct output should be. You can get that with stable cargo with a less complex chain. So my assumption here is that the show once... is the true cause of the issue.

For my current use case, being able to compile into a single shared library would solve the problem for me. As with the hyper example, cargo is trying to build that as a shared library when what I really want is for it to be built into the single shared library. I believe the second case should compile without error, as if I fork hyper and force it to be an rlib the error goes away. The issue here is that we can't tell cargo to do that, i.e. we cant specify which of the lib types to use.

As to solving the use case of having everything shared as you say this might be a more difficult one to solve, but I am not able to comment on this as my rust compiler knowledge is non existent :)

@bjorn3
Copy link
Member

bjorn3 commented Sep 1, 2021

I think the linker error is caused by rustc thinking that the cdylib of hyper is a dylib because both have the same extension Only dylib exports the required functions for linking to succeed. Rustc currently doesn't check that a dynamic library contains crate metadata if there is an rmeta or rlib of the same name:

// We currently do not verify that these other sources are even in sync,
// and this is arguably a bug (see #10786), but because reading metadata
// is quite slow (especially from dylibs) we currently do not read it
// from the other crate sources.

@petrochenkov
Copy link
Contributor

We may be able to fix that "arguably a bug", because dylibs are rare in practice now, most of crate searches will not encounter a dylib candidate.

fpoli added a commit to viperproject/prusti-dev that referenced this issue Nov 5, 2021
This reverts commit 5727de3.

The upgrade seems to be blocked by rust-lang/rust#82151
@fpoli
Copy link
Contributor

fpoli commented Nov 5, 2021

In our project we use rustc nightly-2021-10-15 and we encountered this issue while trying to upgrade from hyper 0.13, warp 0.2, reqwest 0.10 and tokio 0.2 to hyper 0.14, warp 0.3, reqwest 0.11 and tokio 1.2. Is there any workaround other than downgrading those libraries?

@apiraino
Copy link
Contributor

apiraino commented Nov 5, 2021

@fpoli I am not too familiar with this issue, but I am wondering if @alexkornitzer workaround in alexkornitzer/hyper@1199048 would help (assuming is it ok for you to vendor hyper, which might not as well)

@fpoli
Copy link
Contributor

fpoli commented Nov 5, 2021

@fpoli I am not too familiar with this issue, but I am wondering if @alexkornitzer workaround in alexkornitzer/hyper@1199048 would help (assuming is it ok for you to vendor hyper, which might not as well)

Thanks! So, that would solve the issue in hyper, but it cannot be upstreamed because hyper also wants to compile to a library usable from C. In our case sticking with the old version of the libraries is still preferable (for now).

@pnkfelix
Copy link
Member

pnkfelix commented Dec 16, 2022

from conversation above

We may be able to fix that "arguably a bug", because dylibs are rare in practice now, most of crate searches will not encounter a dylib candidate.

It sounds like this might be the right next step. I'm already spending some amount of time looking at linker issues (and this is already assigned to me), so I can continue down this path.

(We might want an MCP for the suggested change, in any case.)

@bjorn3
Copy link
Member

bjorn3 commented Jul 14, 2023

Opened #113695 with a fix for what I am pretty sure is the root cause here. (The test I added fails with the same linker issue before that PR at least.)

@bors bors closed this as completed in b14fd23 Jul 20, 2023
github-actions bot pushed a commit to rust-lang/miri that referenced this issue Jul 22, 2023
…nkfelix,petrochenkov

Verify that all crate sources are in sync

This ensures that rustc will not attempt to link against a cdylib as if it is a rust dylib when an rlib for the same crate is available. Previously rustc didn't actually check if any further formats of a crate which has been loaded are of the same version and if they are actually valid. This caused a cdylib to be interpreted as rust dylib as soon as the corresponding rlib was loaded. As cdylibs don't export any rust symbols, linking would fail if rustc decides to link against the cdylib rather than the rlib.

Two crates depended on the previous behavior by separately compiling a test crate as both rlib and dylib. These have been changed to capture their original spirit to the best of my ability while still working when rustc verifies that all crates are in sync. It is unlikely that build systems depend on the current behavior and in any case we are taking a lot of measures to ensure that any change to either the source or the compilation options (including crate type) results in rustc rejecting it as incompatible. We merely didn't do this check here for now obsolete perf reasons.

Fixes rust-lang/rust#10786
Fixes rust-lang/rust#82151
Fixes rust-lang/rust#82972
Closes bevy-cheatbook/bevy-cheatbook#114
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries C-bug Category: This is a bug. P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
10 participants