#65607 closed defect (invalid)

rust -- [OSX 10.6.8] linking with `cc` failed [while building wheel for cryptography]

Reported by: lawlist Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: rust

Description (last modified by lawlist)

  • OSX 10.6.8 [Snow Leopard retail DVD, with update combo 10.6.8 from Apple, and Xcode 3.2.6]
  • I have _not_ upgraded the toolchain as described in the Macports document section entitled LibcxxOnOlderSystems.
  • The rust port has been successfully installed.
  • rustc --version --verbose
rustc 1.61.0
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-apple-darwin
release: 1.61.0
LLVM version: 14.0.0
  • Attempting to install tda-api in a virtual environment using either python39 or python310, both of which are installed ports, along with py39-virtualenv and py310-virtualenv, and py39-pip and py310-pip.
  • I have also installed the cargo port.
  • I have tried both _with_ and _without_ adding the following snippet to ~/.cargo/config
[target.x86_64-apple-darwin]
rustflags = [
  "-C", "link-arg=-undefined",
  "-C", "link-arg=dynamic_lookup",
]
  • The following command line options are being used in the terminal to recreate the problem during the install of tda-api.

export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/bin

/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/bin/virtualenv-3.9 -v /Users/HOME/.0.data/.0.emacs/.0.tda/.0.virtualenv

source /Users/HOME/.0.data/.0.emacs/.0.tda/.0.virtualenv/bin/activate

pip --cache-dir="/Users/HOME/.0.data/.0.emacs/.0.tda/.0.virtualenv/.0.cache" install tda-api

  • The entire terminal output is contained in the attached file named rust_001.log, and a relevant portion of the output is as follows:
      running build_rust
      cargo rustc --lib --manifest-path src/rust/Cargo.toml --release -v --features pyo3/extension-module pyo3/abi3-py36 -- --crate-type cdylib -C link-args=-undefined dynamic_lookup -Wl,-install_name,@rpath/_rust.abi3.so
         Compiling proc-macro2 v1.0.37
           Running `rustc --crate-name build_script_build --edition=2018 /Users/HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.37/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=8055abb1ce24abc7 -C extra-filename=-8055abb1ce24abc7 --out-dir /private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7 -L dependency=/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/deps --cap-lints allow -C link-arg=-undefined -C link-arg=dynamic_lookup`
      error: linking with `cc` failed: exit status: 1
        |
        = note: "cc" "-m64" "-arch" "x86_64" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.0.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.1.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.10.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.11.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.12.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.13.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.14.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.15.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.2.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.3.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.4.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.5.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.6.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.7.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.8.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.build_script_build.bc42eaa2-cgu.9.rcgu.o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7.7d2elwyutm9vcbk.rcgu.o" "-L" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/deps" "-L" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libstd-5ae51653233c3123.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-824f33e42152e8ad.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libobject-69ae51926f10bb57.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libmemchr-245445c928190b80.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libaddr2line-a0343ede66331927.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libgimli-d18052b3f2c44799.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-214396c7455eebbc.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libstd_detect-04fe1d4ba8284309.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libhashbrown-bb275db5534b8eac.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libminiz_oxide-eccddc93df08ba1a.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libadler-899dcd5e277779e4.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_alloc-f3953770a4f7c260.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libunwind-04937ee0dc84d4eb.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libcfg_if-3a8a8629c72cf068.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/liblibc-2c7b579ceb73107a.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/liballoc-efb34ae0db6de1f6.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-adb0cf783958c0b5.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libcore-b338f6e3114cd3ca.rlib" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-f3b83820ab311320.rlib" "-lSystem" "-lresolv" "-lc" "-lm" "-liconv" "-L" "/Users/HOME/.0.data/.0.emacs/.0.macports_2_7_2/lib/rustlib/x86_64-apple-darwin/lib" "-o" "/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7/build_script_build-8055abb1ce24abc7" "-Wl,-dead_strip" "-nodefaultlibs" "-undefined" "dynamic_lookup"
        = note: ld: -L must be immediately followed by a directory path (no space)
                collect2: ld returned 1 exit status
      
      
      error: could not compile `proc-macro2` due to previous error
      
      Caused by:
        process didn't exit successfully: `rustc --crate-name build_script_build --edition=2018 /Users/HOME/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro2-1.0.37/build.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debug-assertions=off -C overflow-checks=on --cfg 'feature="default"' --cfg 'feature="proc-macro"' -C metadata=8055abb1ce24abc7 -C extra-filename=-8055abb1ce24abc7 --out-dir /private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/build/proc-macro2-8055abb1ce24abc7 -L dependency=/private/var/folders/aO/aOdqdf55G6quYyy0Xi6mNE+++TI/-Tmp-/pip-install-wdgihclr/cryptography_40bf2c56ef174f8e9be605291d8124c4/src/rust/target/release/deps --cap-lints allow -C link-arg=-undefined -C link-arg=dynamic_lookup` (exit status: 1)

Attachments (1)

rust_001.log (36.3 KB) - added by lawlist 21 months ago.

Download all attachments as: .zip

Change History (3)

Changed 21 months ago by lawlist

Attachment: rust_001.log added

comment:1 Changed 21 months ago by lawlist

Description: modified (diff)

comment:2 Changed 16 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: invalid
Status: newclosed

Unfortunately, on older systems, the default build tools do not work.
In MacPorts, the rust PG goes to a great deal of trouble to set the compilers and the linker.
Also, the linker needs to be the one provided by MacPorts.

My suggestion would be to create a port for tda-api so that you can take advantage of the MacPorts infrastructure.

Note: See TracTickets for help on using tickets.