Closed joseluisq closed 10 months ago
We need to add execinfo here: https://github.com/cross-rs/cross/blob/a537585f30dbda284e463769ceca1be39d4a67f1/docker/netbsd.sh#L81
For what it's worth - I've encountered the same issue (specifically missing -lexecinfo) with the only difference being that I'm using Podman instead of Docker.
here's a temporary workaround until an official fix is in place. Add this to Cargo.toml or wherever you keep your Cross configs:
[package.metadata.cross.target.x86_64-unknown-netbsd]
pre-build = [
"mkdir -p /tmp/netbsd",
"curl https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/amd64/binary/sets/base.tar.xz -O",
"tar -C /tmp/netbsd -xJf base.tar.xz",
"cp /tmp/netbsd/usr/lib/libexecinfo.so /usr/local/x86_64-unknown-netbsd/lib",
"rm base.tar.xz",
"rm -rf /tmp/netbsd",
]
@esheri3 thank you for the fix!
I was helping add a netbsd ci test to a repo (https://github.com/Byron/trash-rs/pull/90) and it was failing with the above issue:
https://github.com/Byron/trash-rs/actions/runs/6586046532/job/17893604558
I applied the fix suggested above which seems to have done the trick, but it started failing on something else I wasn't able to pin down:
https://github.com/Byron/trash-rs/actions/runs/6586482261/job/17894895647
In the end I "fixed" it by switching from cargo test
to cargo build
for netbsd:
https://github.com/Byron/trash-rs/actions/runs/6587609486
I'm somewhat baffled as to why the cargo test
fails when cargo build
works after this fix (the tests themselves run fine when run locally) so I'm just flagging this up here in case it is related / a side effect of the fix.
cc @byron @0323pin
Can we please release a new version that includes the fix?
@mcandre I'm aiming for a 0.3.0 release, see https://github.com/cross-rs/cross/discussions/1290 and https://github.com/cross-rs/cross/issues/1356
Checklist
Describe your issue
cross
0.2.5
no longer compiles my project after an upgrade of libc to0.2.149
.Basically, I got an
ld: cannot find -lexecinfo collect2: error: ld returned 1 exit status
error when I cross-compile from a Linux x86_64 machine tox86_64-unknown-netbsd
(mode details below)What target(s) are you cross-compiling for?
x86_64-unknown-netbsd
Which operating system is the host (e.g computer cross is on) running?
What architecture is the host?
What container engine is cross using?
cross version
cross 0.2.5
Example
See also the CI broken https://github.com/static-web-server/static-web-server/actions/runs/6519619958/job/17706311139#step:8:454
Additional information / notes
I do not get why libc
v0.2.149
fails on NetBSD recently and asks forexecinfo
. Maybe some change in 0.2.149?However, downgrading to
0.2.148
works for now.