Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 235117 - app-arch/lzma-utils: ebuild should to check ABI of installed gcc and fail if not compatible
Summary: app-arch/lzma-utils: ebuild should to check ABI of installed gcc and fail if ...
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-18 15:11 UTC by Daniel Santos
Modified: 2009-12-27 17:02 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Santos 2008-08-18 15:11:54 UTC
When building lzma-utils using gcc-3.4.6-r2 without the nocxx USE flag, compilation works just fine and no errors are reported.  However, when I went to builld libpng, it failed attempting to decompress a tar.lzma source file with the message that it libstdc++ didn't have CXXABI_1.3.1.  The problem is easily solved with the nocxx flag, but the ebuild should detect this problem and fail rather than generating executables that will not run.

Sorry no emerge --info, I'm submitting this from another machine and will attach  one later along with the exact error message.

Reproducible: Always

Steps to Reproduce:
Comment 1 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-08-18 16:55:31 UTC
I agree, considering the warnings that we put on the nocxx use flag...we should not require that flag. Are you using a hardened profile? I guess we will wait until you post an emerge --info to give the lzma-utils maintainer some more info.
Comment 2 Carsten Lohrke (RETIRED) gentoo-dev 2008-08-18 22:50:35 UTC
Planting any ABI checks to this degree are not reasonable. You simply cannot mix GCC/libstdc++ versions arbitrarily, so don't do it.
Comment 3 Daniel Santos 2008-08-19 03:02:49 UTC
This is not due to an arbitrary mix of gcc & libstdbc++ versions, where did you come up with that?  Or were you just wanting to close the bug quickly?  This is indeed a legitimate & valid bug and occurred using 2008.0 stage 3 while building it into a hardened system.  If an ebuild succeeds, while following normal Gentoo installation procedures and it produces binaries that do not run and the procedure is repeatable, it IS a bug by any definition.  Specifically, an ebuild should never allow this to happen.

You don't necessarily need to check the ABI directly if you know the earliest gcc version that uses the required ABI.  Thus, you can simply fail the build if the gcc version is below a certain level and the nocxx flag is not present.  Please don't make me do everything myself.

inherit toolchain-funcs
.
.
.
# untested example presumes the gcc version with needed ABI is 4.1.1
# for illustration purposes only
if use nocxx || [ $(gcc-major-version) -le 4 \
        -a $(gcc-minor-version) -le 1 \
        -a $(gcc-micro-version) -lt 1 ]; then
    die "Must use GCC version 4.1.1+ unless you have the nocxx USE flag enabled."
fi


Portage 2.1.4.4 (hardened/amd64/multilib, gcc-3.4.6, glibc-2.6.1-r0, 2.6.25-gentoo-r6 x86_64)
=================================================================
System uname: 2.6.25-gentoo-r6 x86_64 AMD Phenom(tm) 9850 Quad-Core Processor
Timestamp of tree: Mon, 18 Aug 2008 12:20:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r13, 2.5.2-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.10.1
sys-devel/binutils:  2.18-r1, 2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8 -O2 -msse3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=k8 -O2 -msse3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg distlocks installsources metadata-transfer parallel-fetch sandbox sfperms splitdebug strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://mirrors.cs.wmich.edu/gentoo http://mirror.mcs.anl.gov/pub/gentoo/ http://osmirrors.cerias.purdue.edu/pub/gentoo/"
LANG="en_US"
LINGUAS="en_US en en_GB en_ZA af am ar as_IN az be be_BY bg bn bo br bs ca cs csb cy da de de_FR dz el eo es es_AR es_ES es_LA et et_EE eu fa fi fo fr fr_CA fy fy_NL ga ga_IE gl gu gu_IN he hi hi_IN hr hsb hu hy id is it ja ka kk km kn ko ku la lo lt lv mk ml ml_IN mn mr_IN ms mt nb nb_NO nds ne nl nn nn_NO no nr ns nso oc or_IN pa pa_IN pl pt pt_BR pt_PT ro ru rw se sh sh_YU si sk sl sq sr sr@Latn sr_CS ss st sv sv_SE sw_TZ ta ta_IN te te_IN tg th ti_ER tk tl tn tr ts uk ur_IN uz ve vi wa xh zh zh_CN zh_HK zh_TW zu"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
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="/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 64bit 7zip acl amd64 apache2 authdaemond bash-completion berkdb bzip2 caps cdr cgi cjk commons-digester cpufreq cracklib crypt cscope curl doc double-precis double-precision dvd dvdr enscript examples exif fam fasttrack fbcon fftw fontconfig fortran ftp gcj gd gdb gdbm gif ginac git gmp gmtfull gnutls gpm graphviz gs hardened hddtemp html iconv id3 imap imlib inifile java javamail javascript jbig jce jms jmx jpeg jpeg2k justify kerberos latex ldap libwww lm_sensors log4j lua lzo mailwrapper math mbox md5sum midi mime ming mmap mmkeys mng modperl modplug mouse mp3 mpeg mudflap multicall multilib multislot mysql mysqli ncurses nls nntp nptl nptlonly nspluginobjc objc++ objc-gc openexr openmp openssl pam pango pcre pdf perl php pic plotutils png pop posix posixpython python rar readline rrdcgi rtc ruby sasl sdl sensord servletapi sharedmem smtp snmp soap sockets source spell spl sqlite sqlite3 sse sse2 sse3 ssl startup-notification stream subversion svg svgz sysfs syslog sysvipc tcl tcpd threads tidy tiff tk tokenizer truetype unicode urandom usb vdats vim-syntax vorbis webdav wifi wmf wxwindows xattr xcb xface xforms xinetd xml xmlreader xmlrpc xmlwriter xorg xpm xprint xsl yv12 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 auth_digest authn_anon authn_dbd 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 dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http rewrite setenvif so speling status substitute unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US en en_GB en_ZA af am ar as_IN az be be_BY bg bn bo br bs ca cs csb cy da de de_FR dz el eo es es_AR es_ES es_LA et et_EE eu fa fi fo fr fr_CA fy fy_NL ga ga_IE gl gu gu_IN he hi hi_IN hr hsb hu hy id is it ja ka kk km kn ko ku la lo lt lv mk ml ml_IN mn mr_IN ms mt nb nb_NO nds ne nl nn nn_NO no nr ns nso oc or_IN pa pa_IN pl pt pt_BR pt_PT ro ru rw se sh sh_YU si sk sl sq sr sr@Latn sr_CS ss st sv sv_SE sw_TZ ta ta_IN te te_IN tg th ti_ER tk tl tn tr ts uk ur_IN uz ve vi wa xh zh zh_CN zh_HK zh_TW zu" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 mach64 mga neomagic nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga vmware voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

(
Comment 4 Daniel Santos 2008-08-19 03:05:32 UTC
my code logic is flawed, but you get the idea
Comment 5 SpanKY gentoo-dev 2008-08-20 06:31:32 UTC
i really doubt the issue is as you reported ...

post the output of `gcc-config -l` on the system you're experiencing troubles