Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 495996 - sys-libs/glibc fails to install from binary pkg
Summary: sys-libs/glibc fails to install from binary pkg
Status: RESOLVED DUPLICATE of bug 473728
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Portage team
URL:
Whiteboard:
Keywords:
: 496020 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-25 14:18 UTC by Agostino Sarubbo
Modified: 2014-06-14 22:51 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
tar tvvf (file_495996.txt,113.56 KB, text/plain)
2013-12-25 15:16 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2013-12-25 14:18:10 UTC
>>> Emerging binary (1 of 1) sys-libs/glibc-2.16.0
 * glibc-2.16.0.tbz2 size ;-) ...                                        [ ok ]
>>> Extracting info
>>> Extracting sys-libs/glibc-2.16.0

>>> Installing (1 of 1) sys-libs/glibc-2.16.0
 * checking 1362 files for package collisions
1000 files checked ...
>>> Merging sys-libs/glibc-2.16.0 to /
sed: can't read /tmp/portage/sys-libs/glibc-2.16.0/image//etc/host.conf: No such file or directory
 * Defaulting /etc/host.conf:multi to on
/var/tmp/portage/sys-libs/glibc-2.16.0/temp/environment: line 2403: pushd: /tmp/portage/sys-libs/glibc-2.16.0/image//lib64: No such file or directory
/var/tmp/portage/sys-libs/glibc-2.16.0/temp/environment: line 2411: ./ld-*.so: No such file or directory
 * ERROR: sys-libs/glibc-2.16.0::gentoo failed (preinst phase):
 *   simple run test (/bin/date) failed
 * 
 * Call stack:
 *     ebuild.sh, line   93:  Called pkg_preinst
 *   environment, line 3104:  Called eblit-run 'pkg_preinst'
 *   environment, line  979:  Called eblit-glibc-pkg_preinst
 *   environment, line  793:  Called glibc_sanity_check
 *   environment, line 2411:  Called die
 * The specific snippet of code:
 *           ./ld-*.so --library-path . ${x} > /dev/null || die "simple run test (${x}) failed";
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/glibc-2.16.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/glibc-2.16.0::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/glibc-2.16.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/glibc-2.16.0/temp/environment'.
 * Working directory: '/'
 * S: '/var/tmp/portage/sys-libs/glibc-2.16.0/work/glibc-2.16.0'
!!! FAILED preinst: 1


The pkg was made with: quickpkg --include-config y glibc
Comment 1 Agostino Sarubbo gentoo-dev 2013-12-25 14:18:49 UTC
Portage 2.2.7 (default/linux/amd64/13.0/no-multilib, gcc-4.7.3, glibc-2.15-r3, 3.2.52-hardened-r1 x86_64)
=================================================================
System uname: Linux-3.2.52-hardened-r1-x86_64-Intel-R-_Atom-TM-_CPU_N455_@_1.66GHz-with-gentoo-2.2
KiB Mem:     1007464 total,    166928 free
KiB Swap:    2047996 total,   2046132 free
Timestamp of tree: Tue, 24 Dec 2013 11:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3
dev-util/cmake:           2.8.11.2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6, 1.12.6, 1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)                                                                                                                                  
sys-libs/glibc:           2.15-r3                                                                                                                                                   
Repositories: gentoo ago x-portage                                                                                                                                                  
ACCEPT_KEYWORDS="amd64"                                                                                                                                                             
ACCEPT_LICENSE="*"                                                                                                                                                                  
CBUILD="x86_64-pc-linux-gnu"                                                                                                                                                        
CFLAGS="-O2 -pipe -march=x86-64"                                                                                                                                                    
CHOST="x86_64-pc-linux-gnu"                                                                                                                                                         
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/themes/oxygen-gtk/gtk-2.0 /usr/share/themes/oxygen-gtk/gtk-3.0"                                    
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"                    
CXXFLAGS="-O2 -pipe -march=x86-64"                                                                                                                                                  
DISTDIR="/media/dati/portage/distfiles"                                                                                                                                             
EMERGE_DEFAULT_OPTS="--with-bdeps y --ignore-built-slot-operator-deps y"                                                                                                            
FCFLAGS="-O2 -pipe"                                                                                                                                                                 
FEATURES="assume-digests binpkg-logs collision-protect config-protect-if-modified 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"                                                       
FFLAGS="-O2 -pipe"                                                                                                                                                                  
GENTOO_MIRRORS="http://distfiles.gentoo.org"                                                                                                                                        
LANG="it_IT.UTF-8"                                                                                                                                                                  
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"                                                                                                                              
MAKEOPTS="-j2"                                                                                                                                                                      
PKGDIR="/media/dati/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"                                                                                                                                        
PORTAGE_TMPDIR="/var/tmp"                                                                                                                                                           
PORTDIR="/media/dati/portage"                                                                                                                                                       
PORTDIR_OVERLAY="/var/lib/layman/ago /usr/local/portage"                                                                                                                            
SYNC="rsync://rsync.gentoo.org/gentoo-portage"                                                                                                                                      
USE="X aac acl alsa amd64 berkdb bzip2 cairo cli cracklib crypt custom-cflags cxx dri dvb fortran gdbm iconv jpeg jpeg2k kde lame mmx modules mp3 mudflap ncurses networkmanager nptl ogg opengl openmp pam pcre png qt3support qt4 readline session sse sse2 ssl symlink systemd tcpd tiff unicode vorbis zlib" ABI_X86="64" ALSA_CARDS="hda-intel" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en en_GB" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="intel"
USE_PYTHON="2.7"
Comment 2 SpanKY gentoo-dev 2013-12-25 15:08:51 UTC
attach the output of `tar tvvf` on the tarball.  i doubt this error is glibc's fault at all.
Comment 3 Agostino Sarubbo gentoo-dev 2013-12-25 15:16:22 UTC
Created attachment 366174 [details]
tar tvvf
Comment 4 Agostino Sarubbo gentoo-dev 2013-12-25 15:23:51 UTC
btw it didn't happen for 2.15
Comment 5 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2013-12-25 18:11:18 UTC
*** Bug 496020 has been marked as a duplicate of this bug. ***
Comment 6 Leho Kraav (:macmaN @lkraav) 2013-12-25 18:15:54 UTC
Meh, I knew searching for "glibc_sanity_check" alone wasn't a good idea :)

