Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 157173 - gcc-4.1.1-r* fails to build on my hardened selinux system
Summary: gcc-4.1.1-r* fails to build on my hardened selinux system
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-04 21:29 UTC by brankob
Modified: 2007-05-20 09:23 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 brankob 2006-12-04 21:29:17 UTC
latest world update suggested that I update it to 4.1.1-r3. 

Trouble is, emerge dies just somewhere at the end of the attempt when linking and testing some code fragments.


Here is the end of the report (last tens of lines):

***********

creating libtool
updating cache ./config.cache
configure: loading cache ./config.cache
checking how to run the C++ preprocessor... /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/xgcc -shared-libgcc -B/usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc -nostdinc++ -L/usr/portage/work/portage/gcc-4.1.1-r3/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src -L/usr/portage/work/portage/gcc-4.1.1-r3/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/src/.libs -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32 -E
loading cache ./config.cache within ltconfig
checking host system type... x86_64-pc-linux-gnu
checking build system type... x86_64-pc-linux-gnu
checking for objdir... .libs
checking for /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/xgcc option to produce PIC... -fPIC -DPIC
checking if /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/xgcc PIC flag -fPIC -DPIC works... yes
checking if /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/xgcc static flag -static works... no
finding the maximum length of command line arguments... (cached) 49153
checking if /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/xgcc supports -c -o file.o... (cached) yes
checking if /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/xgcc supports -fno-rtti -fno-exceptions ... yes
checking whether the linker (/usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/collect-ld -m elf_x86_64 -m elf_i386) supports shared libraries... 
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking command to parse /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/nm output... failed
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
appending configuration tag "CXX" to libtool
checking for exception model to use... call frame
checking for compiler with PCH support... yes
checking for enabled PCH... yes
checking for underlying I/O to use... stdio
checking how to run the C preprocessor... /usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/xgcc -B/usr/portage/work/portage/gcc-4.1.1-r3/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include  -m32 -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for C locale to use... gnu
checking for msgfmt... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking for library containing gettext... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
make[2]: *** [configure-target-libstdc++-v3] Error 1
make[2]: Leaving directory `/usr/portage/work/portage/gcc-4.1.1-r3/work/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/usr/portage/work/portage/gcc-4.1.1-r3/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-4.1.1-r3 failed.
Call stack:
  ebuild.sh, line 1546:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  ebuild.sh, line 1255:   Called toolchain_src_compile
  toolchain.eclass, line 24:   Called gcc_src_compile
  toolchain.eclass, line 1536:   Called gcc_do_make
  toolchain.eclass, line 1410:   Called die

!!! emake failed with profiledbootstrap
!!! If you need support, post the topmost build error, and the call stack if relevant.


************

Here is result of emerge --info:

*************

emerge --info:
Portage 2.1.1-r2 (selinux/2005.1/amd64, gcc-4.1.1, glibc-2.4-r3, 2.6.18-hardened x86_64)
=================================================================
System uname: 2.6.18-hardened x86_64 AMD Opteron(tm) Processor 240
Gentoo Base System version 1.12.6
Last Sync: Tue, 05 Dec 2006 02:00:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3, 2.17
sys-devel/gcc-config: 1.3.13-r4
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=opteron -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=opteron -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg candy distlocks fixpackages metadata-transfer nostrip sandbox selinux sesandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.ynet.sk/pub http://mirror.switch.ch/ftp/mirror/gentoo/ http://gentoo.inode.at/ http://ftp.romnet.org/gentoo/ http://pandemonium.tiscali.de/pub/gentoo/"
LC_ALL="sl_SI.utf8"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages/streznik"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/usr/portage/work"
PORTDIR="/usr/portage/tree"
PORTDIR_OVERLAY="/usr/portage/tree/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="7zip acpi amd64 apache2 bash-completion berkdb browserplugin bzip2 c++ caps cdr crypt cscope cups dar64 dba dbus dhcp doc dpms ds dvd dvdr dvdread eds effects elf elibc_glibc emacs epiphany examples fame fbcon flac fltx fpx ftp gd gif gimp glut gpm grammar graphviz gs gstreamer gtkhtml hal hardened httpd idn ieee1394 imq inetd inkjar input_devices_keyboard input_devices_mouse iproute2 ipv6 java javascript jbig jpeg jpeg2k kerberos kernel_linux l7filter lcms ldap libgda lirc live lm_sensors logrotate lzo math mmap mod mpeg mpqc multislot multitarget mysql ncurses network nls nptl nptlonly openal pam pdf pic plotutils plugin png posix postgres python readline rle samba sdk selinux sensord shared sharedmem smartcard smp sockets sse-filters ssl stream svg sysfs t1lib thesaurus threads tiff truetype unicode usb userland_GNU vcd vhosts wmf wordperfect xbase xinetd xml xpm zip zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 brankob 2006-12-22 13:10:18 UTC
I have played woth this some more. I added keeptemp to my FEATURES and added couple of things to configure in libstd++v3 map, so i could inspect variables and events that lead to this.

Interesting thing is that first pass completes and that this thing croaks in second pass, when complete new compiler is trying to compile itself. 

it first tries to link a couple of executables and it sets gcc_no_link according to linker's exit code. 

On first pass gcc_no_link is "no" and no the second round it becomes "yes".

I have tried to make tarball on the similar, but not hardened system and unpack it here. "New" gcc works fine otherwise, but croaks when compiling gcc on the same spot...

For teh moment I thougt that it migh be something with binutils and have emerged newest binutils-2.17 and used binutils-config to make system use them.

All with the same effect- same error.






Comment 2 SpanKY gentoo-dev 2007-05-19 03:47:49 UTC
you'd have to post the config.log files as attachments to find out the real source of your problem

also, run `emerge gcc >& log` and post that log file as an attachment
Comment 3 brankob 2007-05-20 09:23:46 UTC
(In reply to comment #2)
> you'd have to post the config.log files as attachments to find out the real
> source of your problem
> 
> also, run `emerge gcc >& log` and post that log file as an attachment
> 

Eww, c*ap. It works now. I can't believe this. This has been bothering me for a few long months and on a day of your response to my bug#, problem dissapears.

Pure coincidence ;o) ?

Anyway, problem is gone, that is all that matters...