Bug 290883 - in lib/libc/tests/rpc saw ld: error: undefined reference: yp_get_default_domain@FBSD_1.0 also yp_master@FBSD_1.0
Summary: in lib/libc/tests/rpc saw ld: error: undefined reference: yp_get_default_doma...
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 16.0-CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-testing (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-07 22:58 UTC by Dennis Clarke
Modified: 2025-11-10 19:20 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Clarke 2025-11-07 22:58:43 UTC
During a buildworld with this machine : 

callisto# uname -apKU 
FreeBSD callisto 16.0-CURRENT FreeBSD 16.0-CURRENT main-n281180-79e57ea662d9 GENERIC amd64 amd64 1600001 1600001

callisto# /usr/local/bin/git --no-pager log -n 8 --pretty=oneline --graph
* 09aeca28dd7583bb0b9b9d3a38dcc40cdbd870e3 (HEAD -> main, origin/main, origin/HEAD) BSD family tree: reduce OpenBSD-NetBSD crowding
* 36095c942031f7f1613eec554f1c7615cbd891fd release: Comply with Azure Marketplace requirements for aarch64
* 51c5e2b60247b3deb204a1d78ea6edc91a8ac652 libsys: install manpage links for jail_attach_jd/jail_remove_jd
* 753cef701dbea03627c1fe11dd5556e74df415b2 dtrace.1: Fix mdoc macros around -x
* 9fe88e5503239cb65e503e3b2b7344933a888644 dtrace_pid.4: Document the DTrace PID provider
* b8ff8a11c0d1d1f1b3bd1e60fae9c05ada7b28c5 ports.7: Add /var/db/ports to FILES
* 2ec6a2e5f01120ea8d4e667e7773d8b140e40c75 iwlwifi: fix the gcc build
* 3f5f52216f7e583aeb5580b13ba0f87e29d1ee43 kern_jail_set(): do not double-free opts
callisto# 
callisto# uname -apKU 
FreeBSD callisto 16.0-CURRENT FreeBSD 16.0-CURRENT main-n281180-79e57ea662d9 GENERIC amd64 amd64 1600001 1600001
callisto# 

saw this ...
.
.
.

===> lib/libc/tests/rpc (all)
(cd /usr/src/lib/libc/tests/rpc &&  DEPENDFILE=.depend.rpc_test  NO_SUBDIR=1 make -f /usr/src/lib/libc/tests/rpc/Makefile _RECURSING_PROGS=t  PROG=rpc_test )

/usr/local/bin/ccache cc -target x86_64-unknown-freebsd16.0
 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp 
 -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin
 -fpie -DPIC   -O2 -pipe -fno-common
 -I/usr/obj/usr/src/amd64.amd64/lib/libc/tests/rpc
 -I/usr/src/lib/libnetbsd
 -I/usr/src/contrib/netbsd-tests
 -fPIE -ffile-prefix-map=/usr/src=/usr/src
 -ffile-prefix-map=/usr/obj/usr/src=/usr/obj
 -g -gz=zlib
 -MD  -MF.depend.rpc_test.t_rpc.pieo
 -MTt_rpc.pieo -std=gnu17
 -Wno-format-zero-length -fstack-protector-strong
 -Wsystem-headers -Werror -Wall -Wno-format-y2k
 -Wno-uninitialized -Wno-pointer-sign -Wdate-time
 -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
 -Wno-error=unused-but-set-parameter -Wno-error=cast-function-type-mismatch
 -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality
 -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef
 -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum
 -Wno-knr-promoted-parameter  -Qunused-arguments
 -c /usr/src/contrib/netbsd-tests/lib/libc/rpc/t_rpc.c
 -o t_rpc.pieo

cc -target x86_64-unknown-freebsd16.0
 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp
 -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin
 -O2 -pipe -fno-common
 -I/usr/obj/usr/src/amd64.amd64/lib/libc/tests/rpc
 -I/usr/src/lib/libnetbsd -I/usr/src/contrib/netbsd-tests
 -fPIE -ffile-prefix-map=/usr/src=/usr/src
 -ffile-prefix-map=/usr/obj/usr/src=/usr/obj
 -g -gz=zlib -std=gnu17 -Wno-format-zero-length
 -fstack-protector-strong
 -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized
 -Wno-pointer-sign -Wdate-time -Wno-empty-body -Wno-string-plus-int
 -Wno-unused-const-variable -Wno-error=unused-but-set-parameter
 -Wno-error=cast-function-type-mismatch -Wno-tautological-compare
 -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function
 -Wno-enum-conversion -Wno-unused-local-typedef
 -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum
 -Wno-knr-promoted-parameter -Qunused-arguments
  -L/usr/obj/usr/src/amd64.amd64/lib/libnetbsd
 -Wl,-zrelro -pie
   -o rpc_test.full t_rpc.pieo  -lprivateatf-c  -lrpcsvc
  -lutil -L/usr/obj/usr/src/amd64.amd64/lib/libnetbsd
 -lnetbsd_pie

ld: error: undefined reference: yp_get_default_domain@FBSD_1.0
>>> referenced by /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/librpcsvc.so (disallowed by --no-allow-shlib-undefined)

ld: error: undefined reference: yp_master@FBSD_1.0
>>> referenced by /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/librpcsvc.so (disallowed by --no-allow-shlib-undefined)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1

Stop.
make[7]: stopped making "all" in /usr/src/lib/libc/tests/rpc
*** Error code 1

Stop.
make[6]: stopped making "all" in /usr/src/lib/libc/tests/rpc
*** Error code 1

Stop.
make[5]: stopped making "all" in /usr/src/lib/libc/tests
*** Error code 1

Stop.
make[4]: stopped making "all" in /usr/src/lib/libc
*** Error code 1

Stop.
make[3]: stopped making "all" in /usr/src/lib
*** Error code 1

Stop.
make[2]: stopped making "all" in /usr/src
      153.79 real       122.73 user        23.72 sys
*** Error code 1

Stop.
make[1]: stopped making "buildworld" in /usr/src
*** Error code 1

Stop.
make: stopped making "buildworld" in /usr/src

Not sure why this show stopper is happening here. 

Looks like a dogs breakfast of GCCisms and -std=gnu17 there also.
Comment 1 Enji Cooper freebsd_committer freebsd_triage 2025-11-08 01:41:14 UTC
Did you switch MK_NIS=yes to MK_NIS=no?
Comment 2 Enji Cooper freebsd_committer freebsd_triage 2025-11-08 01:55:56 UTC
(In reply to Enji Cooper from comment #1)

... in SRCCONF (/etc/src.conf) that is.

This looks like a build error that would occur if the option was changed _and_ MK_CLEAN=no was set (it's the default on some versions of FreeBSD).
Comment 3 Dennis Clarke 2025-11-08 03:22:31 UTC
(In reply to Enji Cooper from comment #2)
callisto# grep -v '^#' /etc/src.conf 

WITH_CCACHE_BUILD=yes
CCACHE_DIR=/var/cache/ccache/

WITH_REPRODUCIBLE_BUILD=yes
Comment 4 Dennis Clarke 2025-11-08 03:23:51 UTC
made a small change : 

callisto# grep -v '^#' /etc/src.conf

WITH_CCACHE_BUILD=yes
CCACHE_DIR=/var/cache/ccache/

WITH_REPRODUCIBLE_BUILD=yes

MK_CLEAN=yes



So lets see what happens now.
Comment 5 Dennis Clarke 2025-11-09 08:20:42 UTC
yep. problem solved : 

--------------------------------------------------------------
>>> World build completed on Sun Nov  9 07:36:58 GMT 2025
>>> World built in 101546 seconds, ncpu: 2
--------------------------------------------------------------

so in /etc/src.conf we *need* "MK_CLEAN=yes" just to be sure.
Comment 6 Enji Cooper freebsd_committer freebsd_triage 2025-11-10 17:32:21 UTC
(In reply to Dennis Clarke from comment #5)

More often than not I find MK_CLEAN=no a great way to footshoot by accident due to build complexity, the fact that the overall build is so complex, and dependencies aren't fully called out. It's a developer "optimization" that really needs a huge asterisk added to it.
Comment 7 Dennis Clarke 2025-11-10 19:20:11 UTC
(In reply to Enji Cooper from comment #6)

    "MK_CLEAN=no" must be the default setting.