Discussion:
Upgrading -RELEASE to -CURRENT
(too old to reply)
Josef 'Jeff' Sipek
2024-04-19 22:46:04 UTC
Permalink
Perhaps this is a newbie question, but whenever I try to move a freshly
installed 14.0-RELEASE-p6 to -CURRENT, I seem to have to first install
-STABLE and then build -CURRENT.

That is:

1. install 14.0 from ISO
2. freebsd-update
3. get stable/14
4. buildworld; buildkernel; installkernel; reboot; etcupdate -p;
installworld; etcupdate -B; make delete-old; reboot
5. get main
6. buildworld; buildkernel; installkernel; reboot; etcupdate -p;
installworld; etcupdate -B; make delete-old; reboot

If I skip steps 3 & 4, I end up with every C++ binary (notably cc) fails to
execute because ld.so is unhappy about libc++.so not having the right
version. (Sorry, I didn't write down exact error and don't have a busted
system on hand.)

Is upgrading from 14.0-RELEASE directly to -CURRENT supposed to work? I
didn't see anything in the docs that says it shouldn't.

Thanks,

Jeff.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
void
2024-04-20 00:08:20 UTC
Permalink
Post by Josef 'Jeff' Sipek
Is upgrading from 14.0-RELEASE directly to -CURRENT supposed to work? I
didn't see anything in the docs that says it shouldn't.
I think the general principle is "upgrade to latest version of thing
before upgrading major version" so for 14.0 that would involve building &
installing 14-stable and then 15-current.
--
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Warner Losh
2024-04-20 00:15:59 UTC
Permalink
Post by void
Post by Josef 'Jeff' Sipek
Is upgrading from 14.0-RELEASE directly to -CURRENT supposed to work? I
didn't see anything in the docs that says it shouldn't.
I think the general principle is "upgrade to latest version of thing
before upgrading major version" so for 14.0 that would involve building &
installing 14-stable and then 15-current.
Last release to current almost always works. So 14.0 to current is doable.
I did 14.0 beta1 -> current 3 weeks ago.

Etcupdate pre mode, Buildworld, buildkernel, installkernel, reboot,
installworld, etcupdate, reboot -r

But OP said they did that twice, once for stale/14 and once for main so I'm
not sure what is going on. Need error message i think.

Warner

Warner
Josef 'Jeff' Sipek
2024-04-22 17:17:50 UTC
Permalink
Post by Dimitry Andric
Post by Josef 'Jeff' Sipek
..
ld-elf.so.1: /lib/libcxxrt.so.1: version CXXABI_1.3.11 required by /lib/libc++.so.1 not found
So, the problem is /lib/libcxxrt.so.1 is *not* getting updated by 'make
installworld' because the newly built library ends up in /usr/lib [1]. Therefore,
/lib/libcxxrt.so.1 from 14.0-RELEASE
/usr/lib/libcxxrt.so.1 from -CURRENT
ld-elf.so finds the one in /lib fails to find the required version
(CXXABI_1.3.11) and terminates.
This is very strange, and should not happen.
Agreed :)
Post by Dimitry Andric
The Makefile for libcxxrt
specifies SHLIBDIR?=/lib, so have you somehow overridden SHLIBDIR
somewhere in your environment?
Nope! This is a fresh 14.0-RELEASE install (updated to -p6 via
freebsd-update), then I log in as root, install git, get the source, and
build.

Jeff.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dimitry Andric
2024-04-22 17:19:27 UTC
Permalink
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
Post by Josef 'Jeff' Sipek
..
ld-elf.so.1: /lib/libcxxrt.so.1: version CXXABI_1.3.11 required by /lib/libc++.so.1 not found
So, the problem is /lib/libcxxrt.so.1 is *not* getting updated by 'make
installworld' because the newly built library ends up in /usr/lib [1]. Therefore,
/lib/libcxxrt.so.1 from 14.0-RELEASE
/usr/lib/libcxxrt.so.1 from -CURRENT
ld-elf.so finds the one in /lib fails to find the required version
(CXXABI_1.3.11) and terminates.
This is very strange, and should not happen.
Agreed :)
Post by Dimitry Andric
The Makefile for libcxxrt
specifies SHLIBDIR?=/lib, so have you somehow overridden SHLIBDIR
somewhere in your environment?
Nope! This is a fresh 14.0-RELEASE install (updated to -p6 via
freebsd-update), then I log in as root, install git, get the source, and
build.
How, exactly, are you building?

