tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Figuring out linking for Rust packages
I'm trying to translate this:
https://atomicules.co.uk/2019/01/17/Building-Spotifyd-on-NetBSD.html
Into pkgsrc:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=tree;f=spotifyd;h=8d79607930af6ec69d05354ef9a70a5e9ac52462;hb=HEAD
but am stuck on figuring out linking stuff. The right paths aren't.
getting passed to cc for the linking phase and I end up with:
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L".
"/usr/pkg/lib/rustlib/x86_64-unknown-netbsd/lib"
[removing most of this, but it does have:]
"-L" "/usr/lib"
[but /usr/pkg/lib never makes an appearance]
"-Wl,-Bdynamic" "-lpulse" "-lpulse-simple" "-lc" "-lutil" "-lutil".
"-lpthread" "-lgcc_s" "-lm" "-lutil" "-lutil"
= note: ld: cannot find -lpulse
ld: cannot find -lpulse-simple
As far as I can tell everything is there in the MAKE_ENV:
[...]
LDFLAGS=-L/usr/pkg/lib\ -Wl,-R/usr/pkg/lib\ -L/usr/pkg/lib/pulseaudio\
-Wl,-R/usr/pkg/lib/pulseaudio\ -L/usr/X11R7/lib\ -Wl,-R/usr/X11R7/lib\
-L/usr/lib\ -Wl,-R/usr/lib LINKER_RPATH_FLAG=-R
[...]
I.e. I see /usr/pkg/lib, although perhaps somehow is getting overridden by that
later `-R/usr/lib`?
I'm stumped so would appreciate any ideas/suggestions. I'm pretty sure it's
something dead simple I'm missing - I just haven't been able to figure it out.
I've mostly copied the tealdeer makefile as I had no idea it was even possible
to do Rust packages.
This is on NetBSD 8, amd64
_Worth mentioning, that if you try to build this, it needs a tweak to
`lang/rust/cargo.mk`, see the TODO file_
Home |
Main Index |
Thread Index |
Old Index