Bug 241632 - 12-STABLE (r354128) builds an unusable /bin/sh: Undefined symbol "stat@FBSD_1.5"
Summary: 12-STABLE (r354128) builds an unusable /bin/sh: Undefined symbol "stat@FBSD_1.5"
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
Depends on:
Reported: 2019-11-01 05:14 UTC by Bertrand Petit
Modified: 2019-11-01 06:29 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Bertrand Petit 2019-11-01 05:14:16 UTC
While installing a freshly built 12-STABLE (svn rev 354128), errors related to an undefined symbol in /bin/sh began appearing during installworld  after that new binary got installed:

===> bin/sh (install)
install  -s -o root -g wheel -m 555  -S sh //bin/sh
install  -o root -g wheel -m 444  sh.debug //usr/lib/debug/bin/sh.debug
installing DIRS CONFSDIR
install  -d -m 0755 -o root  -g wheel  //etc
installing DIRS CONFSDIR_dot.profile
install  -d -m 0755 -o root  -g wheel  //root
install  -o root -g wheel -m 444 sh.1.gz  //usr/share/man/man1/
===> bin/sh/tests (install)
ld-elf.so.1: /bin/sh: Undefined symbol "stat@FBSD_1.5"
make[6]: "/etc/make.conf" line 4: warning: "echo /usr/home/elrond/syswork/FreeBSD-work/12-LOCAL/src/bin/sh/tests | sed 's|/usr/ports/.*|/usr/ports|'" returned non-zero status
installing DIRS testsFILESDIR
install  -d -m 0755 -o root  -g wheel  //usr/tests/bin/sh
install  -o root  -g wheel -m 444  Kyuafile //usr/tests/bin/sh/Kyuafile

It looks I'm not the only one affected as there are some calls for help in the forums such as https://forums.freebsd.org/threads/how-to-resolve-ld-elf-so-1-bin-sh-undefined-symbol-stat-fbsd_1-5.72611/

Strangely enough, /bin/sh looks usable after installation:

# make installworld
# csh
root@:/home/elrond/syswork/FreeBSD-work # /bin/sh

I've not yet rebooted and not attempted a mergemaster, I fear that some parts of the installation got borked. I have a pre-install snapshot that I can rollback to in order to install another hopefully fixed build.
Comment 1 Bertrand Petit 2019-11-01 06:29:36 UTC
mergemaster did complain while populating temproot:

cd: /usr/home/elrond/syswork/FreeBSD-work/12-LOCAL/src/share/zoneinfo/builddir: No such file or directory
make[4]: "/usr/home/elrond/syswork/FreeBSD-work/12-LOCAL/src/share/zoneinfo/Makefile" line 104: warning: "cd /usr/home/elrond/syswork/FreeBSD-work/12-LOCAL/src/share/zoneinfo/builddir && find * -type f | LC_ALL=C sort" returned non-zero status

However this may be unrelated. Apart from these two errors everything else looks to be fine as far as I can tell, including a multi-user reboot.