Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491512 - media-gfx/splashutils: does not compile if dev-libs/klibc is compiled using hardened toolchain.
Summary: media-gfx/splashutils: does not compile if dev-libs/klibc is compiled using h...
Status: RESOLVED DUPLICATE of bug 473512
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 17:51 UTC by Hongjiu Zhang
Modified: 2013-11-18 15:58 UTC (History)
0 users

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 Hongjiu Zhang 2013-11-17 17:51:46 UTC
So far this happens only in x86. My amd64 system is not affected. With a new gentoo hardened stage3 and some simple USE flags, 'emerge splashutils' fails.

Not tested on self-booted system.

Reproducible: Always

Steps to Reproduce:
1. Set up latest gentoo hardened x86 stage3 environment.
2. Follow the handbook with 'emerge --sync', 'eselect profile set', 'emerge hardened-source' and build the kernel.
3. According to the output of 'USE="fbcondecor" emerge -p splashutils', set up USE flags.
4. 'emerge -p splashutils'
Actual Results:  
>>> Compiling source in /srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/work/splashutils-1.5.4.4 ...
make CC=i686-pc-linux-gnu-gcc STRIP=true 
(CDPATH="${ZSH_VERSION+.}:" && cd . && autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make --silent all-recursive
Making all in libs
  CONF    libjpeg.a
  MAKE    libjpeg.a
/usr/lib/klibc/lib/libc.so: In function `__x86.get_pc_thunk.cx':
(.text+0x3334): multiple definition of `__x86.get_pc_thunk.cx'
.libs/jdinput.o:jdinput.c:(.text.__x86.get_pc_thunk.cx[__x86.get_pc_thunk.cx]+0x0): first defined here
/usr/lib/klibc/lib/libc.so: In function `__x86.get_pc_thunk.bx':
(.text+0x80): multiple definition of `__x86.get_pc_thunk.bx'
.libs/jcapimin.o:jcapimin.c:(.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]+0x0): first defined here
/usr/bin/ld: error in /usr/lib/klibc/lib/libc.so(.eh_frame); no .eh_frame_hdr table will be created.
/usr/bin/ld: warning: cannot find entry symbol main; defaulting to 0000000008048140
make[3]: *** [libjpeg.la] Error 1
make[2]: *** [libjpeg.a] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
emake failed
 * ERROR: media-gfx/splashutils-1.5.4.4-r1::gentoo failed (compile phase):
 *   failed to build splashutils
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called src_compile
 *   environment, line 3046:  Called die
 * The specific snippet of code:
 *       emake CC="${CC}" STRIP="true" || die "failed to build splashutils";
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/splashutils-1.5.4.4-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/splashutils-1.5.4.4-r1::gentoo'`.
 * The complete build log is located at '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/temp/build.log'.
 * The ebuild environment file is located at '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/temp/environment'.
 * Working directory: '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/work/splashutils-1.5.4.4'
 * S: '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/work/splashutils-1.5.4.4'

>>> Failed to emerge media-gfx/splashutils-1.5.4.4-r1, Log file:

>>>  '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/temp/build.log'

 * Messages for package media-gfx/splashutils-1.5.4.4-r1:

 * Due to problems with klibc, it is currently impossible to compile splashutils
 * with 'hardened' GCC flags. As a workaround, the package will be compiled with
 * -fno-stack-protector. Hardened GCC features will not be used while building
 * the splash kernel helper.
 * ERROR: media-gfx/splashutils-1.5.4.4-r1::gentoo failed (compile phase):
 *   failed to build splashutils
 * 
 * Call stack:
 *     ebuild.sh, line  93:  Called src_compile
 *   environment, line 3046:  Called die
 * The specific snippet of code:
 *       emake CC="${CC}" STRIP="true" || die "failed to build splashutils";
 * 
 * If you need support, post the output of `emerge --info '=media-gfx/splashutils-1.5.4.4-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=media-gfx/splashutils-1.5.4.4-r1::gentoo'`.
 * The complete build log is located at '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/temp/build.log'.
 * The ebuild environment file is located at '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/temp/environment'.
 * Working directory: '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/work/splashutils-1.5.4.4'
 * S: '/srv/sys/tmp/portage/media-gfx/splashutils-1.5.4.4-r1/work/splashutils-1.5.4.4'

Expected Results:  
The package should successfully compile.

Portage 2.2.1 (hardened/linux/x86, gcc-4.7.3, glibc-2.15-r3, 3.11.0-12-generic i686)
=================================================================
System uname: Linux-3.11.0-12-generic-i686-Intel-R-_Core-TM-_i5-2450M_CPU_@_2.50GHz-with-gentoo-2.2
KiB Mem:     3957248 total,    405876 free
KiB Swap:          0 total,         0 free
Timestamp of tree: Sun, 17 Nov 2013 15:15:01 +0000
ld GNU ld (GNU Binutils) 2.23.1
app-shells/bash:          4.2_p45
dev-lang/python:          2.7.5-r3, 3.2.5-r3
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.69
sys-devel/automake:       1.13.4
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.7.3-r1
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.2
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.9 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo local
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/srv/sys/dist"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="ftp://lug.mtu.edu/gentoo ftp://ftp.ussg.iu.edu/pub/linux/gentoo ftp://distfiles.gentoo.org/pub/gentoo"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/srv/sys/x86/pkg"
PORTAGE_COMPRESS="xz"
PORTAGE_COMPRESS_FLAGS="-9e"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_EXTRA_OPTS="--delete-excluded"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/srv/sys/tmp"
PORTDIR="/var/lib/repo/portage"
PORTDIR_OVERLAY="/var/lib/repo/local"
SYNC="rsync://rsync.us.gentoo.org/gentoo-portage"
USE="acpi bash-completion berkdb bluetooth branding bzip2 cli cracklib crypt cups cxx dbus dri dvd dvdr emboss fortran gdbm gpm hardened iconv ipv6 ldap mmx modules mudflap ncurses nls nptl openmp pam pax_kernel pcre pic readline session ssl tcpd truetype udev udisks unicode upower urandom usb x86 zlib" ABI_X86="32" 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" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd 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 sheets stage tables krita karbon braindump author" 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" GRUB_PLATFORMS="efi-64 pc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_GB en" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_2" PYTHON_TARGETS="python3_2 python2_7" RUBY_TARGETS="ruby20" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 intel mach64 mga nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa via vmware nouveau" 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, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, USE_PYTHON
Comment 1 Hongjiu Zhang 2013-11-17 17:54:29 UTC
This is also test in ~x86 (gcc 4.8, glibc 2.17, 'emerge -e system' performed), but still failed.

If 'gcc-config i686-pc-linux-gnu-4.7.3-hardenednopiessp && emerge -1 klibc' is performed, splashutils can be built. However, 'gcc-config i686-pc-linux-gnu-4.7.3-hardenednossp && emerge -1 klibc' (with pie) does not help.

There is no obvious error information in building klibc regardless which gcc is used.
Comment 2 Hongjiu Zhang 2013-11-17 17:57:42 UTC
PS: I used Ubuntu 13.10 amd64 livecd to 'linux32 chroot' to the stage3 system, and am going to test using my amd64 Gentoo.
Comment 3 Hongjiu Zhang 2013-11-18 15:58:29 UTC

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