From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0E7D21396D0 for ; Tue, 8 Aug 2017 15:53:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 03FBA1FC018; Tue, 8 Aug 2017 15:53:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9C1271FC007 for ; Tue, 8 Aug 2017 15:53:29 +0000 (UTC) Received: from sf.home (host81-147-13-211.range81-147.btcentralplus.com [81.147.13.211]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id 707BA3419F0; Tue, 8 Aug 2017 15:53:28 +0000 (UTC) Received: by sf.home (Postfix, from userid 1000) id 9D13F1C1F2E77; Tue, 8 Aug 2017 16:53:24 +0100 (BST) From: Sergei Trofimovich To: gentoo-dev@lists.gentoo.org, toolchain@gentoo.org Cc: Sergei Trofimovich Subject: [gentoo-dev] [PATCH] toolchain-glibc.eclass: fix libm.so symlinking for live glibc Date: Tue, 8 Aug 2017 16:53:22 +0100 Message-Id: <20170808155322.16552-1-slyfox@gentoo.org> X-Mailer: git-send-email 2.14.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 62a843fd-20dd-44b3-b79e-3cf53661ae4a X-Archives-Hash: 38b0f389afb0bb616631a90c241893a7 The failure happens when live glibc-9999 ebuild is installed: * QA Notice: Missing gen_usr_ldscript for libm-2.26.90.so * ERROR: sys-libs/glibc-9999::gentoo failed: * add those ldscripts The problem here is how upstream glibc version is detected: dosym ../../$(get_libdir)/libm-${PV}.so $(alt_usrlibdir)/libm-${PV}.so Change to use 'version.h' to pick upstream version. Signed-off-by: Sergei Trofimovich --- eclass/toolchain-glibc.eclass | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain-glibc.eclass b/eclass/toolchain-glibc.eclass index 1d6a54a37f1..83d6293c6cb 100644 --- a/eclass/toolchain-glibc.eclass +++ b/eclass/toolchain-glibc.eclass @@ -1138,10 +1138,14 @@ toolchain-glibc_do_src_install() { cp -a elf/ld.so "${ED}"$(alt_libdir)/$(scanelf -qSF'%S#F' elf/ld.so) || die "copying nptl interp" fi + # Normally real_pv is ${PV}. Live ebuilds are exception, there we need + # to infer upstream version: + # '#define VERSION "2.26.90"' -> '2.26.90' + local upstream_pv=$(sed -n -r 's/#define VERSION "(.*)"/\1/p' "${S}"/version.h) # Newer versions get fancy with libm linkage to include vectorized support. # While we don't really need a ldscript here, portage QA checks get upset. - if [[ -e ${ED}$(alt_usrlibdir)/libm-${PV}.a ]] ; then - dosym ../../$(get_libdir)/libm-${PV}.so $(alt_usrlibdir)/libm-${PV}.so + if [[ -e ${ED}$(alt_usrlibdir)/libm-${upstream_pv}.a ]] ; then + dosym ../../$(get_libdir)/libm-${upstream_pv}.so $(alt_usrlibdir)/libm-${upstream_pv}.so fi # We'll take care of the cache ourselves -- 2.14.0