-Dimitry



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Josef 'Jeff' Sipek
2024-04-24 13:57:33 UTC
Permalink
Post by Dimitry Andric
Post by Josef 'Jeff' Sipek
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
To properly finish up this thread, Jeff was right, and
https://cgit.freebsd.org/src/commit/?id=da77a1b4f0dff was the cause.
That commit added a .include <bsd.own.mk> at the top of libcxxrt's
Makefile, which is normally fine, but not if you use SHLIBDIR?=/lib.
That sort of assignment should always be done before including any of
the bsd.*.mk files.
I have committed https://cgit.freebsd.org/src/commit/?id=911a6479e18bc
for now, which should fix the problem. It also adds an ObsoleteFiles.inc
entry for /usr/lib/libcxxrt.so.1, so the file should be removed when you
run "make delete-old-libs".
FWIW, with this change, I just did a successful upgrade of a 14.0-RELEASE
directly to -CURRENT.
I think a little bit more is needed to completely fix the issue. It looks
..
remove /usr/lib/debug/usr/lib/libcxxrt.so.1.debug? y
remove /usr/lib32/libcxxrt.so.1? y
remove /usr/lib/debug/usr/lib32/libcxxrt.so.1.debug? y
https://cgit.freebsd.org/src/commit/?id=f48643d376a4
Yep, that fixes it. Thanks!

Jeff.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Josef 'Jeff' Sipek
2024-04-23 00:22:28 UTC
Permalink
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
To properly finish up this thread, Jeff was right, and
https://cgit.freebsd.org/src/commit/?id=da77a1b4f0dff was the cause.
That commit added a .include <bsd.own.mk> at the top of libcxxrt's
Makefile, which is normally fine, but not if you use SHLIBDIR?=/lib.
That sort of assignment should always be done before including any of
the bsd.*.mk files.
I have committed https://cgit.freebsd.org/src/commit/?id=911a6479e18bc
for now, which should fix the problem. It also adds an ObsoleteFiles.inc
entry for /usr/lib/libcxxrt.so.1, so the file should be removed when you
run "make delete-old-libs".
FWIW, with this change, I just did a successful upgrade of a 14.0-RELEASE
directly to -CURRENT.
I think a little bit more is needed to completely fix the issue. It looks
like delete-old-libs gets rid of /usr/lib32/libcxxrt.so.1:

***@odin# make delete-old-libs
..
remove /usr/lib/debug/usr/lib/libcxxrt.so.1.debug? y
remove /usr/lib32/libcxxrt.so.1? y
remove /usr/lib/debug/usr/lib32/libcxxrt.so.1.debug? y
..
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
Old libraries removed
before installworld:

***@odin# find / -name 'libcxxrt.*' -xdev -ls
35733 113 -r--r--r-- 1 root wheel 106712 Apr 18 20:31 /usr/lib/libcxxrt.so.1
35633 377 -r--r--r-- 1 root wheel 358086 Apr 18 20:31 /usr/lib/libcxxrt.a
103067 225 -r--r--r-- 1 root wheel 205880 Mar 23 08:48 /usr/lib/debug/lib/libcxxrt.so.1.debug
50292 217 -r--r--r-- 1 root wheel 157116 Apr 18 20:37 /usr/lib/debug/usr/lib32/libcxxrt.so.1.debug
35002 241 -r--r--r-- 1 root wheel 208792 Apr 18 20:31 /usr/lib/debug/usr/lib/libcxxrt.so.1.debug
35735 1 lrwxr-xr-x 1 root wheel 13 Apr 18 20:31 /usr/lib/libcxxrt.so -> libcxxrt.so.1
50386 105 -r--r--r-- 1 root wheel 88116 Apr 18 20:37 /usr/lib32/libcxxrt.so.1
50291 321 -r--r--r-- 1 root wheel 220338 Apr 18 20:37 /usr/lib32/libcxxrt.a
50951 1 lrwxr-xr-x 1 root wheel 13 Apr 18 20:37 /usr/lib32/libcxxrt.so -> libcxxrt.so.1
102692 113 -r--r--r-- 1 root wheel 107512 Mar 23 08:48 /lib/libcxxrt.so.1

