Actions
Bug #12217
closedadd ld assert-deflib and guidance to gate build
Start date:
Due date:
% Done:
100%
Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:
Description
Build on sparc is failing with:
Undefined first referenced symbol in file inet_pton pics/dhcp_inittab.o (symbol belongs to implicit dependency /lib/libnsl.so.1) inet_ntoa pics/dhcp_inittab.o (symbol belongs to implicit dependency /lib/libnsl.so.1) inet_ntop pics/dhcp_inittab.o (symbol belongs to implicit dependency /lib/libnsl.so.1) ld: fatal: symbol referencing errors. No output written to libdhcputil.so.1
The actual issue is not about missing -lnsl option, the libc was not built due to other errors and libdhcputil was linked against build host libc instead. Since that libc was old enough not to have new symbols, we did end up in error above.
The fix for this issue has been developed for quite some time, in this patch I have picked up
changes from Richard (who in turn did pick up from Robert). The idea is simple - introduce linker
checks to ensure we do perform link with correct components.
The core of the change is in Makefile.master, the rest is really about cleaning the build.
Testing done: build/install/boot on x86, build on sparc.
Related issues
Updated by Toomas Soome over 2 years ago
- Subject changed from libdhcputil: missing -lnsl to add ld assert-deflib and guidance to gate build
Updated by Andrew Stormont over 2 years ago
- Related to Feature #8411: Build should warn when linking against libraries outside proto area added
Updated by Electric Monk over 2 years ago
- Status changed from In Progress to Closed
- % Done changed from 90 to 100
git commit 5801b0f01c3c34499a929ed96164a5a68b470945
commit 5801b0f01c3c34499a929ed96164a5a68b470945 Author: Toomas Soome <tsoome@me.com> Date: 2020-02-05T17:00:00.000Z 12217 add ld assert-deflib and guidance to gate build Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Gergő Mihály Doma <domag02@gmail.com> Approved by: Dan McDonald <danmcd@joyent.com>
Actions