Skip to content

Fails to link reqwest libary in 1.93.1 on macOS #153237

@xlla

Description

@xlla

I tried this code:

cargo install espup

I expected to see this happen: the package was installed

Instead, this happened:

 = note: Undefined symbols for architecture x86_64:
            "_SecTrustEvaluateWithError", referenced from:
                security_framework::secure_transport::MidHandshakeClientBuilder$LT$S$GT$::handshake::h19baeebd26d27481 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
                security_framework::secure_transport::MidHandshakeClientBuilder$LT$S$GT$::handshake::h1c2d750313380c64 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
                security_framework::secure_transport::MidHandshakeClientBuilder$LT$S$GT$::handshake::hc4b8cd985c3e7855 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
            "_SSLSetALPNProtocols", referenced from:
                security_framework::secure_transport::SslContext::set_alpn_protocols::h9c573fd82dc3d5d2 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'v heard Apple do not export "SSLSetALPNProtocols" function actual until macosx 10.13.4,
I have install rust use rustup, when not export MACOSX_DEPLOYMENT_TARGET env , it default target is 10.12

rustc --print=deployment-target
deployment_target=10.12

I don't know if this is the root cause, maybe the rust lib security_framework (who use SSLSetALPNProtocols directly) was build on target 10.12?

I were uninstall rust and export MACOSX_DEPLOYMENT_TARGET=10.14, then reinstall rust,
same error while call cargo install, as you can see, final link argument include

"mmacosx-version-min=10.14.0"

Meta

rustc --version --verbose:

