Bug 233862 - make buildworld fails: /usr/bin/ld: error: undefined symbol: version on usr.sbin/traceroute
Summary: make buildworld fails: /usr/bin/ld: error: undefined symbol: version on usr....
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-08 05:27 UTC by George
Modified: 2018-12-30 17:21 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 George 2018-12-08 05:27:46 UTC
Hi friends!

When I try update world on my test PC to CURRENT rev. 341706
Current OS: FreeBSD BSD-NUC 13.0-CURRENT FreeBSD 13.0-CURRENT r340975

cc -target x86_64-unknown-freebsd13.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -pg  -Os -pipe -march=native  -DNO__SCCSID -DNO__RCSID -I/usr/src/lib/libc/include -I/usr/src/include -I/usr/src/lib/libc/amd64 -DNLS  -D__DBINTERFACE_PRIVATE -I/usr/src/contrib/gdtoa -I/usr/src/contrib/libc-vis -DINET6 -I/usr/obj/usr/src/amd64.amd64/lib/libc -I/usr/src/lib/libc/resolv -D_ACL_PRIVATE -DPOSIX_MISTAKE -I/usr/src/lib/libmd -I/usr/src/contrib/jemalloc/include -DMALLOC_PRODUCTION -I/usr/src/contrib/tzcode/stdtime -I/usr/src/lib/libc/stdtime -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DWANT_HYPERV -DYP -DNS_CACHING -DSYMBOL_VERSIONING -DNDEBUG -MD  -MF.depend.xdryp.po -MTxdryp.po -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-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter  -Qunused-arguments  -I/usr/src/lib/libutil -I/usr/src/lib/msun/amd64 -I/usr/src/lib/msun/x86 -I/usr/src/lib/msun/src -c /usr/src/lib/libc/yp/xdryp.c -o xdryp.po
--- all_subdir_secure ---
--- EVP_PKEY_CTX_set_rsa_pss_keygen_md.3.gz ---
gzip -cn /usr/src/secure/lib/libcrypto/man/EVP_PKEY_CTX_set_rsa_pss_keygen_md.3 > EVP_PKEY_CTX_set_rsa_pss_keygen_md.3.gz
--- all_subdir_usr.bin ---
--- all_subdir_usr.bin/shar ---
===> usr.bin/shar (all)
--- shar.1.gz ---
gzip -cn /usr/src/usr.bin/shar/shar.1 > shar.1.gz
--- all_subdir_usr.sbin ---
--- all_subdir_usr.sbin/traceroute ---
/usr/bin/ld: error: undefined symbol: version
>>> referenced by traceroute.c
>>>               traceroute.o:(usage)
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [traceroute] Error code 1

make[4]: stopped in /usr/src/usr.sbin/traceroute
1 error

make[4]: stopped in /usr/src/usr.sbin/traceroute
*** [all_subdir_usr.sbin/traceroute] Error code 2

make[3]: stopped in /usr/src/usr.sbin
--- all_subdir_secure ---
A failure has been detected in another branch of the parallel make

make[5]: stopped in /usr/src/secure/lib/libcrypto
*** [all_subdir_secure/lib/libcrypto] Error code 2

make[4]: stopped in /usr/src/secure/lib
1 error

make[4]: stopped in /usr/src/secure/lib
*** [all_subdir_secure/lib] Error code 2

make[3]: stopped in /usr/src/secure
1 error

make[3]: stopped in /usr/src/secure
--- all_subdir_usr.sbin ---
--- all_subdir_usr.sbin/tcpdump ---
A failure has been detected in another branch of the parallel make

make[5]: stopped in /usr/src/usr.sbin/tcpdump/tcpdump
--- all_subdir_secure ---
*** [all_subdir_secure] Error code 2

make[2]: stopped in /usr/src
--- all_subdir_usr.sbin ---
*** [all_subdir_usr.sbin/tcpdump/tcpdump] Error code 2

make[4]: stopped in /usr/src/usr.sbin/tcpdump
1 error

make[4]: stopped in /usr/src/usr.sbin/tcpdump
*** [all_subdir_usr.sbin/tcpdump] Error code 2

make[3]: stopped in /usr/src/usr.sbin
--- all_subdir_usr.bin ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/usr.bin/shar
*** [all_subdir_usr.bin/shar] Error code 2

make[3]: stopped in /usr/src/usr.bin
1 error

make[3]: stopped in /usr/src/usr.bin
*** [all_subdir_usr.bin] Error code 2

