Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281033 - Emerge of dev-libs/icu-4.2 fails during compilation when -ftree-vectorize CFLAG/CXXFLAG optimization is enabled
Summary: Emerge of dev-libs/icu-4.2 fails during compilation when -ftree-vectorize CFL...
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Arfrever Frehtes Taifersar Arahesis (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-10 20:38 UTC by staples
Modified: 2009-08-12 17:13 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 staples 2009-08-10 20:38:49 UTC
It may ultimately be a bug with g++ (GCC) 4.1.2 (Gentoo 4.1.2 p1.0.2), but when trying to update dev-libs/icu-4.2 with the -ftree-vectorize switch in the CFLAGS, the compiler terminates with a segmentation fault when working on the tmutfmt.cpp translation unit.

If the ebuild (or whatever appropriate component of this package) could be modified to filter out this CFLAG and/or this bug forwarded on to the GCC team, that should resolve this issue.

Reproducible: Always

Steps to Reproduce:
1. Modify make.conf to add -ftree-vectorize to your CFLAGS/CXXFLAGS
2. emerge -1av =dev-libs/icu-4.2

Actual Results:  
The output of the emerge, beginning at the offensive compiler invocation, is as follows:

x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o tmutfmt.ao tmutfmt.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o colldata.ao colldata.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o bmsearch.ao bmsearch.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o bms.ao bms.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o currpinf.ao currpinf.cpp
tmutfmt.cpp: In member function 'void icu_4_2::TimeUnitFormat::create(const icu_4_2::Locale&, icu_4_2::TimeUnitFormat::EStyle, UErrorCode&)':
tmutfmt.cpp:358: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://bugs.gentoo.org/> for instructions.
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o uspoof.ao uspoof.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o uspoof_impl.ao uspoof_impl.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o uspoof_build.ao uspoof_build.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o uspoof_buildconf.ao uspoof_buildconf.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c   -o uspoof_buildwsconf.ao uspoof_buildwsconf.cpp
x86_64-pc-linux-gnu-gcc -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -Wall -ansi -pedantic -Wshadow -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c -DPIC -fPIC -o ucln_in.o ucln_in.c
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c -DPIC -fPIC -o fmtable.o fmtable.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c -DPIC -fPIC -o format.o format.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c -DPIC -fPIC -o msgfmt.o msgfmt.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c -DPIC -fPIC -o umsg.o umsg.cpp
x86_64-pc-linux-gnu-g++ -D_REENTRANT -I. -I../common   -DU_I18N_IMPLEMENTATION -march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize -W -Wall -ansi -pedantic -Wpointer-arith -Wwrite-strings -Wno-long-long  -fvisibility=hidden -c -DPIC -fPIC -o numfmt.o numfmt.cpp
Preprocessed source stored into /var/tmp/portage/dev-libs/icu-4.2/temp/cc6wxufG.out file, please attach this to your bugreport.
make[1]: *** [tmutfmt.ao] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/var/tmp/portage/dev-libs/icu-4.2/work/icu/source/i18n'
make: *** [all-recursive] Error 2
 * 
 * ERROR: dev-libs/icu-4.2 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2514:  Called _eapi2_src_compile
 *               ebuild.sh, line  634:  Called die
 * The specific snippet of code:
 *   		emake || die "emake failed"
 *  The die message:
 *   emake failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/icu-4.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/icu-4.2/temp/environment'.
 * 

Expected Results:  
The compiler should not have experienced a segmentation fault and finished the emerge.

# emerge --info
Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.1.2, glibc-2.9_p20081201-r2, 2.6.30-gentoo-r4 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-x86_64-Intel-R-_Core-TM-2_Duo_CPU_T7100_@_1.80GHz-with-glibc2.2.5
Timestamp of tree: Mon, 10 Aug 2009 16:30:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.4.4-r13, 2.5.4-r2
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -ftree-vectorize"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="C"
LDFLAGS="-Wl,-O1"
LINGUAS="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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi aim alsa amd64 apm audiofile bash-completion berkdb bluetooth bzip2 cairo caps cddb cdparanoia cdr cli cracklib crypt css cups cupsddk dbus dga djvu dri dv dvd dvdr encode evo exif expat fam ffmpeg firefox flac fontconfig fortran ftp gdbm gif gimp glut gnome gphoto2 gstreamer gtk hal iconv ieee1394 imagemagick ipv6 isdnlog javascript jpeg jpeg2k lame latex ldap libgda libnotify lm_sensors matroska mmx mp3 mpeg mplayer mudflap multilib musepack ncurses networkmanager nls nptl nptlonly nsplugin ogg opengl openmp oscar pam pcre pdf perl png ppds pppd python quicktime rdesktop readline reflection samba scanner sdl session smp sndfile sockets spell spl sse sse2 ssl startup-notification svg sysfs tcpd theora threads tiff timidity truetype unicode usb v4l2 vcd vorbis wavpack wifi x264 xcb xcomposite xml xorg xv xvid zeroconf zlib" ALSA_CARDS="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 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" INPUT_DEVICES="keyboard mouse evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-10 20:51:51 UTC
Try with GCC 4.3.*
Comment 2 staples 2009-08-12 17:02:36 UTC
(In reply to comment #1)
> Try with GCC 4.3.*
> 

Hi,

I wasn't aware that GCC 4.3.* was stable or installed--was there no message telling me to select GCC 4.3.* as my compiler? or is there a reason it wasn't automatically switched (is it safe to keep it as my default compiler)?

Anyway, after selecting x86_64-pc-linux-gnu-4.3.2, the icu-4.2 package emerges without the segmentation fault.

Thanks
Comment 3 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-08-12 17:13:19 UTC
Reopening to fix resolution.