#25895: Cross-compiling tor rust for Windows is broken -------------------------------------------------+------------------------- Reporter: gk | Owner: ahf Type: defect | Status: | assigned Priority: High | Milestone: Tor: | 0.3.4.x-final Component: Core Tor/Tor | Version: Severity: Normal | Resolution: Keywords: rust, 034-proposed, tbb-wants, | Actual Points: 033-backport, 034-roadmap-proposed | Parent ID: #25849 | Points: Reviewer: | Sponsor: -------------------------------------------------+-------------------------
Comment (by Hello71): uh... are you sure you were actually cross compiling? right now cross- compiling tor rust for *anything* is probably broken, because it doesn't pass the CHOST in as the target. the cleanest way to do this AFAICT is: if CBUILD != CHOST, set `build.target = @CHOST@` in src/rust/.cargo/config, and set tor rust path to `src/rust/target/@CHOST@/release/@tor_rust_static_name@`. as far as I can tell, cargo does produce a `lib` file on Windows, and this is the correct extension for us. else, do not set build.target (`build.target = ''` causes an error), set tor rust path to `src/rust/target/release/@tor_rust_static_name@` (the same as it is now). you can see this at https://cgit.alxu.ca/tor.git/tree/src/rust?h=meson in `{,.cargo/,tor_rust/}meson.build`, `.cargo/config.in`, and `tor_rust/build.sh`. meson doesn't provide a target triple, so I ask the user to provide it. for autoconf, we would just use `@CHOST@`. https://github.com/japaric/rust-cross -- Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25895#comment:6> 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