Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 379777 - =sys-devel/gcc-4.4.5 fails to build on amd64/hardened: cc1 segfaults
Summary: =sys-devel/gcc-4.4.5 fails to build on amd64/hardened: cc1 segfaults
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: The Gentoo Linux Hardened Team
URL: http://archives.gentoo.org/gentoo-rel...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-18 19:21 UTC by Matt Turner
Modified: 2011-10-24 17:35 UTC (History)
4 users (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 Matt Turner gentoo-dev 2011-08-18 19:21:01 UTC
The amd64/hardened stage2 builds have been failing for at least a month with:

/var/tmp/portage/sys-devel/gcc-4.4.5/work/build/./prev-gcc/xgcc -B/var/tmp/portage/sys-devel/gcc-4.4.5/work/build/./prev-gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -c -DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW   -O2 -pipe -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/gcc -I/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/gcc/. -I/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/gcc/../include -I/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/gcc/../libcpp/include  -I/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/gcc/../libdecnumber -I/var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/gcc/../libdecnumber/bid -I../libdecnumber    /var/tmp/portage/sys-devel/gcc-4.4.5/work/gcc-4.4.5/gcc/bt-load.c -o bt-load.o
{standard input}: Assembler messages:
{standard input}:46597: Warning: end of file not at end of a line; newline inserted
{standard input}:48180: Error: unknown pseudo-op: `.p2'
{standard input}:48180: Error: open CFI at the end of file; missing .cfi_endproc directive
xgcc: Internal error: Segmentation fault (program cc1)
Please submit a full bug report.
See <http://bugs.gentoo.org/> for instructions.
make[3]: *** [insn-attrtab.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build/gcc'
make[2]: *** [all-stage2-gcc] Error 2
make[2]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build'
make[1]: *** [stage2-bubble] Error 2
make[1]: Leaving directory `/var/tmp/portage/sys-devel/gcc-4.4.5/work/build'
make: *** [bootstrap-lean] Error 2
emake failed
Comment 1 Magnus Granberg gentoo-dev 2011-08-19 01:56:00 UTC
The error is only on poseidon (stage build box).
It works fine for me, bluness and jmbsvicetto on diffrent box then
poseidon.
Comment 2 Armando Di Cianno 2011-09-09 17:42:11 UTC
This is not just hardened -- this is happening to me too. Happens when I try to build gcc-4.4.{5,6} with gcc-4.4.5 or gcc-4.5.3.

>>>
Portage 2.1.10.11 (default/linux/amd64/10.0, gcc-4.5.3, glibc-2.12.2-r0,
3.0.4-gentoo x86_64)
=================================================================
System uname:
Linux-3.0.4-gentoo-x86_64-Intel-R-_Core-TM-_i7-2617M_CPU_@_1.50GHz-with-gentoo-2.0.3
Timestamp of tree: Thu, 08 Sep 2011 13:30:01 +0000
app-shells/bash:          4.1_p9
dev-lang/python:          2.7.1-r1, 3.1.3-r1
dev-util/cmake:           2.8.4-r1
dev-util/pkgconfig:       0.26
sys-apps/baselayout:      2.0.3
sys-apps/openrc:          0.8.3-r1
sys-apps/sandbox:         2.4
sys-devel/autoconf:       2.68
sys-devel/automake:       1.9.6-r3, 1.11.1
sys-devel/binutils:       2.21.1-r1
sys-devel/gcc:            4.5.3-r1
sys-devel/gcc-config:     1.4.1-r1
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r1
sys-kernel/linux-headers: 2.6.36.1 (virtual/os-headers)
sys-libs/glibc:           2.12.2
Repositories: gentoo x-overlay
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-pipe -O2 -g -ggdb -march=native"
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/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/splash
/etc/terminfo"
CXXFLAGS="-pipe -O2 -g -ggdb -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles
fixpackages installsources news parallel-fetch protect-owned sandbox sfperms
splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="        http://mirror.mcs.anl.gov/pub/gentoo/  
http://www.gtlib.gatech.edu/pub/gentoo  http://gentoo.osuosl.org/      
http://mirror.iawnet.sandia.gov/gentoo/ "
LANG="C"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j5"
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/greymouser/Projects/wmii/overlay"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi alsa amd64 amr avahi bash-completion berkdb
bluetooth bzip2 cairo caps cdda cddb cli consolekit cracklib crypt cups cvs cxx
dbus dirac djvu dri dv dvb dvd emacs exif faac fbsplash ffmpeg flac fontconfig
fortran fpx fuse gdbm gif gnome-keyring gpm graphviz gs gsm gstreamer hdri
iconv idn ieee1394 imagemagick ipv6 jpeg jpeg2k lame lcms libcaca lzma lzo mmx
mng modules mp3 mpeg mudflap multilib ncurses network-cron nls nptl nptlonly
ogg openal openexr opengl openmp pam pcre perl png pppd python readline rtmp
samba schroedinger sdl session speex spell sse sse2 ssl subversion svg sysfs
taglib tcpd theora tiff truetype unicode upnp usb v4l v4l2 vaapi vdpau vorbis
vpx wavpack webp wmf x264 xattr xcb xft xinerama xml xmp xorg xpm xv xvid
zeroconf 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="kexi words flow plan stage tables
krita karbon braindump" 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 joystick keyboard mouse synaptics
wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216
lcdm001 mtxorb ncurses text" LINGUAS="en" PHP_TARGETS="php5-3"
RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="dummy intel nvidia v4l 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, INSTALL_MASK, LC_ALL,
PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS,
PORTAGE_RSYNC_EXTRA_OPTS
<<<

I just installed this system 3 days ago. I have since upgraded to 4.5.3, and rebuilt world -- although gcc-4.4.{5,6} still does not build.
Comment 3 Armando Di Cianno 2011-09-09 19:27:05 UTC
I'm sorry -- there is a minor difference.

I get the same error "{standard input}:48180: Error: open CFI at the end of file; missing .cfi_endproc directive", but while building the 32-bit multilib version of libstdc++ -- I'll try again and post a full seperate bug later on.
Comment 4 Armando Di Cianno 2011-09-12 14:22:52 UTC
While trying to get a good bug report for my gcc-4.4.5 build issues on a non-hardened multilib amd64 system that had the same error, though in a different section of the build, as above, I narrowed it down to CFLAGS interfering with the build.

I set CFLAGS="" (all tests with MAKEOPTS="-j1"), and was finally able to build gcc-4.4.5 on this system. I did this iteratively (I had had "-pipe -O2 -g -ggdb -march=native"), and any CFLAGS setting seemed to cause the same poison.

In the meantime, I had built the system with gcc-4.5.3, which worked well (but still needed gcc-4.4* for nvidia-cuda-toolkit slot depend).

I hope this helps.
Comment 5 SpanKY gentoo-dev 2011-09-18 09:25:28 UTC
the assembler warnings are meaningless.  the only thing that matters is that your `cc1` binary segfaulted.

do you have anything interesting in `dmesg` ?
Comment 6 Francisco Blas Izquierdo Riera gentoo-dev 2011-09-18 23:49:45 UTC
I commented it on the irc but...

1) Make sure you remove -pipe from the CFLAGS
2) Try also reducing the number of parallel jobs in MAKEOPTS

This comes mainly from my experience with heavily memory constrained VMs running gentoo hardened.
Comment 7 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2011-10-24 17:35:23 UTC
For now we assume this is an issue with poseidon having limited memory/swap.
I'll close this bug as we're going to move stage building for a new box. If this issue also shows up there, I'll reopen the bug.