Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 729830

Summary: =dev-perl/Unicode-LineBreak-2019.1.0 calls 'ar' directly: /bin/sh: ar: command not found
Product: Gentoo Linux Reporter: Sergei Trofimovich <slyfox>
Component: Current packagesAssignee: Gentoo Perl team <perl>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 243502    
Attachments: dev-perl:Unicode-LineBreak-2019.1.0:20200627-093107.log

Description Sergei Trofimovich gentoo-dev 2020-06-27 09:34:15 UTC
Created attachment 646668 [details]
dev-perl:Unicode-LineBreak-2019.1.0:20200627-093107.log

The build failure is observed on sys-devel/binutils-config[-native-symlinks] system as:

"""
ar cr "libsombok.a" lib/8.0.0.o lib/break.o lib/charprop.o lib/gcstring.o lib/linebreak.o lib/southeastasian.o lib/utf8.o lib/utils.o
/bin/sh: ar: command not found
make[1]: *** [Makefile:496: libsombok.a] Error 12
"""
Comment 1 Sergei Trofimovich gentoo-dev 2020-06-27 09:39:48 UTC
Looking at Makefile it did not resolve 'ar' to ${CHOST}- prefixed value:

"""
# These definitions are from config.sh (via /usr/lib64/perl5/5.30.3/x86_64-linux/Config.pm).
# They may have been overridden via Makefile.PL or on the command line.
AR = ar
CC = x86_64-pc-linux-gnu-gcc
CCCDLFLAGS = -fPIC
CCDLFLAGS = -Wl,-E
DLEXT = so
DLSRC = dl_dlopen.xs
EXE_EXT =
FULL_AR = ar
LD = x86_64-pc-linux-gnu-gcc
"""
Comment 2 Sergei Trofimovich gentoo-dev 2020-07-13 18:24:01 UTC
Probably comes from Config_heavy.pl:

    $ fgrep "'ar'" /usr/lib64/perl5/5.30.3/x86_64-linux/Config_heavy.pl
    ar='ar'
    full_ar='ar'

That comes from dev-lang/perl-5.30.3.

dev-lang/perl-5.30.3-r1 seems to have it fixed:

    $ fgrep "ar'" ./perl-5.30.3/lib/Config_heavy.pl
    ar='x86_64-pc-linux-gnu-ar'
    config_arg15='-Dar=x86_64-pc-linux-gnu-ar'
    full_ar='/usr/bin/x86_64-pc-linux-gnu-ar'

Let's see if it's intentional.
Comment 3 Sergei Trofimovich gentoo-dev 2020-07-13 18:40:20 UTC
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e248fc47ab1dc43a759dbcff3039bef1874990de seems to add the 'ar' overrides:

--- perl-5.30.3.ebuild	2020-06-08 07:12:59.000000000 +0100
+++ perl-5.30.3-r1.ebuild	2020-06-15 02:00:06.000000000 +0100
@@ -504,2 +504,4 @@

+	# setting -Dld= to tc-getLD breaks perl and all perl things
+	# https://github.com/Perl/perl5/issues/17791#issuecomment-630145202
 	myconf \
@@ -508,2 +510,6 @@
 		-Dcc="$(tc-getCC)" \
+		-Dar="$(tc-getAR)" \
+		-Dnm="$(tc-getNM)" \
+		-Dcpp="$(tc-getCPP)" \
+		-Dranlib="$(tc-getRANLIB)" \
 		-Doptimize="${CFLAGS}" \