after installworld:
***@odin# find / -name 'libcxxrt.*' -xdev -ls
35633 377 -r--r--r-- 1 root wheel 358086 Apr 18 20:31 /usr/lib/libcxxrt.a
101307 241 -r--r--r-- 1 root wheel 208792 Apr 22 19:59 /usr/lib/debug/lib/libcxxrt.so.1.debug
50292 217 -r--r--r-- 1 root wheel 157116 Apr 18 20:37 /usr/lib/debug/usr/lib32/libcxxrt.so.1.debug
35002 241 -r--r--r-- 1 root wheel 208792 Apr 18 20:31 /usr/lib/debug/usr/lib/libcxxrt.so.1.debug
101309 1 lrwxr-xr-x 1 root wheel 23 Apr 22 19:59 /usr/lib/libcxxrt.so -> ../../lib/libcxxrt.so.1
50386 105 -r--r--r-- 1 root wheel 88116 Apr 18 20:37 /usr/lib32/libcxxrt.so.1
50291 321 -r--r--r-- 1 root wheel 220338 Apr 18 20:37 /usr/lib32/libcxxrt.a
117893 1 lrwxr-xr-x 1 root wheel 13 Apr 22 20:00 /usr/lib32/libcxxrt.so -> libcxxrt.so.1
101970 113 -r--r--r-- 1 root wheel 106712 Apr 22 19:59 /lib/libcxxrt.so.1

after delete-old-libs:
***@odin# find / -name 'libcxxrt.*' -xdev -ls
35633 377 -r--r--r-- 1 root wheel 358086 Apr 18 20:31 /usr/lib/libcxxrt.a
101307 241 -r--r--r-- 1 root wheel 208792 Apr 22 19:59 /usr/lib/debug/lib/libcxxrt.so.1.debug
101309 1 lrwxr-xr-x 1 root wheel 23 Apr 22 19:59 /usr/lib/libcxxrt.so -> ../../lib/libcxxrt.so.1
50291 321 -r--r--r-- 1 root wheel 220338 Apr 18 20:37 /usr/lib32/libcxxrt.a
117893 1 lrwxr-xr-x 1 root wheel 13 Apr 22 20:00 /usr/lib32/libcxxrt.so -> libcxxrt.so.1
101970 113 -r--r--r-- 1 root wheel 106712 Apr 22 19:59 /lib/libcxxrt.so.1

Compared to what I see on 14.0-RELEASE, note that:

1. /usr/lib/debug/usr/lib32/libcxxrt.so.1.debug is missing
2. /usr/lib32/libcxxrt.so.1 is missing
3. /usr/lib32/libcxxrt.so is a broken symlink (because of #2)

At least I'm assuming that lib32 is still supposed to exist. (A repeated
'make installworld' recreates the missing files.)

Jeff.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dimitry Andric
2024-04-23 17:45:21 UTC
Permalink
Post by Josef 'Jeff' Sipek
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
To properly finish up this thread, Jeff was right, and
https://cgit.freebsd.org/src/commit/?id=da77a1b4f0dff was the cause.
That commit added a .include <bsd.own.mk> at the top of libcxxrt's
Makefile, which is normally fine, but not if you use SHLIBDIR?=/lib.
That sort of assignment should always be done before including any of
the bsd.*.mk files.
I have committed https://cgit.freebsd.org/src/commit/?id=911a6479e18bc
for now, which should fix the problem. It also adds an ObsoleteFiles.inc
entry for /usr/lib/libcxxrt.so.1, so the file should be removed when you
run "make delete-old-libs".
FWIW, with this change, I just did a successful upgrade of a 14.0-RELEASE
directly to -CURRENT.
I think a little bit more is needed to completely fix the issue. It looks
..
remove /usr/lib/debug/usr/lib/libcxxrt.so.1.debug? y
remove /usr/lib32/libcxxrt.so.1? y
remove /usr/lib/debug/usr/lib32/libcxxrt.so.1.debug? y
Ok, that should hopefully be fixed by:
https://cgit.freebsd.org/src/commit/?id=f48643d376a4

Thanks to jhb@ for suggesting MOVED_LIBS, which should handle this 'transition' smoothly.

