1 |
The failure happens when live glibc-9999 ebuild is installed: |
2 |
* QA Notice: Missing gen_usr_ldscript for libm-2.26.90.so |
3 |
* ERROR: sys-libs/glibc-9999::gentoo failed: |
4 |
* add those ldscripts |
5 |
|
6 |
The problem here is how upstream glibc version is detected: |
7 |
dosym ../../$(get_libdir)/libm-${PV}.so $(alt_usrlibdir)/libm-${PV}.so |
8 |
|
9 |
Change to use 'version.h' to pick upstream version. |
10 |
|
11 |
Signed-off-by: Sergei Trofimovich <slyfox@g.o> |
12 |
--- |
13 |
eclass/toolchain-glibc.eclass | 8 ++++++-- |
14 |
1 file changed, 6 insertions(+), 2 deletions(-) |
15 |
|
16 |
diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass |
17 |
index 1d6a54a37f1..83d6293c6cb 100644 |
18 |
--- a/eclass/toolchain-glibc.eclass |
19 |
+++ b/eclass/toolchain-glibc.eclass |
20 |
@@ -1138,10 +1138,14 @@ toolchain-glibc_do_src_install() { |
21 |
cp -a elf/ld.so "${ED}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" |
22 |
fi |
23 |
|
24 |
+ # Normally real_pv is ${PV}. Live ebuilds are exception, there we need |
25 |
+ # to infer upstream version: |
26 |
+ # '#define VERSION "2.26.90"' -> '2.26.90' |
27 |
+ local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) |
28 |
# Newer versions get fancy with libm linkage to include vectorized support. |
29 |
# While we don't really need a ldscript here, portage QA checks get upset. |
30 |
- if [[ -e ${ED}$(alt_usrlibdir)/libm-${PV}.a ]] ; then |
31 |
- dosym ../../$(get_libdir)/libm-${PV}.so $(alt_usrlibdir)/libm-${PV}.so |
32 |
+ if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then |
33 |
+ dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so |
34 |
fi |
35 |
|
36 |
# We'll take care of the cache ourselves |
37 |
-- |
38 |
2.14.0 |