Project

General

Profile

Actions

Bug #12217

closed

add ld assert-deflib and guidance to gate build

Added by Toomas Soome over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
lib - userland libraries
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

Related to illumos gate - Feature #8411: Build should warn when linking against libraries outside proto areaClosed2017-06-19

Actions
Actions #1

Updated by Toomas Soome over 1 year ago

  • Description updated (diff)
Actions #2

Updated by Toomas Soome over 1 year ago

  • Subject changed from libdhcputil: missing -lnsl to add ld assert-deflib and guidance to gate build
Actions #3

Updated by Toomas Soome over 1 year ago

  • Description updated (diff)
Actions #4

Updated by Andrew Stormont over 1 year ago

  • Related to Feature #8411: Build should warn when linking against libraries outside proto area added
Actions #5

Updated by Electric Monk over 1 year 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

Also available in: Atom PDF