#25977: Cross-compiling tor rust for macOS is broken
--------------------------+------------------------------------
 Reporter:  gk            |          Owner:  (none)
     Type:  defect        |         Status:  new
 Priority:  Medium        |      Milestone:  Tor: 0.3.4.x-final
Component:  Core Tor/Tor  |        Version:
 Severity:  Normal        |     Resolution:
 Keywords:  rust build    |  Actual Points:
Parent ID:  #25779        |         Points:
 Reviewer:                |        Sponsor:
--------------------------+------------------------------------
Changes (by gk):

 * status:  needs_information => new


Comment:

 Replying to [comment:6 teor]:
 > Ok, well, the error logs show some architectural mismatch. So we need to
 know what architecture the C and Rust object files are to help you
 further.
 >
 > Please run "file" on one of the C (libtor-testing.a) and one of the Rust
 (libtor_rust.a) files in the linker error messages.

 file src_or_libtor_testing_a-routerparse.o
 src_or_libtor_testing_a-routerparse.o: Mach-O 64-bit x86_64 object,
 flags:<|SUBSECTIONS_VIA_SYMBOLS>

 file tor_rust-2a73b8dbec958119.crate.allocator.rcgu.o
 tor_rust-2a73b8dbec958119.crate.allocator.rcgu.o: ELF 64-bit LSB
 relocatable, x86-64, version 1 (SYSV), not stripped

 > It might also help to check the timestamps on the lib files: are you
 sure they're not left over from an earlier build?

 Yes, I am. That's inside our tor-browser-build environment which uses
 clean docker containers for each new build.

 > Please also run the following Rust commands to determine the actual
 target triple being used:
 > {{{
 > rustc --version --verbose
 > cargo --version --verbose
 > rustup target list
 > }}}

 {{{
 debug-tor$ rustc --version --verbose
 rustc 1.25.0
 binary: rustc
 commit-hash: unknown
 commit-date: unknown
 host: x86_64-unknown-linux-gnu
 release: 1.25.0
 LLVM version: 6.0
 debug-tor$ cargo --version --verbose
 cargo 0.26.0
 release: 0.26.0
 }}}
 There is no `rustup` available.

 > Some of these commands might not be present, depending on how you
 installed rust.
 >
 > Please also provide the cargo command-line that make produces.
 > It should be something like:
 > {{{
 > cargo build --target x86_64-apple-darwin
 > }}}
 > But I wonder if the target is missing from the cargo command line.

 That seems to be the case:
 {{{
 make  all-am
 make[1]: Entering directory '/var/tmp/build/tor-d7bbfd0f6217'
 ( cd "/var/tmp/build/tor-d7bbfd0f6217/src/rust" ; \
         CARGO_TARGET_DIR="/var/tmp/build/tor-d7bbfd0f6217/src/rust/target"
 \
         CARGO_HOME="/var/tmp/build/tor-d7bbfd0f6217/src/rust" \
         cargo build --release  \
         --frozen \
                 --manifest-path "/var/tmp/build/tor-
 d7bbfd0f6217/src/rust/tor_rust/Cargo.toml" )

 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25977#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Reply via email to