Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 89204 - gcc-3.4.3-r1 fails due to /lib32/tls/libc.so.6: cannot apply additional memory protection after relocation: Permission denied
Summary: gcc-3.4.3-r1 fails due to /lib32/tls/libc.so.6: cannot apply additional memor...
Status: RESOLVED DUPLICATE of bug 93769
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] GCC Porting (show other bugs)
Hardware: AMD64 Linux
: High major (vote)
Assignee: Please assign to toolchain
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-15 10:33 UTC by Tony Harmelink
Modified: 2005-07-17 14:52 UTC (History)
2 users (show)

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


Attachments
/var/tmp/portage/gcc-3.4.3-r1/work/build/32/zlib/config.log (config.log,8.83 KB, text/plain)
2005-04-15 21:48 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/config.log (config.log,118.84 KB, text/plain)
2005-04-15 21:49 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/intl/config.log (config.log,8.43 KB, text/plain)
2005-04-15 21:49 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/zlib/config.log (config.log,4.70 KB, text/plain)
2005-04-15 21:49 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/libiberty/config.log (config.log,83.52 KB, text/plain)
2005-04-15 21:49 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/config.log (config.log,12.75 KB, text/plain)
2005-04-15 21:50 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3/config.log (config.log,315.88 KB, text/plain)
2005-04-15 21:50 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/fastjar/config.log (config.log,28.53 KB, text/plain)
2005-04-15 21:50 UTC, Tony Harmelink
Details
/var/tmp/portage/gcc-3.4.3-r1/work/build/config.log (config.log,1.38 KB, text/plain)
2005-04-15 21:50 UTC, Tony Harmelink
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tony Harmelink 2005-04-15 10:33:44 UTC
I was trying to re-emerge gcc in anticipation of upgrading to the 2005.0 profile and encountered this problem.

checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for x86_64-pc-linux-gnu-gcc... /var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/xgcc -B/var/tmp/portage/gcc-3.4.3-r1/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
checking for C compiler default output file name... a.out
checking whether the C compiler works... configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[1]: *** [configure-target-libstdc++-v3] Error 1
make[1]: Leaving directory `/var/tmp/portage/gcc-3.4.3-r1/work/build'
make: *** [profiledbootstrap] Error 2

!!! ERROR: sys-devel/gcc-3.4.3-r1 failed.
!!! Function gcc_do_make, Line 1133, Exitcode 2
!!! emake failed with profiledbootstrap

Reproducible: Always
Steps to Reproduce:
1. USE="multilib" emerge --oneshot gcc

Actual Results:  
Merge works for a while
Fails on configure

Expected Results:  
Built Correctly

emerge info
Password:
Portage 2.0.51.19 (default-linux/amd64/2004.3, gcc-3.4.3,
glibc-2.3.4.20041102-r1, 2.6.11-hardened-r1 x86_64)
=================================================================
System uname: 2.6.11-hardened-r1 x86_64 AMD Athlon(tm) 64 Processor 2800+
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr 13 2005, 00:48:37)]
distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.3 [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.59-r6, 2.13
sys-devel/automake:  1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r7
sys-devel/libtool:   1.5.14
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=athlon64 -ffast-math -funit-at-a-time -ftracer -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env
/usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=athlon64 -ffast-math -funit-at-a-time -ftracer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox"
GENTOO_MIRRORS="ftp://gentoo.mirrors.tds.net/gentoo
ftp://ftp.ussg.iu.edu/pub/linux/gentoo http://gentoo.osuosl.org/
http://gentoo.netnitco.net ftp://pandemonium.tiscali.de/pub/gentoo/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/gp"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 / X aac aalib acpi alsa apache2 arts avi bash-completion berkdb
bitmap-fonts cdparanoia cdr clamav crypt cups curl divx4linux dlloader dvd
encode esd f77 faad fam flac flash font-server foomatic foomaticdb fortran gcj
gd gdbm gif gimpprint gnome gpm gtk gtk2 hardened imagemagick imap imlib insults
ipv6 jack java jp2 jpeg kde ldap libwww lzw lzw-tiff mad maildir matroska mbox
mikmod monkey motif mozilla mp3 mpeg multilib mysql ncurses nls nptl objc
offensive oggvorbis opengl oss pam pdflib perl png povray ppds python qt
readline samba sasl sdl slang snmp speex spell ssl tcltk tcpd theora tiff
truetype truetype-fonts type1-fonts usb userlocales xine xml2 xmms xpm xrandr xv
xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS
Comment 1 SpanKY gentoo-dev 2005-04-15 15:49:57 UTC
attach ALL of the config.log's from the build dir

find /var/tmp/portage/gcc-3.4.3-r1/work/build -name config.log
Comment 2 Tony Harmelink 2005-04-15 21:48:49 UTC
Created attachment 56413 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/32/zlib/config.log
Comment 3 Tony Harmelink 2005-04-15 21:49:12 UTC
Created attachment 56414 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/gcc/config.log
Comment 4 Tony Harmelink 2005-04-15 21:49:24 UTC
Created attachment 56415 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/intl/config.log
Comment 5 Tony Harmelink 2005-04-15 21:49:36 UTC
Created attachment 56416 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/zlib/config.log
Comment 6 Tony Harmelink 2005-04-15 21:49:56 UTC
Created attachment 56417 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/libiberty/config.log
Comment 7 Tony Harmelink 2005-04-15 21:50:11 UTC
Created attachment 56418 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu/32/libstdc++-v3/config.log
Comment 8 Tony Harmelink 2005-04-15 21:50:32 UTC
Created attachment 56420 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/x86_64-pc-linux-gnu/libstdc++-v3/config.log
Comment 9 Tony Harmelink 2005-04-15 21:50:40 UTC
Created attachment 56421 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/fastjar/config.log
Comment 10 Tony Harmelink 2005-04-15 21:50:51 UTC
Created attachment 56422 [details]
/var/tmp/portage/gcc-3.4.3-r1/work/build/config.log
Comment 11 SpanKY gentoo-dev 2005-04-16 01:28:09 UTC
configure:2447: checking whether the C compiler works
configure:2453: ./a.out
./a.out: error while loading shared libraries: /lib32/tls/libc.so.6: cannot apply additional memory protection after relocation: Permission denied
configure:2456: $? = 127
configure:2465: error: cannot run C compiled programs.

wow that's a weird error ... ever see that one before eradicator ?
Comment 12 SpanKY gentoo-dev 2005-04-16 01:28:26 UTC
need to reopen ...
Comment 13 Jakub Moc (RETIRED) gentoo-dev 2005-04-16 03:51:42 UTC
Spanky, this looks like kernel bug - search http://gentoo.kems.net/gentoo-x86-portage/sys-kernel/hardened-dev-sources/ChangeLog for this error. 
Comment 14 SpanKY gentoo-dev 2005-04-16 15:53:22 UTC
hardened team: any thoughts on my last comment ?
Comment 15 solar (RETIRED) gentoo-dev 2005-04-16 18:42:37 UTC
I've seen that error a few times. 
It's either the result of the flawed design of PT_GNU_STACK. Or perhaps something built with -z relro.. Would need to see a scanelf -a/readelf -e
Comment 16 Tony Harmelink 2005-04-18 19:29:07 UTC
Not to badger you, but us there any progress on this?
Comment 17 solar (RETIRED) gentoo-dev 2005-04-19 05:38:20 UTC
Still need to see the results of the readelf -e a.out before any progress can be made.

configure:2453: ./a.out
./a.out: error while loading shared libraries: /lib32/tls/libc.so.6: cannot apply additional memory protection after relocation: Permission denied

--------------------------------------------------------
Side note I would avoid gcc-3.4.3 with hardened setups. 
The gcc seems to be faultly.
Comment 18 Milan Holzäpfel 2005-07-17 13:38:53 UTC
I use the standard 2005.0 profile on my AMD64 box and a self-patches kernel, 
amognst others with GRSecurity.  I need to a chpax -m / paxctl -m (or set the M 
subject flag in the ACL) for any 32-Bit-App I want to run, which has always been 
like this using a kernel featuring the resp. PaX feature. (which is 
CONFIG_PAX_MPROTECT, I suppose, but I haven't verified this.) 
Comment 19 solar (RETIRED) gentoo-dev 2005-07-17 14:52:18 UTC

*** This bug has been marked as a duplicate of 93769 ***