rustc 1.93.1 (01f6ddf75 2026-02-11)
binary: rustc
commit-hash: 01f6ddf7588f42ae2d7eb0a2f21d44e8e96674cf
commit-date: 2026-02-11
host: x86_64-apple-darwin
release: 1.93.1
LLVM version: 21.1.8
Backtrace

    Updating crates.io index
  Installing espup v0.16.0
     Locking 344 packages to latest compatible versions
      Adding generic-array v0.14.7 (available: v0.14.9)
      Adding reqwest v0.12.28 (available: v0.13.2)
      Adding strum v0.27.2 (available: v0.28.0)
      Adding zip v5.1.1 (available: v8.1.0)
   Compiling libc v0.2.182
   Compiling proc-macro2 v1.0.106
   Compiling unicode-ident v1.0.24
   Compiling quote v1.0.44
   Compiling cfg-if v1.0.4
   Compiling find-msvc-tools v0.1.9
   Compiling shlex v1.3.0
   Compiling memchr v2.8.0
   Compiling smallvec v1.15.1
   Compiling bytes v1.11.1
   Compiling once_cell v1.21.3
   Compiling pkg-config v0.3.32
   Compiling version_check v0.9.5
   Compiling pin-project-lite v0.2.17
   Compiling typenum v1.19.0
   Compiling bitflags v2.11.0
   Compiling parking_lot_core v0.9.12
   Compiling generic-array v0.14.7
   Compiling itoa v1.0.17
   Compiling stable_deref_trait v1.2.1
   Compiling scopeguard v1.2.0
   Compiling lock_api v0.4.14
   Compiling jobserver v0.1.34
   Compiling futures-core v0.3.32
   Compiling errno v0.3.14
   Compiling socket2 v0.6.2
   Compiling syn v2.0.117
   Compiling signal-hook-registry v1.4.8
   Compiling mio v1.1.1
   Compiling cc v1.2.56
   Compiling parking_lot v0.12.5
   Compiling http v1.4.0
   Compiling log v0.4.29
   Compiling rustix v1.1.4
   Compiling core-foundation-sys v0.8.7
   Compiling futures-sink v0.3.32
   Compiling subtle v2.6.1
   Compiling getrandom v0.2.17
   Compiling simd-adler32 v0.3.8
   Compiling httparse v1.10.1
   Compiling zerocopy v0.8.40
   Compiling serde_core v1.0.228
   Compiling litemap v0.8.1
   Compiling writeable v0.6.2
   Compiling crypto-common v0.1.7
   Compiling slab v0.4.12
   Compiling percent-encoding v2.3.2
   Compiling adler2 v2.0.1
   Compiling miniz_oxide v0.8.9
   Compiling block-buffer v0.10.4
   Compiling getrandom v0.3.4
   Compiling ring v0.17.14
   Compiling getrandom v0.4.1
   Compiling icu_properties_data v2.1.2
   Compiling utf8parse v0.2.2
   Compiling hashbrown v0.16.1
   Compiling crc32fast v1.5.0
   Compiling icu_normalizer_data v2.1.1
   Compiling equivalent v1.0.2
   Compiling anstyle-parse v0.2.7
   Compiling zstd-sys v2.0.16+zstd.1.5.7
   Compiling digest v0.10.7
   Compiling http-body v1.0.1
   Compiling tracing-core v0.1.36
   Compiling anstyle-query v1.1.5
   Compiling indexmap v2.13.0
   Compiling is_terminal_polyfill v1.70.2
   Compiling futures-task v0.3.32
   Compiling system-configuration-sys v0.6.0
   Compiling base64 v0.22.1
   Compiling heck v0.5.0
   Compiling serde v1.0.228
   Compiling futures-io v0.3.32
   Compiling anstyle v1.0.13
   Compiling colorchoice v1.0.4
   Compiling futures-util v0.3.32
   Compiling tracing v0.1.44
   Compiling anstream v0.6.21
   Compiling openssl-src v300.5.5+3.5.5
   Compiling security-framework-sys v2.17.0
   Compiling synstructure v0.13.2
   Compiling core-foundation v0.10.1
   Compiling zmij v1.0.21
   Compiling fnv v1.0.7
   Compiling object v0.37.3
   Compiling try-lock v0.2.5
   Compiling atomic-waker v1.1.2
   Compiling vcpkg v0.2.15
   Compiling native-tls v0.2.18
   Compiling untrusted v0.9.0
   Compiling fastrand v2.3.0
   Compiling unicode-width v0.2.2
   Compiling tower-service v0.3.3
   Compiling cpufeatures v0.2.17
   Compiling tempfile v3.26.0
   Compiling openssl-sys v0.9.111
   Compiling want v0.3.1
   Compiling security-framework v3.7.0
   Compiling zerofrom-derive v0.1.6
   Compiling yoke-derive v0.8.1
   Compiling tokio-macros v2.6.0
   Compiling zerovec-derive v0.11.2
   Compiling tokio v1.49.0
   Compiling displaydoc v0.2.5
   Compiling zeroize_derive v1.4.3
   Compiling zerofrom v0.1.6
   Compiling yoke v0.8.1
   Compiling ppv-lite86 v0.2.21
   Compiling zerovec v0.11.5
   Compiling zerotrie v0.2.3
   Compiling zeroize v1.8.2
   Compiling rustls-pki-types v1.14.0
   Compiling serde_derive v1.0.228
   Compiling futures-channel v0.3.32
   Compiling tinystr v0.8.2
   Compiling potential_utf v0.1.4
   Compiling icu_collections v2.1.1
   Compiling icu_locale_core v2.1.1
   Compiling core-foundation v0.9.4
   Compiling aho-corasick v1.1.4
   Compiling regex-syntax v0.8.10
   Compiling serde_json v1.0.149
   Compiling clap_lex v1.0.0
   Compiling portable-atomic v1.13.1
   Compiling icu_provider v2.1.1
   Compiling icu_properties v2.1.2
   Compiling icu_normalizer v2.1.1
   Compiling rustls v0.23.37
   Compiling gimli v0.32.3
   Compiling zstd-safe v7.2.4
   Compiling strsim v0.11.1
   Compiling zlib-rs v0.6.2
   Compiling pin-utils v0.1.0
   Compiling clap_builder v4.5.60
   Compiling idna_adapter v1.2.1
   Compiling regex-automata v0.4.14
   Compiling tokio-util v0.7.18
   Compiling h2 v0.4.13
   Compiling addr2line v0.25.1
   Compiling system-configuration v0.7.0
   Compiling flate2 v1.1.9
   Compiling clap_derive v4.5.55
   Compiling hyper v1.8.1
   Compiling rand_core v0.9.5
   Compiling rustls-webpki v0.103.9
   Compiling lzma-sys v0.1.20
   Compiling form_urlencoded v1.2.2
   Compiling inout v0.1.4
   Compiling rand_core v0.6.4
   Compiling sync_wrapper v1.0.2
   Compiling tower-layer v0.3.3
   Compiling ipnet v2.11.0
   Compiling utf8_iter v1.0.4
   Compiling owo-colors v4.3.0
   Compiling powerfmt v0.2.0
   Compiling rustc-demangle v0.1.27
   Compiling crc-catalog v2.4.0
   Compiling crc v3.4.0
   Compiling deranged v0.5.8
   Compiling hyper-util v0.1.20
   Compiling idna v1.1.0
   Compiling tower v0.5.3
   Compiling backtrace v0.3.76
   Compiling rand_chacha v0.3.1
   Compiling cipher v0.4.4
   Compiling rand_chacha v0.9.0
   Compiling clap v4.5.60
   Compiling tokio-native-tls v0.3.1
   Compiling regex v1.12.3
   Compiling webpki-roots v1.0.6
   Compiling pin-project-internal v1.1.11
   Compiling console v0.16.2
   Compiling sha2 v0.10.9
   Compiling ureq-proto v0.5.3
   Compiling http-body-util v0.1.3
   Compiling hmac v0.12.1
   Compiling foreign-types-shared v0.1.1
   Compiling unicode-linebreak v0.1.5
   Compiling is_ci v1.2.0
   Compiling ryu v1.0.23
   Compiling num-conv v0.2.0
   Compiling thiserror v2.0.18
   Compiling utf-8 v0.7.6
   Compiling option-ext v0.2.0
   Compiling unit-prefix v0.5.2
   Compiling libbz2-rs-sys v0.2.2
   Compiling iri-string v0.7.10
   Compiling home v0.5.12
   Compiling time-core v0.1.8
   Compiling openssl v0.10.75
   Compiling bumpalo v3.20.2
   Compiling time v0.3.47
   Compiling zopfli v0.8.3
   Compiling bzip2 v0.6.1
   Compiling etcetera v0.10.0
   Compiling indicatif v0.18.4
   Compiling dirs-sys v0.5.0
   Compiling serde_urlencoded v0.7.1
   Compiling ureq v3.2.0
   Compiling textwrap v0.16.2
   Compiling hyper-tls v0.6.0
   Compiling supports-color v3.0.2
   Compiling tower-http v0.6.8
   Compiling pbkdf2 v0.12.2
   Compiling foreign-types v0.3.2
   Compiling pin-project v1.1.11
   Compiling lzma-rust2 v0.13.0
   Compiling env_filter v1.0.0
   Compiling rand v0.9.2
   Compiling zstd v0.13.3
   Compiling aes v0.8.4
   Compiling clap_complete v4.5.66
   Compiling backtrace-ext v0.2.1
   Compiling rand v0.8.5
   Compiling url v2.5.8
   Compiling strum_macros v0.27.2
   Compiling miette-derive v7.6.0
   Compiling openssl-macros v0.1.1
   Compiling thiserror-impl v2.0.18
   Compiling sha1 v0.10.6
   Compiling terminal_size v0.4.3
   Compiling xattr v1.6.1
   Compiling filetime v0.2.27
   Compiling errno v0.2.8
   Compiling encoding_rs v0.8.35
   Compiling constant_time_eq v0.3.1
   Compiling mime v0.3.17
   Compiling ppmd-rust v1.4.0
   Compiling unicode-width v0.1.14
   Compiling supports-hyperlinks v3.2.0
   Compiling semver v1.0.27
   Compiling deflate64 v0.1.11
   Compiling jiff v0.2.21
   Compiling supports-unicode v3.0.0
   Compiling miette v7.6.0
   Compiling strum v0.27.2
   Compiling update-informer v1.3.0
   Compiling zip v5.1.1
   Compiling guess_host_triple v0.1.5
   Compiling tar v0.4.44
   Compiling reqwest v0.12.28
   Compiling tokio-retry v0.3.0
   Compiling clap_complete_nushell v4.5.10
   Compiling retry v2.2.0
   Compiling xz2 v0.1.7
   Compiling indicatif-log-bridge v0.2.3
   Compiling directories v6.0.0
   Compiling tokio-stream v0.1.18
   Compiling async-trait v0.1.89
   Compiling lazy_static v1.5.0
   Compiling env_logger v0.11.9
   Compiling espup v0.16.0
