Gentoo Archives: gentoo-dev

From: Sergei Trofimovich <slyfox@g.o>
To:
Cc: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Re: [PATCH] toolchain-glibc.eclass: fix libm.so symlinking for live glibc
Date: Fri, 11 Aug 2017 08:14:56
Message-Id: 20170811091442.0b13c595@sf
In Reply to: [gentoo-dev] Re: [PATCH] toolchain-glibc.eclass: fix libm.so symlinking for live glibc by Duncan <1i5t5.duncan@cox.net>
1 On Thu, 10 Aug 2017 21:41:24 +0000 (UTC)
2 Duncan <1i5t5.duncan@×××.net> wrote:
3
4 > Sergei Trofimovich posted on Tue, 08 Aug 2017 16:53:22 +0100 as excerpted:
5 >
6 > > The failure happens when live glibc-9999 ebuild is installed:
7 > > * QA Notice: Missing gen_usr_ldscript for libm-2.26.90.so * ERROR:
8 > > sys-libs/glibc-9999::gentoo failed:
9 > > * add those ldscripts
10 > >
11 > > The problem here is how upstream glibc version is detected:
12 > > dosym ../../$(get_libdir)/libm-${PV}.so
13 > > $(alt_usrlibdir)/libm-${PV}.so
14 > >
15 > > Change to use 'version.h' to pick upstream version.
16 >
17 > Interesting that it's libm. See bug #627378
18 >
19 > https://bugs.gentoo.org/627378
20 >
21 > ... where ~arch glibc-2.25-r2 (apparently) allows the symlink creation
22 > line above to clobber the original library binary, in usr merge (/lib64
23 > and /usr/lib64 are the same dir) cases, or at least when /usr -> . (aka
24 > "reverse" usr merge).
25 >
26 > Comment #4 says it's not new code, thus the "(apparently)" above
27
28 What is your point there? I'm afraid I lost you.
29
30 (being an eclass) All the glibc ebuilds do this same libm symlinking.
31 Live ebuild was broken for quite a while because upstream
32 never installed libm-9999.a files.
33
34 > but
35 > perhaps it's acting differently now due to the recent migration away from
36 > eblits? What I know for sure is that the upgrade broke my system until I
37 > manually copied the libm binary from the binpkg back into place.
38
39 You can check if it's a new breakage by setting up a chroot:
40 - with your '/usr -> .' symlinks set
41 - with pre-eblits glibc portage tree by rewinding git ::gentoo
42 - install any glibc version from there to chech if the breakage is new
43
44 I suspect it's not a new breakage. Because glibc does not check
45 symlink state on a live system (and it should not). portage does peform
46 merge into live system phase and writes two files into the same path.
47
48 portage would be a better place to detect symlink collision and save your system.
49
50 I think this discussion belongs to https://bugs.gentoo.org/627378
51
52 --
53
54 Sergei

Replies