Created attachment 516784 [details] perl-5.26.1-r1-build.log $ emerge --info Portage 2.3.20 (python 3.6.4-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-7.2.0, glibc-2.26-r5, 4.14.11-coreos x86_64) ================================================================= System uname: Linux-4.14.11-coreos-x86_64-Intel_Core_Processor_-Skylake-with-glibc2.3.4 KiB Mem: 7474104 total, 4100252 free KiB Swap: 0 total, 0 free Timestamp of repository gentoo: Fri, 26 Jan 2018 12:00:01 +0000 Head commit of repository gentoo: 2c642eb0a95b4de9510590acdb3afc76f83921f0 sh bash 4.4_p12-r1 ld GNU ld (Gentoo 2.29.1 p3) 2.29.1 app-shells/bash: 4.4_p12-r1::gentoo dev-lang/perl: 5.26.1-r1::gentoo dev-lang/python: 2.7.14-r1::gentoo, 3.5.4-r1::gentoo, 3.6.4::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.4.1-r2::gentoo sys-apps/sandbox: 2.12::gentoo sys-devel/autoconf: 2.69-r4::gentoo sys-devel/automake: 1.15.1-r1::gentoo sys-devel/binutils: 2.29.1-r1::gentoo sys-devel/gcc: 7.2.0-r1::gentoo sys-devel/gcc-config: 1.9.1::gentoo sys-devel/libtool: 2.4.6-r4::gentoo sys-devel/make: 4.2.1-r1::gentoo sys-kernel/linux-headers: 4.14::gentoo (virtual/os-headers) sys-libs/glibc: 2.26-r5::gentoo Repositories: gentoo location: /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-extra-opts: ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -O2 -pipe" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc" CONFIG_PROTECT_MASK="/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/etc/gentoo-release /etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -O2 -pipe" DISTDIR="/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j4" PKGDIR="/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/usr/portage/packages" PORTAGE_CONFIGROOT="/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp" USE="acl amd64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 modules ncurses nls nptl openmp pcre prefix readline seccomp ssl tcpd unicode zlib" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python3_6 python3_5 python2_7" RUBY_TARGETS="ruby22 ruby23" USERLAND="GNU" VIDEO_CARDS="modesetting i915 i965 intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LINGUAS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS $ emerge -pv perl These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] dev-lang/perl-5.26.1-r1:0/5.26::gentoo USE="berkdb* gdbm* -debug -doc -ithreads" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB Relevant error: Running pm_to_blib for dist/ExtUtils-CBuilder directly Generating a Unix-style Makefile Writing Makefile for Errno make[1]: Entering directory '/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1/ext/Errno' LD_LIBRARY_PATH=/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1 /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1/preload /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1/libperl.so.5.26.1 ./miniperl -Ilib make_ext.pl cpan/ExtUtils-Constant/pm_to_blib MAKE="make" LIBPERL_A=libperl.so.5.26.1 Running pm_to_blib for cpan/ExtUtils-Constant directly LD_LIBRARY_PATH=/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1 /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1/preload /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1/libperl.so.5.26.1 ./miniperl -Ilib make_ext.pl cpan/ExtUtils-Install/pm_to_blib MAKE="make" LIBPERL_A=libperl.so.5.26.1 Running pm_to_blib for cpan/ExtUtils-Install directly "../../miniperl" "-I../../lib" Errno_pm.PL Errno.pm LD_LIBRARY_PATH=/cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1 /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1/preload /cvmfs/sft.cern.ch/lcg/contrib/gentoo/linux/var/tmp/portage/dev-lang/perl-5.26.1-r1/work/perl-5.26.1/libperl.so.5.26.1 ./miniperl -Ilib make_ext.pl cpan/ExtUtils-MakeMaker/pm_to_blib MAKE="make" LIBPERL_A=libperl.so.5.26.1 Cannot find errno.h at Errno_pm.PL line 138. make[1]: *** [Makefile:430: Errno.pm] Error 2
Is it just bootstrapped or migrated from prefix/linux-standalone? If it is the latter, following https://www.gentoo.org/support/news-items/2017-11-30-new-17-profiles.html would be necessary.
amadio, would you mind digging into "../../miniperl" "-I../../lib" Errno_pm.PL Errno.pm to see exactly what gcc invoke gives this error?
Hi Benda, this was a fresh bootstrap. I will have a look for the cause and report it here. However, it looks like the paths looked at are hardcoded when generating Errno.pm, so we will have to add $EPREFIX/usr/include with a patch.
(In reply to Guilherme Amadio from comment #3) > Hi Benda, this was a fresh bootstrap. I will have a look for the cause and > report it here. However, it looks like the paths looked at are hardcoded > when generating Errno.pm, so we will have to add $EPREFIX/usr/include with a > patch. Is it failing during `emerge -e @system`? The bottom line is, if $EPREFIX/usr/include need to be added, the toolchain is screwed, and we need to fix that instead. That said, if I were you, I would put Comment 2 into priority before inspecting the toolchain.
Hi Benda, I don't think it's the toolchain. There is a script to generate the source file, it's that script that has hard-coded search paths and fails to find errno.h.
(In reply to Guilherme Amadio from comment #5) > Hi Benda, I don't think it's the toolchain. There is a script to generate > the source file, it's that script that has hard-coded search paths and fails > to find errno.h. I see! CoreOS might have revealed this bug for us.
I see this on OpenIndiana: x86_64-pc-solaris2.11-gcc -m64 -o miniperl \ opmini.o perlmini.o gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro_core.o keywords.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl .o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o globals.o p erlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o caretx.o dquo te.o time64.o miniperlmain.o -lpthread -lsocket -ldl -lm -lc /gentoo/prefix64/usr/x86_64-pc-solaris2.11/binutils-bin/2.29.1/ld: pp_sys.o: und efined reference to symbol 'h_errno@@SUNW_0.7' /lib/amd64/libnsl.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [makefile:357: lib/buildcustomize.pl] Error 1 make: *** Waiting for unfinished jobs.... * ERROR: dev-lang/perl-5.26.1-r2::gentoo_prefix failed (compile phase): Perhaps related?
Hi Fabian, Yes, it could be related. I already have a fix, though. I will push it soon and we will find out.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=475f23e198ba9e76dad67a8762eef64c037c55f3 commit 475f23e198ba9e76dad67a8762eef64c037c55f3 Author: Guilherme Amadio <amadio@gentoo.org> AuthorDate: 2018-03-02 09:19:33 +0000 Commit: Guilherme Amadio <amadio@gentoo.org> CommitDate: 2018-03-05 19:29:27 +0000 dev-lang/perl: use errno.h from prefix, bug #645804 Closes: https://bugs.gentoo.org/645804 Package-Manager: Portage-2.3.24, Repoman-2.3.6 dev-lang/perl/perl-5.26.1-r2.ebuild | 5 +++++ 1 file changed, 5 insertions(+)
This breaks prefix-guest, which uses host libc...
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=773709ec686624a37ca8bd1725bdb6739bd2b278 commit 773709ec686624a37ca8bd1725bdb6739bd2b278 Author: Michael Haubenwallner <haubi@gentoo.org> AuthorDate: 2018-05-17 10:29:53 +0000 Commit: Michael Haubenwallner <haubi@gentoo.org> CommitDate: 2018-05-17 10:31:12 +0000 dev-lang/perl: use host errno.h with prefix-guest, bug #645804 Closes: https://bugs.gentoo.org/645804 Package-Manager: Portage-2.3.24, Repoman-2.3.6 dev-lang/perl/perl-5.26.2.ebuild | 2 +- dev-lang/perl/perl-5.26.9999.ebuild | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
I meet this bug again. I'm trying install a fresh prefix bootstrap. meet this error on stage3. I checked Errno_pm.PL, found the search path root at line 132 was: ${EPRIFIX}/tmp/ It should been modified by these lines in perl-5.26.2.ebuild: # Use errno.h from prefix rather than from host system, bug #645804 if use prefix && ! use prefix-guest; then sed -i "/my..sysroot/s:'':'${EPREFIX}':" ext/Errno/Errno_pm.PL || die fi I found errno.h in ${EPREFIX}/usr/include/. but ${EPREFIX}/tmp/usr/include/ do not contain errno.h. seem bootstrap-prefix script change the environment variable ${EPREFIX} to ${EPREFIX}/tmp cause this?
This should check the existence of errno.h in the Prefix IMO.
During stage3, EPREFIX should always be ${EPREFIX}, not ${EPREFIX}/tmp.