Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 293603 - ED variable triggers QA Notice: Missing gen_usr_ldscript
Summary: ED variable triggers QA Notice: Missing gen_usr_ldscript
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Portage team
URL: http://forums.gentoo.org/viewtopic-p-...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 288499
  Show dependency tree
 
Reported: 2009-11-18 09:36 UTC by Lukas Polacek
Modified: 2009-11-21 05:17 UTC (History)
2 users (show)

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


Attachments
blacklist $ED from the environment (blacklist_ed.patch,571 bytes, patch)
2009-11-19 21:18 UTC, Zac Medico
Details | Diff
blacklist ED, EPREFIX, and EROOT variables from the environment (blacklist_prefix.patch,594 bytes, patch)
2009-11-20 04:59 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Polacek 2009-11-18 09:36:36 UTC
These packages failed to build on my system: zlib-1.2.3-r1, bzip2-1.0.5-r1, tcp-wrappers-7.6, attr-2.4.43, openrc-0.5.2{,-r1,-r2}. Here is an example of such an error.

 * QA Notice: Missing gen_usr_ldscript for libbz2.so 
 * 
 * ERROR: app-arch/bzip2-1.0.5-r1 failed. 
 * Call stack: 
 *       misc-functions.sh, line 729:  Called install_qa_check 
 *       misc-functions.sh, line 336:  Called die 
 * The specific snippet of code: 
 *      [[ ${abort} == "yes" ]] && die "add those ldscripts" 
 *  The die message: 
 *   add those ldscripts

Resync and updating profile didn't help. I have solved the problem by commenting out a line in /usr/lib64/portage/bin/misc-functions.sh

Reproducible: Always

Steps to Reproduce:
1. For example run "emerge -1 =openrc-0.5.2-r2"
Actual Results:  
Installation is unsuccessful.

Expected Results:  
Installation should be successful.

See http://forums.gentoo.org/viewtopic-p-6061706.html#6061706. Commenting out line 328 in /usr/lib64/portage/bin/misc-functions.sh helped.
Comment 1 Lukas Polacek 2009-11-18 09:37:25 UTC
Portage 2.1.6.13 (default/linux/amd64/10.0/desktop, gcc-4.3.4, glibc-2.9_p20081201-r2, 2.6.31-gentoo-r6 x86_64)                                                                                                 
=================================================================                                                                                                                                               
System uname: Linux-2.6.31-gentoo-r6-x86_64-Intel-R-_Core-TM-2_Duo_CPU_P8700_@_2.53GHz-with-gentoo-2.0.1                                                                                                        
Timestamp of tree: Tue, 17 Nov 2009 22:45:03 +0000                                                                                                                                                              
app-shells/bash:     4.0_p28                                                                                                                                                                                    
dev-java/java-config: 2.1.9-r1                                                                                                                                                                                  
dev-lang/python:     2.6.2-r1                                                                                                                                                                                   
dev-python/pycrypto: 2.0.1-r8                                                                                                                                                                                   
dev-util/cmake:      2.6.4-r3                                                                                                                                                                                   
sys-apps/baselayout: 2.0.1                                                                                                                                                                                      
sys-apps/openrc:     0.5.2-r2                                                                                                                                                                                   
sys-apps/sandbox:    1.6-r2                                                                                                                                                                                     
sys-devel/autoconf:  2.13, 2.63-r1                                                                                                                                                                              
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2                                                                                                                                                       
sys-devel/binutils:  2.18-r3                                                                                                                                                                                    
sys-devel/gcc-config: 1.4.1                                                                                                                                                                                     
sys-devel/libtool:   2.2.6a                                                                                                                                                                                     
virtual/os-headers:  2.6.27-r2                                                                                                                                                                                  
ACCEPT_KEYWORDS="amd64"                                                                                                                                                                                         
CBUILD="x86_64-pc-linux-gnu"                                                                                                                                                                                    
CFLAGS="-O2 -march=core2 -mtune=core2 -pipe -fomit-frame-pointer"                                                                                                                                               
CHOST="x86_64-pc-linux-gnu"                                                                                                                                                                                     
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"                                                                                                        
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"                                                                                                                          
CXXFLAGS="-O2 -march=core2 -mtune=core2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.supp.name/ http://gentoo.tiscali.nl/ http://mirror.uni-c.dk/pub/gentoo/"
LANG="C"
LC_ALL="C"
LDFLAGS="-Wl,-O1"
LINGUAS="en sk"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/kde-testing /usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X a52 aac acl acpi alsa amd64 avahi bash-completion berkdb branding bzip2 cairo cdr cli consolekit cpudetection cracklib crypt cups dbus dri dts dvd dvdr emboss encode evo exif fam firefox firefox3 flac gcj gdbm gif gmp gpm gtk hal iconv imagemagick ipod ipv6 jabber java jingle jpeg jpeg2k kde kerberos lastfm latex ldap libnotify mad matroska mikmod mjpeg mmx mmxext mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses network nls nptl nptlonly nsplugin ogg opengl openmp pam pch pcre pdf plasma png policykit ppds pppd pulseaudio python qt3support qt4 quicktime readline reflection sasl semantic-desktop session spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora thunar tiff truetype unicode usb vim-syntax vorbis vv x264 xinerama xml xorg xscreensaver xulrunner xv xvid zeroconf zip zlib zsh-completion" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="adpcm alaw asym copy dshare dmix dsnoop empty extplug file ioplug lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="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 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" ELIBC="glibc" FOO2ZJS_DEVICES="hp1005" INPUT_DEVICES="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en sk" SANE_BACKENDS="hpljm1005" USERLAND="GNU" VIDEO_CARDS="radeon radeonhd fglrx"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Harald van Dijk (RETIRED) gentoo-dev 2009-11-18 21:55:20 UTC
As discussed on the forums, this breaks because ED is set to something unexpected. Just try ED=/usr/bin/vim emerge zlib. Is there any way for portage and/or the eclass to handle this better?
Comment 3 Fabian Groffen gentoo-dev 2009-11-19 12:15:05 UTC
ED comes from the prefix world, council rejected to make these vars protected.

we can work around this for now by not setting ED if not set, but always setting it if `use !prefix`
Comment 4 Fabian Groffen gentoo-dev 2009-11-19 12:17:01 UTC
e.g. this:

Index: toolchain-funcs.eclass
===================================================================
--- toolchain-funcs.eclass      (revision 53774)
+++ toolchain-funcs.eclass      (working copy)
@@ -439,7 +439,7 @@
 # correctly to point to the latest version of the library present.
 gen_usr_ldscript() {
        local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname)
-       [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/
+       use prefix || local ED=${D}
 
        tc-is-static-only && return
 
Comment 5 Zac Medico gentoo-dev 2009-11-19 16:25:44 UTC
Hmm, maybe the prefix code just needs to make sure that ED is not exported, so as not to interfere. For example, in places like toolchain-funcs.eclass, Call 'export -n ED' before setting it.
Comment 6 Zac Medico gentoo-dev 2009-11-19 16:28:11 UTC
(In reply to comment #5)
> Hmm, maybe the prefix code just needs to make sure that ED is not exported, so
> as not to interfere. For example, in places like toolchain-funcs.eclass, Call
> 'export -n ED' before setting it.

Oh, nevermind. I see that the problem is that it's already exported. I guess we can just blacklist that particular variable from the ebuild environment.
Comment 7 Zac Medico gentoo-dev 2009-11-19 21:18:49 UTC
Created attachment 210645 [details, diff]
blacklist $ED from the environment

Save this patch as /tmp/blacklist_ed.patch and apply as follows:

  patch /usr/lib/portage/pym/portage/__init__.py /tmp/blacklist_ed.patch
Comment 8 Fabian Groffen gentoo-dev 2009-11-19 21:32:29 UTC
At the same time EPREFIX and EROOT should be blacklisted like that, because the same behaviour can occur there.

In prefix branch only these two are blacklisted, because ED is set by Portage unconditionally like D (I think).
Comment 9 Zac Medico gentoo-dev 2009-11-20 04:59:55 UTC
Created attachment 210678 [details, diff]
blacklist ED, EPREFIX, and EROOT variables from the environment
Comment 10 Zac Medico gentoo-dev 2009-11-21 05:17:17 UTC
This is fixed in 2.1.7.6 and 2.2_rc51.