Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
emerge glibc fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
necktwi
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2018
Posts: 101

PostPosted: Tue Sep 11, 2018 12:02 pm    Post subject: emerge glibc fails Reply with quote

On my RPi 3B, set to ~arm64, issued
Code:

emerge --update --deep --with-bdeps=y --newuse --ask --verbose @world

fails with
Code:
* Unable to trace static ELF: /var/tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl/elf/sln: /var/tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl/elf/sln /var/tmp/portage/sys-libs/glibc-2.27-r6/work/build-arm64-aarch64-unknown-linux-gnu-nptl/elf/symlink.list


Code:
pi3:~ # emerge --info '=sys-libs/glibc-2.27-r6::gentoo'
Portage 2.3.49 (python 3.6.5-final-0, default/linux/arm64/17.0, gcc-8.2.0, glibc-2.26-r7, 4.18.5-v8+ aarch64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.18.5-v8+-aarch64-with-gentoo-2.4.1
KiB Mem:      988676 total,    231544 free
KiB Swap:    2097148 total,   2087420 free
Timestamp of repository gentoo: Tue, 11 Sep 2018 04:30:01 +0000
Head commit of repository gentoo: 20ddf00e17356e94eb0f83bd586eb94aaa4e642e
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p2) 2.30.0
distcc 3.2rc1 aarch64-unknown-linux-gnu [enabled]
app-shells/bash:          4.4_p12::gentoo
dev-lang/perl:            5.24.3-r1::gentoo
dev-lang/python:          2.7.14-r1::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.34.11::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo, 8.2.0-r2::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.17::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="aarch64-unknown-linux-gnu"
CONFIG_PROTECT="/boot/cmdline.txt /boot/config.txt /etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe"
DISTDIR="/media/Tin/Software/Linux/RPI/Gentoo/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distcc distcc-pump distlocks ebuild-locks fixlafiles merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LC_ALL="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9 -l4"
PKGDIR="/media/Tin/Software/Linux/RPI/Gentoo/portage/packages"
PORTAGE_CONFIGROOT="/"
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="/var/tmp"
USE="acl arm64 berkdb bzip2 cli crypt cxx dri fortran gdbm iconv ipv6 libtirpc modules multilib ncurses nls nptl openmp pam pcre readline seccomp ssl tcpd unicode xattr zlib" 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="karbon plan sheets stage words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp neon thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" 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="libinput keyboard mouse" 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 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" RUBY_TARGETS="ruby21 ruby23" USERLAND="GNU" VIDEO_CARDS="vc4" 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, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Code:

pi3:~ # emerge -pqv '=sys-libs/glibc-2.27-r6::gentoo'
[ebuild     U ] sys-libs/glibc-2.27-r6 [2.26-r7] USE="multiarch%* (multilib) (-audit) -caps (-compile-locales) -doc -gd (-hardened) -headers-only -nscd -profile (-selinux) -suid -systemtap (-vanilla) (-debug%)"

https://www.dropbox.com/s/1avxd2izoqic12f/build.log
https://www.dropbox.com/s/ixu8xq40u8calv4/environment
Back to top
View user's profile Send private message
Sakaki
Apprentice
Apprentice


Joined: 21 May 2014
Posts: 228

PostPosted: Tue Sep 11, 2018 1:24 pm    Post subject: Reply with quote

necktwi,

not sure if this the same issue or completely separate, but iirc there is (or at least, used to be) a problem building arm64 glibc under distcc-pump (which I see you have enabled in FEATURES).

See e.g. https://forums.gentoo.org/viewtopic-p-8126846-highlight-glibc.html#8126846

Does it build locally (or as a pure cross-emerge)?

Edit: I think a local build should work, as glibc-2.27-r6 is present on my binhost.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
necktwi
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2018
Posts: 101

PostPosted: Tue Sep 11, 2018 1:41 pm    Post subject: Reply with quote

Hi Sakaki,

Is https://github.com/sakaki-/rpi3-overlay.git yours? My adventure started to install it.

I didn't dare to build it on RPi locally. I could pure cross-emerge if only someone helps me out with https://forums.gentoo.org/viewtopic-t-1086344-highlight-.html. Should I venture to emerge it on RPi locally? I shall try to compile it tonight, hope it finishes by tomorrow!

Thank you.

Added topic tags to link to the intended topic, to exclude the period from the link. --desultory
Back to top
View user's profile Send private message
Sakaki
Apprentice
Apprentice


Joined: 21 May 2014
Posts: 228

PostPosted: Tue Sep 11, 2018 2:01 pm    Post subject: Reply with quote

necktwi,

yes, that repo is mine (constructed with a lot of help from others on here!), for use on the gentoo-on-rpi3-64bit image.