error: linking with `cc` failed: exit status: 1
  |
  = note:  "cc" "<853 object files omitted>" "/var/folders/6j/gqhq_r1n0wg5qjypvtkccnqr0000gn/T/rustcOesgAV/{libring-7fab136ab845de38,libzstd_sys-0372529acce5b97d}.rlib" "<sysroot>/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-*.rlib" "-llzma" "-framework" "Security" "-framework" "SystemConfiguration" "-framework" "CoreFoundation" "-liconv" "-lSystem" "-lc" "-lm" "-arch" "x86_64" "-mmacosx-version-min=10.14.0" "-L" "/var/folders/6j/gqhq_r1n0wg5qjypvtkccnqr0000gn/T/cargo-install7zb9pZ/release/build/openssl-sys-1e505deb354ef6db/out/openssl-build/install/lib" "-L" "/var/folders/6j/gqhq_r1n0wg5qjypvtkccnqr0000gn/T/cargo-install7zb9pZ/release/build/ring-129a944132fefeac/out" "-L" "/var/folders/6j/gqhq_r1n0wg5qjypvtkccnqr0000gn/T/cargo-install7zb9pZ/release/build/zstd-sys-6689fb8673ef555e/out" "-L" "/usr/local/Cellar/xz/5.6.3/lib" "-o" "/var/folders/6j/gqhq_r1n0wg5qjypvtkccnqr0000gn/T/cargo-install7zb9pZ/release/deps/espup-780826b80210f062" "-Wl,-dead_strip" "-nodefaultlibs" "-mmacosx-version-min=10.14"
  = note: some arguments are omitted. use `--verbose` to show all linker arguments
  = note: Undefined symbols for architecture x86_64:
            "_SecTrustEvaluateWithError", referenced from:
                security_framework::secure_transport::MidHandshakeClientBuilder$LT$S$GT$::handshake::h19baeebd26d27481 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
                security_framework::secure_transport::MidHandshakeClientBuilder$LT$S$GT$::handshake::h1c2d750313380c64 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
                security_framework::secure_transport::MidHandshakeClientBuilder$LT$S$GT$::handshake::hc4b8cd985c3e7855 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
            "_SSLSetALPNProtocols", referenced from:
                security_framework::secure_transport::SslContext::set_alpn_protocols::h9c573fd82dc3d5d2 in espup-780826b80210f062.reqwest-42d1567d24bca02a.reqwest.7d5c4e106b362574-cgu.05.rcgu.o.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)
          

error: could not compile `espup` (bin "espup") due to 1 previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-discussionCategory: Discussion or questions that doesn't represent real issues.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions