NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-amd64/57265: Cross-build broken from Linux amd64 to NetBSD amd64
>Number: 57265
>Category: port-amd64
>Synopsis: Cross-build broken from Linux amd64 to NetBSD amd64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-amd64-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Mar 09 16:10:00 +0000 2023
>Originator: Jan-Benedict Glaw
>Release: NetBSD src TRUNK
>Organization:
>Environment:
Linux lili 5.16.0-4-amd64 #1 SMP PREEMPT Debian 5.16.12-1 (2022-03-08) x86_64 GNU/Linux
>Description:
There is an interesting interaction of local host libs vs. newly build NetBSD target libs. When attempting to cross-build NetBSD amd64/x86_64 from a Linux amd64 box, build breaks as zlib is built.
The symptom is that when nbmandoc is called (worked endless times before), it won't find "libc.so.12" as soon as libz.so got build. So my guess is that the GNU libc ld.so tries to start nbmandoc, encounters the freshly build *target* libz and tries to link it, which may pull in target libc.
This cross-compilation used to always fail for me, it though had a phase (where a lot was updates) where it worked. But that was a short-lifed exception.
A build log for a recent build attempt (even with -N 4) can be found at http://toolchain.lug-owl.de/laminar/log/netbsd-amd64-x86_64/11 .
[bld rls 2023-03-09 11:51:40] # build libz/libz.so.1.0
[bld rls 2023-03-09 11:51:40] rm -f libz.so.1.0
[bld rls 2023-03-09 11:51:40] + rm -f libz.so.1.0
[bld rls 2023-03-09 11:51:40] /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/bin/x86_64--netbsd-gcc -shared -Wl,-soname,libz.so.1 -Wl,--warn-shared-textrel -Wl,-Map=libz.so.1.map --sysroot=/var/lib/laminar/run/netbsd-amd64-x86_64/11/dest-amd64-x86_64 -Wl,--warn-shared-textrel -Wl,-z,relro -o libz.so.1.0.tmp -Wl,-rpath,/lib -L=/lib -Wl,-x -Wl,--whole-archive libz_pic.a -Wl,--no-whole-archive
[bld rls 2023-03-09 11:51:40] + /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/bin/x86_64--netbsd-gcc -shared -Wl,-soname,libz.so.1 -Wl,--warn-shared-textrel -Wl,-Map=libz.so.1.map --sysroot=/var/lib/laminar/run/netbsd-amd64-x86_64/11/dest-amd64-x86_64 -Wl,--warn-shared-textrel -Wl,-z,relro -o libz.so.1.0.tmp -Wl,-rpath,/lib -L=/lib -Wl,-x -Wl,--whole-archive libz_pic.a -Wl,--no-whole-archive
[bld rls 2023-03-09 11:51:40] mv -f libz.so.1.0.tmp libz.so.1.0
[bld rls 2023-03-09 11:51:40] + mv -f libz.so.1.0.tmp libz.so.1.0
[bld rls 2023-03-09 11:51:40] ln -sf libz.so.1.0 libz.so.1.tmp
[bld rls 2023-03-09 11:51:40] + ln -sf libz.so.1.0 libz.so.1.tmp
[bld rls 2023-03-09 11:51:40] mv -f libz.so.1.tmp libz.so.1
[bld rls 2023-03-09 11:51:40] + mv -f libz.so.1.tmp libz.so.1
[bld rls 2023-03-09 11:51:40] ln -sf libz.so.1.0 libz.so.tmp
[bld rls 2023-03-09 11:51:40] + ln -sf libz.so.1.0 libz.so.tmp
[bld rls 2023-03-09 11:51:40] mv -f libz.so.tmp libz.so
[bld rls 2023-03-09 11:51:40] + mv -f libz.so.tmp libz.so
[bld rls 2023-03-09 11:51:40] echo '# ' " format " libz/zlib.html3
[bld rls 2023-03-09 11:51:40] + echo # format libz/zlib.html3
[bld rls 2023-03-09 11:51:40] # format libz/zlib.html3
[bld rls 2023-03-09 11:51:40] if test "" != "yes"; then /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/bin/nbmandoc -Thtml -Oman=../html%S/%N.html,style=../style.css /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/lib/libz/zlib.3 > zlib.html3.tmp && mv -f zlib.html3.tmp zlib.html3; else GROFF_ENCODING= GROFF_BIN_PATH=/var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/lib/groff GROFF_FONT_PATH=/var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/share/groff/site-font:/var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/share/groff/font GROFF_TMAC_PATH=/var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/share/groff/site-tmac:/var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/share/groff/tmac /var/lib/laminar/run/
netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/bin/nbgroff -dpaper=letter -Tlatin1 -mdoc2html /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/lib/libz/zlib.3 > zlib.html3.tmp && mv -f zlib.html3.tmp zlib.html3; fi
[bld rls 2023-03-09 11:51:40] + test != yes
[bld rls 2023-03-09 11:51:40] + /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/bin/nbmandoc -Thtml -Oman=../html%S/%N.html,style=../style.css /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/lib/libz/zlib.3
[bld rls 2023-03-09 11:51:40] /var/lib/laminar/run/netbsd-amd64-x86_64/11/NetBSD-src/obj/tooldir.Linux-5.16.0-4-amd64-x86_64/bin/nbmandoc: error while loading shared libraries: libc.so.12: cannot open shared object file: No such file or directory
>How-To-Repeat:
On a amd64 Linux box:
./build.sh -N 4 -P -U -m amd64 -a x86_64 -E -D /var/lib/laminar/run/netbsd-amd64-x86_64/11/dest-amd64-x86_64 -R /var/lib/laminar/run/netbsd-amd64-x86_64/11/release-amd64-x86_64 tools
./build.sh -N 4 -P -U -u -m amd64 -a x86_64 -E -D /var/lib/laminar/run/netbsd-amd64-x86_64/11/dest-amd64-x86_64 -R /var/lib/laminar/run/netbsd-amd64-x86_64/11/release-amd64-x86_64 release
>Fix:
I *guess* a LD_LIBRARY_PATH with '.' or the $DESTDIR/lib or something similar sneaked in.
Home |
Main Index |
Thread Index |
Old Index