Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 378941 - app-shells/bash-4.2_p10: portage-multilib build error for mkbuiltins
Summary: app-shells/bash-4.2_p10: portage-multilib build error for mkbuiltins
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://savannah.gnu.org/patch/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-12 16:26 UTC by Mario Fetka (geos_one)
Modified: 2014-09-26 09:13 UTC (History)
1 user (show)

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


Attachments
files/bash-mkbuiltins-fix.patch (bash-mkbuiltins-fix.patch,509 bytes, patch)
2011-08-12 16:27 UTC, Mario Fetka (geos_one)
Details | Diff
bash-4.2_p10.ebuild-multilib.patch (bash-4.2_p10.ebuild-multilib.patch,530 bytes, patch)
2011-08-14 22:16 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff
bash-4.2_p10-build.log (bash-4.2_p10-build.log,26.30 KB, text/plain)
2011-08-14 22:23 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
emerge--info.txt (emerge--info.txt,8.82 KB, text/plain)
2011-08-14 22:23 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details
Build.log (build.log,37.58 KB, text/plain)
2011-08-15 02:30 UTC, Mario Fetka (geos_one)
Details
Build.log (build.log,87.36 KB, text/plain)
2011-08-15 02:45 UTC, Mario Fetka (geos_one)
Details
bash-4.2_p10-flags-for-build.patch (bash-4.2_p10-flags-for-build.patch,691 bytes, patch)
2011-08-15 03:29 UTC, Nathan Phillip Brink (binki) (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Fetka (geos_one) 2011-08-12 16:26:36 UTC
bash dont want to compile for multilib portage
it still compiles some files without cflags

Reproducible: Always
Comment 1 Mario Fetka (geos_one) 2011-08-12 16:27:51 UTC
Created attachment 283049 [details, diff]
files/bash-mkbuiltins-fix.patch

this patch adds the needed cflag to the file that needs it
Comment 2 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-08-14 21:42:44 UTC
I am unable to reproduce this bug with =app-shells/bash-4.2_p10 on portage-multilib with a gcc-config patched per bug 351384 (available in the overlay called `ohnobinki'). Furthermore, if you follow the message trail in URL, you'll see 
http://osdir.com/ml/bug-bash-gnu/2011-04/msg00094.html . And even more importantly, there _is_ a distinction between build-time and host binaries. mkbuiltins is a build-time binary which must be run only while bash is being compiled. Thus it should be running natively (i.e., 64-bit in this case) and this matters a lot more when real cross-compilation is occurring. Thus it is crucial that mkbuiltins is _not_ compiled with CFLAGS or LDFLAGS.

Please attach a full build.log and emerge --info proving that this bug actually exists. I cannot say for sure, but I think that the solution to your compilation problem may actually be bug 351384...
Comment 3 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-08-14 22:16:29 UTC
Created attachment 283349 [details, diff]
bash-4.2_p10.ebuild-multilib.patch

OK, I could not reproduce this myself because I had too few useflags enabled in bash. This caused bash to not install anything into /usr/lib64 and thus didn't trigger the lib32 build on my system. But I was able to reproduce this bug by requesting a lib32 build explicitly.

I suggest this alternative patch to the ebuild which disables LDFLAGS from being used by build-time binaries. Bash's ./configure script will detect that cross-compilation is not being requested and automatically add LDFLAGS to the LDFLAGS_FOR_BUILD variable. This causes linking to happen with the 32-bit flags while mkbuiltins.o is native.
Comment 4 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-08-14 22:23:29 UTC
Created attachment 283351 [details]
bash-4.2_p10-build.log
Comment 5 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-08-14 22:23:57 UTC
Created attachment 283353 [details]
emerge--info.txt
Comment 6 Mario Fetka (geos_one) 2011-08-15 02:30:56 UTC
Created attachment 283377 [details]
Build.log

Portage 2.2.0_alpha49-r1 (default/linux/amd64/10.0/desktop/kde, gcc-4.6.1-asneeded, glibc-2.13-r4, 2.6.36-go-r2 x86_64)
=================================================================
System uname: Linux-2.6.36-go-r2-x86_64-AMD_Turion-tm-_X2_Ultra_Dual-Core_Mobile_ZM-86-with-gentoo-2.0.3
Timestamp of tree: Mon, 15 Aug 2011 01:15:01 +0000
ccache version 3.1.5 [enabled]
app-shells/bash:          4.2_p10::multilib-portage-fixes
dev-java/java-config:     2.1.11-r3
dev-lang/python:          2.7.2-r2, 3.2-r2
dev-util/ccache:          3.1.5
dev-util/cmake:           2.8.5-r2::multilib-portage-fixes
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1::sabayon
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.68
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:       2.21.1
sys-devel/gcc:            4.6.1
sys-devel/gcc-config:     1.5-r1::ohnobinki_overlay
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.38 (virtual/os-headers)
sys-libs/glibc:           2.13-r4
Repositories: gentoo crossdev 389-ds apparmor bongo ifolder lightscribe linamh mds go-mysql go-genlink go-vmware zarafa opsi n4g n4g-experimental multilib-portage-fixes d-overlay gcc-porting gentoo-haskell java-overlay kde mozilla nx webapp-experimental x11 sunrise systemd mysql qting-edge multilib ohnobinki_overlay
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -msse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /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=k8 -msse3 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs ccache distlocks ebuild-locks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://gentoo.inode.at/ ftp://gentoo.inode.at/source/ http://gentoo.lagis.at/ ftp://gentoo.lagis.at/"
LDFLAGS="-Wl,--hash-style=gnu,-O1 -Wl,--as-needed"
LINGUAS="de en"
MAKEOPTS="-j4"
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="/home/crossdev /home/mario/mars/linamh/trunk/389 /home/mario/mars/linamh/trunk/apparmor /home/mario/mars/linamh/trunk/bongo /home/mario/mars/linamh/trunk/ifolder /home/mario/mars/linamh/trunk/lightscribe /home/mario/mars/linamh/trunk/linamh /home/mario/mars/linamh/trunk/mds /home/mario/mars/linamh/trunk/mysql /home/mario/mars/linamh/trunk/genlink /home/mario/mars/linamh/trunk/vmware /home/mario/mars/linamh/trunk/zarafa /home/mario/mars/linamh/trunk/opsi /home/mario/mars/n4g/trunk/novell4gentoo /home/mario/mars/n4g/branches/experimental /home/mario/mars/multilib-portage-fixes /var/lib/layman/d /var/lib/layman/gcc-porting /var/lib/layman/haskell /var/lib/layman/java-overlay /var/lib/layman/kde /var/lib/layman/mozilla /var/lib/layman/nx /var/lib/layman/webapps-experimental /var/lib/layman/x11 /var/lib/layman/sunrise /var/lib/layman/systemd /var/lib/layman/mysql /var/lib/layman/qting-edge /var/lib/layman/multilib /var/lib/layman/ohnobinki"
SYNC="rsync://rsync.at.gentoo.org/gentoo-portage"
USE="32bit 3dnow 3dnowext 64bit R X X509 a52 aac aacs acl acpi ada addns ads aio akonadi alsa amd64 ao apm apng applet archive asf aspell aspnet2 assistant atm attica attrib audacious audio audiofile audioscrobbler autoipd autoreplace avahi avcodec avformat avx bazaar bcel bcmath bdf berkdb bfq big-tables bineditor binfilter bittorrent blas blender blender-game bluetooth bluray bookmarks boost bootchart branding bs2b btrfs bugzilla bwscheduler bzip2 c3p0 cairo capi caps cardbus ccache cdda cddb cdio cdparanoia cdr cdrdao cdrom cdsound celt cgi chatzilla chm clamav clamd clamdtop cleartype cli client clucene cluster cmake collada commonslogging commonsnet community compat composer consolekit contactnotes contrib corefonts coverart cpudetection cracklib cramfs creds crypt csharp css csv ctype ctypes-python cue cups curl curlwrappers cvs cxx d dbus dc1394 dcc_video dcc_voice dds declarative dell derby designer designer-plugin desktopglobe devfs-compat device-mapper dga dhclient dhcp dhcpcd dia digitalradio dirac direct2d directfb directx diskio djbfft djvu dmraid dmx dnotify docbook dot downloadorder dri drm dshow dssi dts dv dvb dvd dvdnav dvdr dxva2 eap-sim eap-tls ebook edit editor eix elbeem elf embedded emboss emf emovix enca encode epos equalizer ethernet evo excel exif expat experimental extensions external-ffmpeg extraengine extras faac faad fakevim fam farsight fat fax fbcondecor fbsplash festival ffi ffmpeg firefox firefox3 flac flash flickr flite floppy fluidsynth fontconfig fontforge foomaticdb fortran fpx freetds freetts frei0r ftp fts3 fuse gadu gallium game-engine gcj gconf gcrypt gd gdbm gdu gensplash geoip geolocation gfxnvidia ggi gif git github glade glib glibc-compat20 glibc-omitfp glut gmm gmp gnumeric gnuplot gnutls go google-gadgets gpg gphoto2 gpl gpm gps gpu graphite groupwise growl grub gs gsf gsm gsmloc gstreamer gtk gtk3 gts guile gzip h323 haildb hash hdaps hdb-ldap hddtemp hdri health hfs highlight history holidays hostip howl-compat hpcups hpijs hs20 hunspell hybrid-auth hyperestraier i18n ical icons iconv icq icu id3 id3tag idn ieee1394 ilbc imagemagick imap infowidget inifile inkjar innodb inotify intel_led intl ioctl iodbc ios ios-vout ipc ipfilter iplayer ipod iproute2 iptables iptc ipv6 irc irda iscsi ithreads jabber jack jadetex jai java java6 javacomm javamail javascript jbig jce jdepend jfs jit jmf jms jmx jni joystick jpeg jpeg2k json kate kdcraw kde kdecards kdm kdrive kerberos kino kipi kismet klibc kmail kolab konqueror kontact kpathsea kqemu kross lame laptop largepages lastfm lastfmfingerprint lastfmradio latex latex3 lcms ldap ldap-bind ldap-sasl ldapi ldb led lensfun lha libass libburn libedit libevent libffi libkms libmms libmpeg2 libnl libnotify libtar libv4l2 licensed lightning lirc live llvm llvm-gcc lm_sensors log4j logrotate lqr lto lua luajit lucene lvm lzma lzo mad magic mailclient math matroska mbrola md5 md5sum mdadm mdev mdnsresponder-compat mdraid meanwhile mediaplayer memcache mercurial mhash mini mixer mjpeg mktemp mms mmx mmxext mng modules mono moonlight motif mouse mozdom mozembed mozilla mp3 mp3tunes mp4 mpd mpeg mpfr mpg123 mpi mplayer mppe-mppc msn mudflap multilib multimedia multipath musepack music musicbrainz mysql mysqli mysqlnd natspec nbd ncurses net netapi netpbm nettle network networking networkmanager nforce2 nfs nfsv3 nfsv4 nio2 nis nls nmap nntp nokia normalizer nptl nptlonly nsplugin nss nsscache nssdb ntfs ntfsprogs ntlm ntp nx nxclient obex objc objc++ objc-gc ocaml ocamlopt oci8-instant-client odbc odk ods ofx ogg ogg123 ogm okteta okular oldpim omxil oniguruma openexr opengl openid openldap openmp openssl openstreetmap openvg oracle orc otp otr overlays pam pango parport parted pbxt pcap pcmcia pcre pda pdf perforce perl perl-geoipupdate phonon pic pipes pixmaps plasma playdar player playlist plugins pm-utils pmu png pnm policykit posix postgres postproc ppds ppp pppd prelink privacy private-headers profile4 profiling projectm projectx ps psf pstoedit pstricks pvr pygments pygobject pyqt4 python python_abis_2.7 qalculate qd qdbm qemu qimageblitz qmake qml qq qscintilla qt-dbus qt-faststart qt-webkit qt3support qt4 qtscript quicktime quota qwt radio raptor rar raster raw rcs rdesktop rdesktop-vrdp rdp readline redcode redeyes regexp reiser4 reiserfs remote-access replaygain reports resolvconf resolver rfc3779 rle roaming romio rpm rrdtool rss rtc rtf rtmp rtsp ruby samba sasl scanner schroedinger scim screen script scrobbler scsi sdb-ldap sdl seamonkey search secure-delete semantic-desktop sensord servicediscovery servletapi session sftp shaders shadow shout skey skins skype slang slp smartcard smbclient smbkrb5passwd smbsharemodes smbtav2 smp sms smtp sndfile snmp soap sockets socks socks5 solver sound soundex soup speex spell spl spoof-source sql sqlite sqlite3 srt srtp srv sse sse2 sse3 sse4 sse4a sse5 ssh ssh1 ssl ssse3 startup-notification static-libs statistics stl stlport stream streaming strigi subversion sudo suexec suhosin suphp svg swat swig swscale swt sysfs system-libCg system-libvncserver system-libx264 system-sqlite systemd sysvipc t1lib taglib tao tcl tcmalloc tcpd tcpwrapper telepathy teletext templates tesseract testutil tex tex4ht tftp tgif themedesigner themes theora thinkpad threads thumbnail thumbnails thunderbird tidy tiff timezone timidity tk tls tokenizer toolame tools tpm trace tracker transcode translator transparency truetype tslib twisted twitter twolame type3 udev udev-acl udf unicode unlock-notify unzip upnp upower urandom urlpicpreview usb uswsusp utempter utils utp uuid v4l2 v8 valgrind vboxwebsrv vcard vcd vcdx vdpau verse vga vhosts video virtualbox virtuoso vistafree vlc vlm vnc vorbis vpnc vpx vst vte wav waveout wavpack webdav webdav-neon webkit webm webp webpresence webstart wifi wimax win32 win64 winbind windeco wineappdb wingdi winpopup winscp wireshark wma wmf wpd wpg wps wxwidgets x11vnc x264 xalan xattr xcb xcf xcomposite xerces-c xetex xext xfs xft xine xinerama xinetd xml xmlpatterns xorg xorgmodule xpm xrandr xrender xscreensaver xsl xslt xtended xulrunner xv xvid xvmc yahoo yahoo-geo youtube yv12 zeroconf zfs zip zlib" 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" 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" CALLIGRA_FEATURES="braindump flow karbon kexi kpresenter krita tables words" CAMERAS="ptp2" 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="evdev keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de en" MULTILIB_ABIS="amd64 x86" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Mario Fetka (geos_one) 2011-08-15 02:44:13 UTC
(In reply to comment #3)
> Created attachment 283349 [details, diff]
> bash-4.2_p10.ebuild-multilib.patch
> 
> OK, I could not reproduce this myself because I had too few useflags enabled in
> bash. This caused bash to not install anything into /usr/lib64 and thus didn't
> trigger the lib32 build on my system. But I was able to reproduce this bug by
> requesting a lib32 build explicitly.
> 
> I suggest this alternative patch to the ebuild which disables LDFLAGS from
> being used by build-time binaries. Bash's ./configure script will detect that
> cross-compilation is not being requested and automatically add LDFLAGS to the
> LDFLAGS_FOR_BUILD variable. This causes linking to happen with the 32-bit flags
> while mkbuiltins.o is native.

this patch dont work
Comment 8 Mario Fetka (geos_one) 2011-08-15 02:45:32 UTC
Created attachment 283379 [details]
Build.log

the new build log with permissions denied problem (also ran with FEATURE=-sandbox)
Comment 9 SpanKY gentoo-dev 2011-08-15 03:08:44 UTC
neither of these approaches is the right way imo.  either the configure script has the same behavior with all the XXX_FOR_BUILD vars, or ignore them by default.

so the configure.in should always default LDFLAGS_FOR_BUILD to "", or default CFLAGS_FOR_BUILD to CFLAGS when doing native builds.
Comment 10 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-08-15 03:29:01 UTC
Created attachment 283385 [details, diff]
bash-4.2_p10-flags-for-build.patch

Then this patch seems to fix the problem for me. Though attachment 283349 [details, diff] effectively does the same thing without needing a call to eautoconf.
Comment 11 Mario Fetka (geos_one) 2011-08-15 03:31:45 UTC
(In reply to comment #8)
> Created attachment 283379 [details]
> Build.log
> 
> the new build log with permissions denied problem (also ran with
> FEATURE=-sandbox)

the permissins denied has nothing to do with this bug
the LD_FLAGS_FOR_BUID= worked
Comment 12 SpanKY gentoo-dev 2011-08-15 03:42:40 UTC
Comment on attachment 283385 [details, diff]
bash-4.2_p10-flags-for-build.patch

this is something to propose upstream to see which direction they want to go.  this is one of the two options.
Comment 13 Nathan Phillip Brink (binki) (RETIRED) gentoo-dev 2011-08-15 04:30:17 UTC
A more elegant patch submitted to upstream tracker.