Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 217287 - sys-libs/glibc-2.6.1 configure fails on hardened due to -shared/-nopie rejection
Summary: sys-libs/glibc-2.6.1 configure fails on hardened due to -shared/-nopie rejection
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-11 12:38 UTC by Wolfram Schlich (RETIRED)
Modified: 2009-03-04 23:47 UTC (History)
1 user (show)

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


Attachments
build-default-i686-pc-linux-gnu-nptl/config.log (config.log,24.41 KB, text/plain)
2008-04-12 10:11 UTC, Wolfram Schlich (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schlich (RETIRED) gentoo-dev 2008-04-11 12:38:42 UTC
>>> Compiling source in /var/tmp/portage/sys-libs/glibc-2.6.1/work/glibc-2.6.1 ...

 *             ABI:   default
 *          CBUILD:   i686-pc-linux-gnu
 *           CHOST:   i686-pc-linux-gnu
 *         CTARGET:   i686-pc-linux-gnu
 *      CBUILD_OPT:
 *     CTARGET_OPT:
 *              CC:
 *          CFLAGS:   -march=i686 -pipe -ggdb -O2 -fno-strict-aliasing -fno-stack-protector

 * Configuring GLIBC for nptl with:
                --enable-stackguard-randomization
                --enable-old-ssp-compat
                --enable-add-ons=nptl,c_stubs,libidn,ports
                --enable-kernel=2.6.9
                --without-selinux
                --without-cvs
                --enable-bind-now
                --build=i686-pc-linux-gnu
                --host=i686-pc-linux-gnu
                --disable-profile
                --without-gd
                --with-headers=/usr/include
                --prefix=/usr
                --libdir=/usr/lib
                --mandir=/usr/share/man
                --infodir=/usr/share/info
                --libexecdir=/usr/lib/misc/glibc

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
configure: running configure fragment for add-on nptl
configure: running configure fragment for add-on c_stubs
configure: running configure fragment for add-on libidn
checking add-on ports for preconfigure fragments... am33 arm hppa m68k mips
checking sysdep dirs... sysdeps/i386/elf nptl/sysdeps/unix/sysv/linux/i386/i686 nptl/sysdeps/unix/sysv/linux/i386 sysdeps/unix/sysv/linux/i386 nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread ports/sysdeps/unix/sysv/linux sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/common sysdeps/unix/mman sysdeps/unix/inet ports/sysdeps/unix/sysv/i386 sysdeps/unix/sysv/i386 nptl/sysdeps/unix/sysv ports/sysdeps/unix/sysv sysdeps/unix/sysv sysdeps/unix/i386 nptl/sysdeps/unix ports/sysdeps/unix sysdeps/unix sysdeps/posix sysdeps/i386/i686/fpu nptl/sysdeps/i386/i686 sysdeps/i386/i686 sysdeps/i386/i486 nptl/sysdeps/i386/i486 sysdeps/i386/fpu nptl/sysdeps/i386 sysdeps/i386 sysdeps/wordsize-32 sysdeps/ieee754/ldbl-96 sysdeps/ieee754/dbl-64 sysdeps/ieee754/flt-32 sysdeps/ieee754 sysdeps/generic/elf sysdeps/generic
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-pc-linux-gnu-gcc accepts -g... yes
checking for i686-pc-linux-gnu-gcc option to accept ANSI C... none needed
checking how to run the C preprocessor... i686-pc-linux-gnu-gcc -E
checking for i686-pc-linux-gnu-g++... i686-pc-linux-gnu-g++
checking whether we are using the GNU C++ compiler... yes
checking whether i686-pc-linux-gnu-g++ accepts -g... yes
checking whether /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/as is GNU as... yes
checking whether /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld is GNU ld... yes
checking for /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/as... /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/as
checking version of /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/as... 2.18, ok
checking for /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld... /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld
checking version of /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld... 2.18, ok
checking for pwd... /bin/pwd
checking for i686-pc-linux-gnu-gcc... (cached) i686-pc-linux-gnu-gcc
checking version of i686-pc-linux-gnu-gcc... 3.4.6, ok
checking for gnumake... no
checking for gmake... gmake
checking version of gmake... 3.81, ok
checking for gnumsgfmt... no
checking for gmsgfmt... gmsgfmt
checking version of gmsgfmt... 0.16.1, ok
checking for makeinfo... makeinfo
checking version of makeinfo... 4.8, ok
checking for sed... sed
checking version of sed... 4.1.5, ok
checking for autoconf... autoconf
checking whether autoconf works... yes
checking whether ranlib is necessary... no
checking LD_LIBRARY_PATH variable... ok
checking whether GCC supports -static-libgcc... -static-libgcc
checking for bash... /bin/sh
checking for gawk... gawk
checking for perl... /usr/bin/perl
checking for install-info... /usr/bin/install-info
checking for bison... /usr/bin/bison
checking for signed size_t type... no
checking for libc-friendly stddef.h... yes
checking whether we need to use -P to assemble .S files... no
checking whether .text pseudo-op must be used... yes
checking for assembler global-symbol directive... .globl
checking for .set assembler directive... yes
checking for assembler .type directive prefix... @
checking for .symver assembler directive... yes
checking for ld --version-script... yes
checking for .previous assembler directive... yes
checking for .protected and .hidden assembler directive... yes
checking whether __attribute__((visibility())) is supported... yes
checking for broken __attribute__((visibility()))... no
checking for broken __attribute__((alias()))... no
checking whether to put _rtld_local into .sdata section... no
checking for .preinit_array/.init_array/.fini_array support... yes
checking for libunwind-support in compiler... no
checking for -z nodelete option... configure: error: linker with -z nodelete support required

but the ld that configure found seems to support that:

# /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld --help | grep nodelete
  -z nodelete           Mark DSO non-deletable at runtime
  -z nodelete           Mark DSO non-deletable at runtime
#

Last time, glibc-2.6.1 was compiled fine with USE=debug.

emerge --info:
Portage 2.1.4.4 (hardened/x86/2.6, gcc-3.4.6, glibc-2.6.1-r0, 2.6.22-hardened-r8 i686)
=================================================================
System uname: 2.6.22-hardened-r8 i686 Intel(R) Core(TM)2 Duo CPU E4600 @ 2.40GHz
Timestamp of tree: Fri, 11 Apr 2008 00:45:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.7.9-r1, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openfire/resources/security/"
CONFIG_PROTECT_MASK="/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/udev/rules.d"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/local/portage/distfiles"
FEATURES="buildpkg ccache collision-protect distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://gentoo.inode.at http://sunsite.cnlab-switch.ch/ftp/mirror/gentoo"
INSTALL_MASK=" /etc/postfix/saslpass /etc/cron.monthly/update-pciids /etc/stunnel/stunnel.{crt,csr,key,pem} /etc/openldap/ssl/ldap.{crt,csr,key,pem}"
LANG="en_US.utf8"
LDFLAGS=" -nopie"
LINGUAS="en de fr"
MAKEOPTS="-j2"
PKGDIR="/local/portage/packages"
PORTAGE_COMPRESS="bzip2"
PORTAGE_COMPRESS_FLAGS="-9"
PORTAGE_RSYNC_EXTRA_OPTS="--timeout=30"
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="/local/portage/layman/wschlich /local/portage/layman/wschlich-testing /usr/local/portage"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="X509 accounting acl acpi adns ansi automount bash-completion bcmath berkdb bidi bzip2 calendar caps ccache chroot cracklib crypt cscope csv ctype dbm dbus dbx dhcp ecc expat fam ftp gdbm gzip hardened hpn http iconv idled idn imap inifile innodb ipalias ipv6 lm_sensors lmtp logrotate logwatch mailbox maildir mailwrapper mbox mcal memlimit mgetty mhash mime mimencode mmap mmx mpi ncurses network nfs nis nls nntp nptl nptlonly openssh openssl pam pam_chroot pam_timestamp pcntl pcre perl pic posix postfix procmail pwdb python quotas readline sample sasl screen sendfile sensord sftp sftplogging shaper shared sharedext sharedmem skey slang smime smtp sockets sql sse ssl sysfs syslog sysvipc tcpd threads tokenizer unicode usb userlocales utf8 vim vim-pager x86 xattr xinetd xml xml2 xmlrpc xsl xslt zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1     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 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="mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en de fr" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt      mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage    siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware         voodoo"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, LC_ALL
Comment 1 SpanKY gentoo-dev 2008-04-11 16:47:24 UTC
you know we need config.log files when filing bugs ... so post it
Comment 2 Wolfram Schlich (RETIRED) gentoo-dev 2008-04-12 10:11:05 UTC
Created attachment 149466 [details]
build-default-i686-pc-linux-gnu-nptl/config.log

(In reply to comment #1)
> you know we need config.log files when filing bugs ... so post it

There's only /var/tmp/portage/sys-libs/glibc-2.6.1/work/build-default-i686-pc-linux-gnu-nptl/config.log
so here you go.
Comment 3 SpanKY gentoo-dev 2008-04-12 18:23:53 UTC
configure:5560: i686-pc-linux-gnu-gcc -march=i686 -pipe -ggdb -O2 -fno-strict-aliasing -fno-stack-protector -DPIC -DPIC  -nopie
		     -fPIC -shared -o conftest.so conftest.c
		     -nostartfiles -nostdlib
		     -Wl,--enable-new-dtags,-z,nodelete 1>&5
i686-pc-linux-gnu-gcc: -shared and -static|pie|fPIE|fpie|fno-PIC|fno-pic|nopie are incompatible
Comment 4 Wolfram Schlich (RETIRED) gentoo-dev 2008-04-13 13:35:33 UTC
Oh, I forgot I had this in make.conf:
CFLAGS="${CFLAGS} -ggdb"
LDFLAGS="${LDFLAGS} -nopie"

With USE=-debug and without those flags, it compiles fine.

Thanks!