-Dimitry


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dimitry Andric
2024-04-22 17:11:46 UTC
Permalink
Post by Josef 'Jeff' Sipek
..
ld-elf.so.1: /lib/libcxxrt.so.1: version CXXABI_1.3.11 required by /lib/libc++.so.1 not found
So, the problem is /lib/libcxxrt.so.1 is *not* getting updated by 'make
installworld' because the newly built library ends up in /usr/lib [1]. Therefore,
/lib/libcxxrt.so.1 from 14.0-RELEASE
/usr/lib/libcxxrt.so.1 from -CURRENT
ld-elf.so finds the one in /lib fails to find the required version
(CXXABI_1.3.11) and terminates.
This is very strange, and should not happen. The Makefile for libcxxrt
specifies SHLIBDIR?=/lib, so have you somehow overridden SHLIBDIR
somewhere in your environment?

-Dimitry



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Josef 'Jeff' Sipek
2024-04-22 19:28:42 UTC
Permalink
Post by Dimitry Andric
To properly finish up this thread, Jeff was right, and
https://cgit.freebsd.org/src/commit/?id=da77a1b4f0dff was the cause.
That commit added a .include <bsd.own.mk> at the top of libcxxrt's
Makefile, which is normally fine, but not if you use SHLIBDIR?=/lib.
That sort of assignment should always be done before including any of
the bsd.*.mk files.
I have committed https://cgit.freebsd.org/src/commit/?id=911a6479e18bc
for now, which should fix the problem. It also adds an ObsoleteFiles.inc
entry for /usr/lib/libcxxrt.so.1, so the file should be removed when you
run "make delete-old-libs".
FWIW, with this change, I just did a successful upgrade of a 14.0-RELEASE
directly to -CURRENT.

Thanks!

Jeff.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Brooks Davis
2024-04-22 19:48:31 UTC
Permalink
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
To properly finish up this thread, Jeff was right, and
https://cgit.freebsd.org/src/commit/?id=da77a1b4f0dff was the cause.
That commit added a .include <bsd.own.mk> at the top of libcxxrt's
Makefile, which is normally fine, but not if you use SHLIBDIR?=/lib.
That sort of assignment should always be done before including any of
the bsd.*.mk files.
I have committed https://cgit.freebsd.org/src/commit/?id=911a6479e18bc
for now, which should fix the problem. It also adds an ObsoleteFiles.inc
entry for /usr/lib/libcxxrt.so.1, so the file should be removed when you
run "make delete-old-libs".
FWIW, with this change, I just did a successful upgrade of a 14.0-RELEASE
directly to -CURRENT.
Sorry about the bug. I need to think how to efficently check for that
sort of bug without causing undue pain.

-- Brooks


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Tomoaki AOKI
2024-04-20 01:35:41 UTC
Permalink
On Sat, 20 Apr 2024 01:08:20 +0100
Post by void
Post by Josef 'Jeff' Sipek
Is upgrading from 14.0-RELEASE directly to -CURRENT supposed to work? I
didn't see anything in the docs that says it shouldn't.
I think the general principle is "upgrade to latest version of thing
before upgrading major version" so for 14.0 that would involve building &
installing 14-stable and then 15-current.
Another option would be installing the latest snapshot of stable/14 as
the start line instead of 14.0-RELEASE.

https://www.freebsd.org/snapshots/

https://download.freebsd.org/snapshots/
--
Tomoaki AOKI <***@dec.sakura.ne.jp>


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Josef 'Jeff' Sipek
2024-04-22 16:28:24 UTC
Permalink
On Fri, Apr 19, 2024 at 22:05:17 -0400, Josef 'Jeff' Sipek wrote:
..
ld-elf.so.1: /lib/libcxxrt.so.1: version CXXABI_1.3.11 required by /lib/libc++.so.1 not found
So, the problem is /lib/libcxxrt.so.1 is *not* getting updated by 'make
installworld' because the newly built library ends up in /usr/lib [1]. Therefore,
the broken system has:

/lib/libcxxrt.so.1 from 14.0-RELEASE
/usr/lib/libcxxrt.so.1 from -CURRENT

ld-elf.so finds the one in /lib fails to find the required version
(CXXABI_1.3.11) and terminates.

Workaround:

# cp /usr/lib/libcxx.so.1 /lib

Even on a working system (i.e., RELEASE -> STABLE -> CURRENT), there are two
libs of different vintages:

***@odin:~ # ls -lh /lib/libcxxrt* /usr/lib/libcxxrt*
-r--r--r-- 1 root wheel 105K Mar 23 08:48 /lib/libcxxrt.so.1
-r--r--r-- 1 root wheel 350K Apr 18 20:31 /usr/lib/libcxxrt.a
lrwxr-xr-x 1 root wheel 13B Apr 18 20:31 /usr/lib/libcxxrt.so -> libcxxrt.so.1
-r--r--r-- 1 root wheel 104K Apr 18 20:31 /usr/lib/libcxxrt.so.1

