Discussion:
Upgrade from 12.2-RELEASE-p2 to 13.0-RELEASE
Roman Serbski
2021-05-23 13:06:25 UTC
Permalink
Hello,

I've just finished upgrading a server running 12.2-RELEASE-p2 to
13.0-RELEASE using "Updating FreeBSD from Source" section from
https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld

Everything went well except that now, when I try to build a new kernel I get:

--- usbdevs.h ---
awk -f /usr/src/sys/tools/usbdevs2h.awk /usr/src/sys/dev/usb/usbdevs -h
--- rpctlscd.h ---
RPCGEN_CPP='cpp -target x86_64-unknown-freebsd13.0
--sysroot=/usr/obj/usr/src/amd64.amd64/tmp
-B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin' rpcgen -hM
/usr/src/sys/rpc/rpcsec_tls/rpctlscd.x | grep -v pthread.h >
rpctlscd.h
ld-elf.so.1: Shared object "libgnuregex.so.5" not found, required by "grep"
*** [rpctlscd.h] Error code 1

make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/BSD13TEST
1 error

make[2]: stopped in /usr/obj/usr/src/amd64.amd64/sys/BSD13TEST

make[1]: stopped in /usr/src

make: stopped in /usr/src

The file seems to be present:

# find / -name libgnuregex.so.5 -print
/usr/lib32/libgnuregex.so.5

# ls -al /usr/lib32/libgnuregex.so*
lrwxr-xr-x 1 root wheel 16 Jan 19 14:49
/usr/lib32/libgnuregex.so -> libgnuregex.so.5
-r--r--r-- 1 root wheel 83044 Jan 19 14:49 /usr/lib32/libgnuregex.so.5

According to the release notes:

The BSD version of grep(1) is now installed by default. The obsolete
GNU version that was the previous default has been removed.

Any manual steps missed?

Thank you.
Graham Perrin
2021-05-25 03:04:25 UTC
Permalink
Post by Roman Serbski
Hello,
I've just finished upgrading a server running 12.2-RELEASE-p2 to
13.0-RELEASE using "Updating FreeBSD from Source" section from
https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld
Everything went well except that now, when I try to build a new kernel …



Do you now aim to update to 14.0-CURRENT?

If you're still on 13.0-RELEASE, you could try a (binary) pkg-update
routine before attempting to build a new kernel.
Steve O'Hara-Smith
2021-05-25 06:24:28 UTC
Permalink
On Sun, 23 May 2021 15:06:25 +0200
Post by Roman Serbski
/usr/src/sys/rpc/rpcsec_tls/rpctlscd.x | grep -v pthread.h >
rpctlscd.h
ld-elf.so.1: Shared object "libgnuregex.so.5" not found, required by "grep"
That's the version used in 12.2 can someone with 13.0 use ldd to
find out what version of libgnuregex is used by grep in 13.0.
Post by Roman Serbski
# find / -name libgnuregex.so.5 -print
/usr/lib32/libgnuregex.so.5
That's the 32 bit compatibility version the one grep is looking for
lives in /usr/lib.

You seem to be running 12.2 grep - I don't know why.
--
Steve O'Hara-Smith <***@sohara.org>
Roman Serbski
2021-05-25 09:21:31 UTC
Permalink
Post by Steve O'Hara-Smith
That's the version used in 12.2 can someone with 13.0 use ldd to
find out what version of libgnuregex is used by grep in 13.0.
Post by Roman Serbski
# find / -name libgnuregex.so.5 -print
/usr/lib32/libgnuregex.so.5
That's the 32 bit compatibility version the one grep is looking for
lives in /usr/lib.
You seem to be running 12.2 grep - I don't know why.
I'm not sure I'm running 12.2 grep.

Here is grep from 12.2-RELEASE-p2 (r369053):

# grep --version
grep (GNU grep) 2.5.1-FreeBSD

# ldd /usr/bin/grep
/usr/bin/grep:
libgnuregex.so.5 => /usr/lib/libgnuregex.so.5 (0x800263000)
libbz2.so.4 => /usr/lib/libbz2.so.4 (0x80027c000)
libz.so.6 => /lib/libz.so.6 (0x800292000)
libc.so.7 => /lib/libc.so.7 (0x8002ae000)

And here is grep from 13.0-RELEASE (ea31abc26):

# grep --version
grep (BSD grep, GNU compatible) 2.6.0-FreeBSD

# ldd /usr/bin/grep
/usr/bin/grep:
libregex.so.1 => /usr/lib/libregex.so.1 (0x80024b000)
libc.so.7 => /lib/libc.so.7 (0x80025f000)

Thanks.
Steve O'Hara-Smith
2021-05-25 11:00:14 UTC
Permalink
On Tue, 25 May 2021 11:21:31 +0200
Post by Roman Serbski
Post by Steve O'Hara-Smith
That's the version used in 12.2 can someone with 13.0 use ldd to
find out what version of libgnuregex is used by grep in 13.0.
Post by Roman Serbski
# find / -name libgnuregex.so.5 -print
/usr/lib32/libgnuregex.so.5
That's the 32 bit compatibility version the one grep is looking
for lives in /usr/lib.
You seem to be running 12.2 grep - I don't know why.
I'm not sure I'm running 12.2 grep.
The error message you quoted shows that 12.2 grep was being used
during the kernel build. Your ldd output confirms that 13.0 grep is not
linked to libgnuregex.so.5 and so would not have produced that error
message.

Next problem - figure out why the kernel build was using an old
grep and how.
--
Steve O'Hara-Smith <***@sohara.org>
Loading...