From the duplicate bug:


glibc binary package on client machines installed failed with

"glibc simple run test (/bin/date) failed"


This is caused by:

 * ${ED} is set to buildhost's build image directory, such as /mnt/datapool/tmp/portage/sys-libs/glibc-2.16.0

 * glibc_sanity_check() runs 'pushd "${ED}"/$(get_libdir) > /dev/null', but this instance of ${ED} may not exist on the client

 * ./ld-*.so therefore cannot always be found to be executed

${ED} is saved in binpkg's environment, causing the whole ruckus.

My workaround is to create the buildhost's image directory structure on the client machine. Binary package then installed correctly.

Not sure what the proper solution to this is. Thoughts?
Comment 7 Michael Weber (RETIRED) gentoo-dev 2014-03-05 22:16:26 UTC
I see the same problem with 2.18-r1.
Comment 8 dwfreed 2014-03-07 03:18:36 UTC
The source of the issue is differences in PORTAGE_TMPDIR between hosts.  Binpkgs include the environment file, which includes the setting of D, ED, and other ebuild variables, and it looks like portage is not recalculating their values based on PORTAGE_TMPDIR, and is instead choosing to use their defined values in the environment file.  I see two possible solutions:

* Change the way the environment file is written, such that anything defined under PORTAGE_TMPDIR is defined in the environment file as variable="${PORTAGE_TMPDIR}"/path/to/wherever
  * Optionally, extend this to include any variable defined by PMS

* Ignore the environment file for any variable defined by PMS, and define those variables fresh when starting the binpkg merge run.  This works because no variables that portage defines relative to PORTAGE_TMPDIR are guaranteed to be consistent between src_* phases and pkg_* phases.  This has the benefit of catching ebuilds that violate this rule of PMS:

"Because of their special meanings, these variables may not be preserved consistently across all phases as would normally happen due to environment saving (see 11.2). For example, EBUILD_PHASE is different for every phase, and ROOT may have changed between the various different pkg_* phases. Ebuilds must recalculate any variable they derive from an inconsistent variable." [1]

This'll happen with any portage generated binpkg, either via quickpkg, or --buildpkg and friends.

[1]: http://dev.gentoo.org/~ulm/pms/head/pms.html#x1-11800011.1
Comment 9 SpanKY gentoo-dev 2014-06-14 22:51:12 UTC

*** This bug has been marked as a duplicate of bug 473728 ***