I looked at "qlop -gH glibc" on the RPi3 build server that feeds the binhost, and it is estimating between 70 to 40 minutes for a local emerge (enforced via a package.env entry), so you shouldn't have to wait too long to see if it works.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
necktwi
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2018
Posts: 101

PostPosted: Tue Sep 11, 2018 2:11 pm    Post subject: Reply with quote

Is the issue only with glibc package? Can I use distcc-pump with rest of the system upgrade?

To speed up emerging glibc, can I drop distcc-pump alone and retain distcc?

Thank you!
Back to top
View user's profile Send private message
Sakaki
Apprentice
Apprentice


Joined: 21 May 2014
Posts: 228

PostPosted: Tue Sep 11, 2018 2:37 pm    Post subject: Reply with quote

necktwi,

yes, there aren't many packages that require special handling. One way to check is to look in the custom profile used on the gentoo-on-rpi3-64bit image, which you can browse here. Look in the package.bashrc directory for some hints as to what FEATURES etc. are and are not compatible with certain packages.

Warning: you can't (afaik) set FEATURES from within a profile, as it has no ability to specify package.env entries. If you look for example at the glibc entry here, it reads:
Code:
# there appears to be a problem building glibc under distcc
# (result is a corrupted /lib64/libc-2.2{2,3}.so which will
# make your system unbootable - and which will cause problems
# even in trying to chroot in to rescue it; see e.g.
# https://forums.gentoo.org/viewtopic-p-7911052.html)
sys-libs/glibc   suppress-distcc.conf


What this does is activate the suppress-distcc.conf entry in the bashrc directory for the sys-libs/glibc package; which reads:
Code:
# cite "suppress-distcc.conf" for package <foo> to force local
# compilation

# as this is bashrc, not env, we can't directly modify FEATURES
# (well, we can, but Portage will ignore us); so just check and warn
# user if they have the relevant feature(s) set, instead
if [[ ${EBUILD_PHASE} == "setup" ]]; then
   if grep -qw "distcc" <<<"${FEATURES}"; then
      eerror "You have the distcc FEATURE set, ${PN} may not build correctly"
      eerror "Consider restricting via /etc/portage/{env,package.env}"
   fi
   if grep -qw "distcc-pump" <<<"${FEATURES}"; then
      eerror "You have the distcc-pump FEATURE set, ${PN} may not build correctly"
      eerror "Consider restricting via /etc/portage/{env,package.env}"
   fi
fi

# prevent processor overload when running locally
# do this in the prepare phase, as it may be used in sed edits of makefiles
# etc.; this change will persist through to compile phase

# define SUPPRESS_BASHRC_MAKEOPTS=1 on the command line, or in a
# package.env file, to override this behaviour for a given package
if [[ ${EBUILD_PHASE} == "prepare" ]]; then
        if [[ ${SUPPRESS_BASHRC_MAKEOPTS:+1} ]]; then
                ewarn 'MAKEOPTS not forced'
        else
      ewarn 'Forcing MAKEOPTS="-j5 -l4"'
      MAKEOPTS="-j5 -l4"
   fi
fi


So the code is just issuing an error if the distcc or distcc-pump FEATURES are set (it does actually change the MAKEOPTS though).

To actually suppress distcc for this package on your machine, set up e.g. the following in /etc/portage/env/suppress-distcc.conf:
Code:
# cite "suppress-distcc.conf" for package <foo> in
# /etc/portage/package.env/<foo>, to force local compilation

FEATURES="-distcc -distcc-pump"
# prevent processor overload when running locally
MAKEOPTS="-j5 -l4"


and then place the following in /etc/portage/package.env/glibc: (basically copied from the profile package.bashrc file):

Code:
# there appears to be a problem building glibc under distcc
# (result is a corrupted /lib64/libc-2.2x.so which will
# make your system unbootable - and which will cause problems
# even in trying to chroot in to rescue it; see e.g.
# https://forums.gentoo.org/viewtopic-p-7911052.html)
sys-libs/glibc   suppress-distcc.conf


This will then force local compilation for that package only.

As to your question, if krinn is correct in this post, it is distcc-pump that is the issue, so maybe distcc alone would be OK. I must confess to never trying the experiment.
_________________
Regards,

sakaki
Back to top
View user's profile Send private message
necktwi
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2018
Posts: 101

PostPosted: Tue Sep 11, 2018 4:26 pm    Post subject: Reply with quote

Code:

FEATURES="-distcc-pump" emerge --ask sys-libs/glibc

finished in about 80 min slightly more than expected.

I shall configure glibc without distcc and distcc-pump and note the duration on next update.

Thank you, I feel I'm already getting hold of Gentoo, never been in a better community or I'm taking a quick pace as things fall together.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum