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

Bug 343873

Summary: sys-apps/attr-2.4.43 doesn't compile when /bin/sh symlinks to /bin/dash
Product: Gentoo Linux Reporter: Jimmy Kloss <jimmy.kloss>
Component: [OLD] Core systemAssignee: Gentoo's Team for Core System packages <base-system>
Status: RESOLVED WONTFIX    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: `emerge --info --verbose` output

Description Jimmy Kloss 2010-11-02 16:59:48 UTC
While compiling sys-apps/attr-2.4.43 (and probably newer versions too) it seems that a bash script get's called, which uses the bash built-in command eval, but a shebang line like #!/bin/sh
So if /bin/sh is linked to a simpler (but still POSIX compliant) shell like dash, this script and therefore the whole emerge process dies with lots of the following messages:

eval: 1: libtool_args+=: not found
eval: 1: compile_command+=: not found
eval: 1: finalize_command+=: not found

Reproducible: Always

Steps to Reproduce:
1. emerge -aq app-shells/dash
2. ln -sf /bin/dash /bin/sh
3. emerge -aq attr




# emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r3, 2.6.35-gentoo-r12 x86_64)
=================================================================
System uname: Linux-2.6.35-gentoo-r12-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_5200+-with-gentoo-2.0.1
Timestamp of tree: Mon, 01 Nov 2010 14:45:01 +0000
app-shells/bash:     4.1_p7
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r3, 3.1.2-r4
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.6.3
sys-apps/sandbox:    2.3-r1
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.7.9-r2, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.4-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.35
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL Q3AEULA dlj-1.1 QUAKE4 ut2003 ut2004 Introversion DOOM3 googleearth AdobeFlash-10.1"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /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/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache confcache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirror.uni-c.dk/pub/gentoo/ http://ftp.fi.muni.cz/pub/linux/gentoo/ http://gentoo.prz.rzeszow.pl"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en en_US de"
MAKEOPTS="-j3"
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="/var/lib/layman/Spring /var/lib/layman /usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="16bit 3dnow 3dnowext 64bit 7zip X a52 aac acl acpi aio akonadi alsa amarok amazon amd64 aotuv applet archive audiofile autoipd avahi bash-completion berkdb bittorrent bonjour branding bzip2 calendar caps cdda cddb cdparanoia chm cjk cleartype cli connectionstatus consolekit cracklib crypt cups cxx dbus de_tvtoday desktopglobe dhclient dirac divx divx4linux dnsproxy dolby-record-switch dolbyinrec dri dts dv dvb dvbplayer dvd dvdr dvdread ebook embedded encode exif exiv2 faac faad fam fbcon fbcondecor ff-card ffmpeg figlet firefox firefox3 flac fluidsynth fortran ftp gdbm gif git glib glibc-omitfp glut gmedia gnutls google gpm haskell hbci hddtemp howl-compat htmlhandbook hyperestraier iconv icq icu id3 id3tag ieee1394 imap imlib imlib2 inotify iptv ipv6 iso14755 ithreads jabber jack jack-tmpfs jadetex java java5 java6 jingle joystick jpeg jumpplay kde kerberos kipi ladspa lame latex ldap libass libsamplerate libsysfs libv4l2 liemikuutio linuxthreads-tls lirc lm_sensors lnbshare logrotate lzma lzo mad mainmenuhooks maps matroska mbrola mdnsresponder-compat menuorg mikmod mmx mmxext mng modplug modules moznopango mp2 mp3 mp4 mp4live mpd mpeg mpeg2 mplayer mtp mudflap multilib multiprocess multiuser musepack musicbrainz mysql ncurses networkmanager nfs nls npp nptl nptlonly nsplugin nvidia offensive ogg ogg123 openal opencl opengl openmp openssl pam pcre pdf perl phonon pic pinplugin plasma png policykit posix ppds pppd python python3 qt3support qt4 quicktime rar readline redeyes rtc samba sasl scanner schroedinger sdl secure-delete semantic-desktop sensord session shared sid snmp sockets sortrecords speech speex spell sql srt sse sse2 sse3 ssl stream subtitles svg syncearly sysfs syslog system-libs system-sqlite taglib tcpd theora threads threadsafe tiff timercmd timerinfo timidity tools transcode transparency truetype ttxtsubs udev udisks unicode usb userlocales utempter v4l v4l2 vaapi validinput vcd vdpau vdr vhosts virtuoso vorbis vpx webkit windeco wineappdb winetriks wmp x264 xanim xattr xcb xcomposite xforms xgetdefault xine xml xmlpatterns xorg xosd xsl xv xvid xvmc zeroconf zlib" ALSA_CARDS="emu10k1 hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US de" LIRC_DEVICES="serial" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia vesa" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2010-11-10 04:26:37 UTC
guessing you're using dash-0.5.6.*
Comment 2 Jimmy Kloss 2010-11-10 17:35:48 UTC
(In reply to comment #1)
> guessing you're using dash-0.5.6.*
> 

I've tested this with dash-0.5.5.1.2 and right now with dash-0.5.5.1.7.
There's no newer version in portage. The git logs show that from 0.5.5.1 to 0.5.5.6 there have been 2 fixes in the eval part and further 5 from there to current git. So it might already be fixed.
Comment 3 SpanKY gentoo-dev 2010-11-10 21:37:24 UTC
configure should have re-executed itself with /bin/bash when using dash-0.5.5 as /bin/sh.  with dash-0.5.6, it wouldnt have, and you'd hit this error.

are you setting/exporting CONFIG_SHELL at all ?  run `emerge --info --verbose` and post that as an attachment.
Comment 4 Jimmy Kloss 2010-11-11 18:58:12 UTC
Created attachment 254023 [details]
`emerge --info --verbose` output

Your're right there was no CONFIG_SHELL set, I didn't even know about it. If I set it to /bin/bash in make.conf portage calls all configure scripts with /bin/bash.
The point by linking /bin/sh to /bin/dash was to speed up things like configure. So what's the actual problem?

1) Dash being buggy/incomplete
2) sys-apps/attr using bash-ism in configure while pretending not to do it
3) me for linking /bin/sh to /bin/dash which is evil by definition
Comment 5 SpanKY gentoo-dev 2010-11-22 02:59:29 UTC
i cant reproduce here.

$ ls -l /bin/sh 
lrwxrwxrwx 1 root root 4 Nov 21 21:54 /bin/sh -> dash
$ qlist -I -v dash
app-shells/dash-0.5.5.1.7
$ ebuild attr-2.4.44.ebuild clean unpack prepare configure compile
<works fine>
$ grep CONFIG_SHELL /var/tmp/portage/sys-apps/attr-2.4.44/work/attr-2.4.44/config.status 
SHELL=${CONFIG_SHELL-/bin/bash}
  $as_echo "running CONFIG_SHELL=/bin/bash $*" >&6
  CONFIG_SHELL='/bin/bash'
  export CONFIG_SHELL
Comment 6 Jimmy Kloss 2010-11-22 16:07:06 UTC
I just unmasked sys-apps/attr-2.4.44 and the emerge went fine. So what about making 2.4.44 stable and drop 2.4.43?
Comment 7 SpanKY gentoo-dev 2010-11-22 19:00:22 UTC
sorry, missed you were using .43.  ive filed a stable request for .44.