Opened 3 months ago

Last modified 4 weeks ago

#31188 new defect

make[1]: don't know how to make ./src/rust/target/release/libtor_rust.a

Reported by: ng0 Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.4.0.5
Severity: Normal Keywords: 042-deferred-20190918
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi,

I'm trying to add the option to build tor with Rust to pkgsrc. On NetBSD 9 (8.99.48) amd64, this fails at the moment:

...

CC src/trunnel/libor_trunnel_a-socks5.oCC src/trunnel/libor_trunnel_a-netinfo.oCC src/trunnel/libor_trunnel_a-circpad_negotiation.oAR src/trunnel/libor-trunnel.aCC src/lib/trace/trace.oAR src/lib/libtor-trace.a

make[1]: don't know how to make ./src/rust/target/release/libtor_rust.a. Stop

make[1]: stopped in /usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5
* Error code 2

Stop.
make: stopped in /usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5
* Error code 1

Stop.
make[1]: stopped in /usr/pkgsrc/pkgsrc-ng0/tor
* Error code 1

Stop.
make: stopped in /usr/pkgsrc/pkgsrc-ng0/tor

rust and cargo are available in the build environment, and the crates are made available ahead of time and TOR_RUST_DEPENDENCIES points to the directory they are in.

Questions: to verify if I hit an error on tor's side or Rust specifics wrt NetBSD, and not on my side, do you support verbose builds?
If you have seen this kind of error before in to on other platforms, was there a resolution (I have seen 3 vaguely similar tickets).

Disclaimer: I'm a contributor to pkgsrc, but I'm not the pkgsrc maintainer for tor, so this is more of a personal exploration to see if I can propose it.

Thanks.

Child Tickets

Change History (4)

comment:1 in reply to:  description Changed 3 months ago by nickm

Replying to ng0:

Hi,

I'm trying to add the option to build tor with Rust to pkgsrc. On NetBSD 9 (8.99.48) amd64, this fails at the moment:

...

CC src/trunnel/libor_trunnel_a-socks5.oCC src/trunnel/libor_trunnel_a-netinfo.oCC src/trunnel/libor_trunnel_a-circpad_negotiation.oAR src/trunnel/libor-trunnel.aCC src/lib/trace/trace.oAR src/lib/libtor-trace.a

Oh, very odd. I hadn't seen that before! It sounds like for some reason the Makefile isn't getting a rule that tells it how to build libtor_rust.a. If you're comfortable looking through automake output, I'd suggest maybe looking through the Makefile to see what it is actually doing?

Also, maybe try running "make build-rust" manually to see whether that works, and builds a rust library?

rust and cargo are available in the build environment, and the crates are made available ahead of time and TOR_RUST_DEPENDENCIES points to the directory they are in.

Questions: to verify if I hit an error on tor's side or Rust specifics wrt NetBSD, and not on my side, do you support verbose builds?

Yes -- run "make V=1" instead of "make".

If you have seen this kind of error before in to on other platforms, was there a resolution (I have seen 3 vaguely similar tickets).

Disclaimer: I'm a contributor to pkgsrc, but I'm not the pkgsrc maintainer for tor, so this is more of a personal exploration to see if I can propose it.

Thanks.

comment:2 Changed 3 months ago by nickm

Milestone: Tor: 0.4.2.x-final

comment:3 Changed 3 months ago by ng0

Hi nickm, thanks for your reply.

Outside of the build-environment, but inside the folder (building by hand), `make build-rust` works:

make build-rust
( cd "/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust" ; CARGO_TARGET_DIR="/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/target" cargo build --release --frozen --manifest-path "/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/tor_rust/Cargo.toml" )

Compiling libc v0.2.39Compiling tor_allocate v0.0.1 (/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/tor_allocate)Compiling smartlist v0.0.1 (/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/smartlist)Compiling tor_log v0.1.0 (/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/tor_log)Compiling external v0.0.1 (/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/external)Compiling tor_util v0.0.1 (/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/tor_util)Compiling protover v0.0.1 (/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/protover)Compiling tor_rust v0.1.0 (/usr/work/pkgsrc-ng0/tor/work/tor-0.4.0.5/src/rust/tor_rust)

Finished release [optimized + debuginfo] target(s) in 8.58s

I'm comfortable by necessity with automake, so I can see if I can prepare a patch if I find anything, or just point out results. It will probably take some time until I can get back to this.

Last edited 3 months ago by ng0 (previous) (diff)

comment:4 Changed 4 weeks ago by nickm

Keywords: 042-deferred-20190918 added
Milestone: Tor: 0.4.2.x-finalTor: unspecified

Deferring various tickets from 0.4.2 to Unspecified.

Note: See TracTickets for help on using tickets.