Re: build world broken amd64 current at ifconfig if WITHOUT_DYNAMICROOT=yes is set in src.conf

From: Bryan Drewery <bdrewery_at_FreeBSD.org>
Date: Tue, 1 Dec 2015 09:27:51 -0800
On 12/1/2015 8:08 AM, Manfred Antar wrote:
> make build world is broken at /usr/src/sbin/ifconfig if you have WITHOUT_DYNAMICROOT=yes in src.conf:
> 
> cc -O2 -pipe -DINET6 -DINET -DJAIL -Wall -Wmissing-prototypes -Wcast-qual -Wwrite-strings -Wnested-externs -std=gnu99 -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -Wno-uninitialized -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Qunused-arguments  -static -o ifconfig ifconfig.o af_link.o af_inet.o af_inet6.o af_nd6.o ifclone.o ifmac.o ifmedia.o iffib.o ifvlan.o ifvxlan.o ifgre.o ifgif.o sfp.o ifieee80211.o carp.o ifgroup.o ifpfsync.o ifbridge.o iflagg.o   -lm  -lbsdxml  -lsbuf  -l80211  -ljail
> /usr/lib/lib80211.a(lib80211_regdomain.o): In function `lib80211_regdomain_readconfig':
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x4d): undefined reference to `XML_ParserCreate'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x5b): undefined reference to `XML_SetUserData'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x6d): undefined reference to `XML_SetElementHandler'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x7a): undefined reference to `XML_SetCharacterDataHandler'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x8c): undefined reference to `XML_Parse'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x9d): undefined reference to `XML_ParserFree'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x497): undefined reference to `XML_GetErrorCode'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x49e): undefined reference to `XML_ErrorString'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x4a9): undefined reference to `XML_GetCurrentLineNumber'
> /usr/lib/lib80211.a(lib80211_regdomain.o): In function `start_element':
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x5ac): undefined reference to `sbuf_new'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x779): undefined reference to `XML_GetCurrentLineNumber'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x7ec): undefined reference to `XML_GetCurrentLineNumber'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x99b): undefined reference to `XML_GetCurrentLineNumber'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x9ae): undefined reference to `XML_GetCurrentLineNumber'
> /usr/lib/lib80211.a(lib80211_regdomain.o): In function `end_element':
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xa4e): undefined reference to `sbuf_finish'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xa5c): undefined reference to `sbuf_data'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xa6d): undefined reference to `sbuf_len'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xbfb): undefined reference to `XML_GetCurrentLineNumber'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xd1b): undefined reference to `XML_GetCurrentLineNumber'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xdee): undefined reference to `XML_GetCurrentLineNumber'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xe31): undefined reference to `XML_GetCurrentLineNumber'
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xe9a): undefined reference to `XML_GetCurrentLineNumber'
> /usr/lib/lib80211.a(lib80211_regdomain.o):/usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xebf): more undefined references to `XML_GetCurrentLineNumber' follow
> /usr/lib/lib80211.a(lib80211_regdomain.o): In function `end_element':
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0xfcc): undefined reference to `sbuf_delete'
> /usr/lib/lib80211.a(lib80211_regdomain.o): In function `char_data':
> /usr/src/lib/lib80211/lib80211_regdomain.c:(.text+0x1155): undefined reference to `sbuf_bcat'
> cc: error: linker command failed with exit code 1 (use -v to see invocation)
> *** Error code 1
> 
> Stop.
> make: stopped in /usr/src/sbin/ifconfig
> 
> The order of the library linking needs to be changed from:
> LIBADD+=	bsdxml sbuf 80211
> to
> LIBADD+=	80211 bsdxml sbuf
> 

The fix is worse than that, it is an obscure thing in src.libnames.mk.
Dependencies are supposed to be duplicated there for this exact case.
I'll fix it there.

Curious, why do you use WITHOUT_DYNAMICROOT?


-- 
Regards,
Bryan Drewery


Received on Tue Dec 01 2015 - 16:27:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:01 UTC