I'm guessing that moving to 14-STABLE first updates the /lib copy to a version
that includes CXXABI_1.3.11 which makes the subsequent -CURRENT happy enough.

For completeness, a 14.0-RELEASE-p6 has:

***@satis$ ls -lh /lib/libcxxrt.* /usr/lib/libcxxrt.*
-r--r--r-- 1 root wheel 105K Jan 18 21:25 /lib/libcxxrt.so.1
-r--r--r-- 1 root wheel 354K Jan 18 21:27 /usr/lib/libcxxrt.a
lrwxr-xr-x 1 root wheel 23B Apr 9 2021 /usr/lib/libcxxrt.so -> ../../lib/libcxxrt.so.1

I haven't looked at the makefiles to see where things go wrong - I'll try to
take a look today after work (if nobody beats me to it).

Jeff.

[1] installworld invokes 'install -s -o root -g wheel -m 444 -C -S libcxxrt.so.1 /usr/lib'


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Dimitry Andric
2024-04-22 18:58:34 UTC
Permalink
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
Post by Josef 'Jeff' Sipek
..
ld-elf.so.1: /lib/libcxxrt.so.1: version CXXABI_1.3.11 required by /lib/libc++.so.1 not found
So, the problem is /lib/libcxxrt.so.1 is *not* getting updated by 'make
installworld' because the newly built library ends up in /usr/lib [1]. Therefore,
/lib/libcxxrt.so.1 from 14.0-RELEASE
/usr/lib/libcxxrt.so.1 from -CURRENT
ld-elf.so finds the one in /lib fails to find the required version
(CXXABI_1.3.11) and terminates.
This is very strange, and should not happen.
Agreed :)
Post by Dimitry Andric
The Makefile for libcxxrt
specifies SHLIBDIR?=/lib, so have you somehow overridden SHLIBDIR
somewhere in your environment?
Nope! This is a fresh 14.0-RELEASE install (updated to -p6 via
freebsd-update), then I log in as root, install git, get the source, and
build.
How, exactly, are you building?
See my earlier email from 19 Apr 2024 22:05:17 -0400 for details. But in
short, 'make buildworld' 'make buildkernel' 'make installkernel' 'make installworld'.
To properly finish up this thread, Jeff was right, and
https://cgit.freebsd.org/src/commit/?id=da77a1b4f0dff was the cause.
That commit added a .include <bsd.own.mk> at the top of libcxxrt's
Makefile, which is normally fine, but not if you use SHLIBDIR?=/lib.
That sort of assignment should always be done before including any of
the bsd.*.mk files.

I have committed https://cgit.freebsd.org/src/commit/?id=911a6479e18bc
for now, which should fix the problem. It also adds an ObsoleteFiles.inc
entry for /usr/lib/libcxxrt.so.1, so the file should be removed when you
run "make delete-old-libs".

-Dimitry



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Josef 'Jeff' Sipek
2024-04-22 17:21:20 UTC
Permalink
Post by Dimitry Andric
Post by Josef 'Jeff' Sipek
Post by Dimitry Andric
Post by Josef 'Jeff' Sipek
..
ld-elf.so.1: /lib/libcxxrt.so.1: version CXXABI_1.3.11 required by /lib/libc++.so.1 not found
So, the problem is /lib/libcxxrt.so.1 is *not* getting updated by 'make
installworld' because the newly built library ends up in /usr/lib [1]. Therefore,
/lib/libcxxrt.so.1 from 14.0-RELEASE
/usr/lib/libcxxrt.so.1 from -CURRENT
ld-elf.so finds the one in /lib fails to find the required version
(CXXABI_1.3.11) and terminates.
This is very strange, and should not happen.
Agreed :)
Post by Dimitry Andric
The Makefile for libcxxrt
specifies SHLIBDIR?=/lib, so have you somehow overridden SHLIBDIR
somewhere in your environment?
Nope! This is a fresh 14.0-RELEASE install (updated to -p6 via
freebsd-update), then I log in as root, install git, get the source, and
build.
How, exactly, are you building?
See my earlier email from 19 Apr 2024 22:05:17 -0400 for details. But in
short, 'make buildworld' 'make buildkernel' 'make installkernel' 'make installworld'.

Jeff.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...