make[2]: stopped in /usr/src
--- all_subdir_usr.sbin ---
--- all_subdir_usr.sbin/tzsetup ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/usr.sbin/tzsetup
--- all_subdir_lib ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/lib/libc
*** [all_subdir_lib/libc] Error code 2

make[3]: stopped in /usr/src/lib
--- all_subdir_usr.sbin ---
*** [all_subdir_usr.sbin/tzsetup] Error code 2

make[3]: stopped in /usr/src/usr.sbin
3 errors

make[3]: stopped in /usr/src/usr.sbin
*** [all_subdir_usr.sbin] Error code 2

make[2]: stopped in /usr/src
--- all_subdir_lib ---
--- all_subdir_lib/libc++ ---
A failure has been detected in another branch of the parallel make

make[4]: stopped in /usr/src/lib/libc++
*** [all_subdir_lib/libc++] Error code 2

make[3]: stopped in /usr/src/lib
2 errors

make[3]: stopped in /usr/src/lib
*** [all_subdir_lib] Error code 2

make[2]: stopped in /usr/src
4 errors

make[2]: stopped in /usr/src
*** [everything] Error code 2

make[1]: stopped in /usr/src
1 error

make[1]: stopped in /usr/src
*** [buildworld] Error code 2

make: stopped in /usr/src
1 error

make: stopped in /usr/src
Comment 1 George 2018-12-15 09:19:10 UTC
Friends, I think thap error because of some my src.conf settings, but help me please understand which exactly.

I'm do following, maybe that give more info:
--------------------------
cd /usr/obj/usr/src/amd64.amd64/usr.sbin/traceroute

cc -v -target x86_64-unknown-freebsd13.0 --sysroot=/usr/obj/usr/src/amd64.amd64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -Os -pipe -march=native -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_SOCKIO_H=1 -DHAVE_NET_ROUTE_H=1 -DHAVE_NET_IF_DL_H=1 -DHAVE_STRERROR=1 -DHAVE_USLEEP=1 -DHAVE_SYS_SYSCTL_H=1 -DBYTESWAP_IP_HDR=1 -DHAVE_SETLINEBUF=1 -DHAVE_RAW_OPTIONS=1 -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE_ICMP_NEXTMTU=1 -DIPSEC -DWITH_CASPER -I/usr/src/contrib/traceroute -DNDEBUG -std=gnu99 -fstack-protector-strong -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -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-address-of-packed-member -Qunused-arguments -o traceroute as.o version.o traceroute.o ifaddrlist.o findsaddr-udp.o -lipsec -lcasper -lcap_dns
--------------------------
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
Target: x86_64-unknown-freebsd13.0
Thread model: posix
InstalledDir: /usr/bin
 "/usr/obj/usr/src/amd64.amd64/tmp/usr/bin/ld" --sysroot=/usr/obj/usr/src/amd64.amd64/tmp --eh-frame-hdr -dynamic-linker /libexec/ld-elf.so.1 --hash-style=both --enable-new-dtags -o traceroute /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/crt1.o /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/crti.o /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/crtbegin.o -L/usr/obj/usr/src/amd64.amd64/tmp/usr/lib as.o version.o traceroute.o ifaddrlist.o findsaddr-udp.o -lipsec -lcasper -lcap_dns -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/crtend.o /usr/obj/usr/src/amd64.amd64/tmp/usr/lib/crtn.o
ld: error: undefined symbol: version
>>> referenced by traceroute.c
>>>               traceroute.o:(usage)
cc: error: linker command failed with exit code 1 (use -v to see invocation)

ls
--------------------------
.depend                 .depend.findsaddr-udp.o .depend.traceroute.o as.o                       ifaddrlist.o            version.c
.depend.as.o            .depend.ifaddrlist.o    .depend.version.o  findsaddr-udp.o              traceroute.o            version.o
Comment 2 George 2018-12-22 14:43:19 UTC
Friends, any suggests, what can cause that fails?
Comment 3 Gleb Kurtsou freebsd_committer 2018-12-30 03:38:38 UTC
I had the same problem. My guess is that installed world is newer than kernel.
Generated version.c was empty.

/usr/bin/head was failing in my case. If 'head' fails replace it with /rescue/head and restart the build.

Expected result:
% head -1 /usr/src/contrib/traceroute/VERSION
1.4a12+FreeBSD
Comment 4 George 2018-12-30 17:21:20 UTC
Gleb Kurtsou, thank you very much!

It is my case! I think, this may be because I'm do make buildworld, and forget make installkernel in some moment.

Thanks a lot!