Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143058 - media-libs/a52dec-0.7.4-r5 fails test on hardened Gentoo
Summary: media-libs/a52dec-0.7.4-r5 fails test on hardened Gentoo
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High trivial (vote)
Assignee: The Gentoo Linux Hardened Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-07 00:00 UTC by RonnyPeine
Modified: 2009-05-12 18:27 UTC (History)
3 users (show)

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


Attachments
a52dec 0.7.4-r5 compile output. (a52dec_PIC.log,12.47 KB, text/plain)
2006-09-14 10:27 UTC, Olliver Schinagl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RonnyPeine 2006-08-07 00:00:10 UTC
media-libs/a52dec-0.7.4-r5 fails test on hardened Gentoo because of PIE.
With CFLAG -nopie test works. Proprosed fix: append -nopie to CFLAGS.
Comment 1 Olliver Schinagl 2006-09-14 10:27:41 UTC
Created attachment 96981 [details]
a52dec 0.7.4-r5 compile output.

I think I have a similiar/same problem with a52dec. Here's my story as I think this is the spot to put it.

I rescently switched to a hardened kernel/profile/toolchain and noticed my gallery wouldn't deal properly with movies anymore. After running ffmpeg manually I found out libavcodec was givin some permission denied errors (from pax obviously). Examining the compile logs I found that it was spewing out a DT_TEXTREL error, which supposidly comes from not compiling with -fPIC. However all files where compiled with -fPIC and after soem more research it turned out that a library ffmpeg links against, a52dec, was the cruelpit.

Attached ist he a52dec compile log and I noticed only half the sources are compiled with -fPIC. libao for example isn't compiled with -fPIC. So the passing of CFLAGS appears to be ok to a certain extend (I noticed some other errors appaerantly overriding my profile or whatnot:
 -mcpu=pentiumpro -c audio_out_peak.c
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
I don't use mcpu for sure, and pentiumpro also is not what I got.) but not everwhere.

I guess it's an upstream bug, where some Makefile options are overridden or not re-used or something.

For now, i'll just -a52 my use flags and be done with it.
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-01 22:50:02 UTC
Hardened, advise solution please.
Comment 3 PaX Team 2007-04-24 09:55:56 UTC
i don't think a52 has a problem, it compiles fine without textrels. on the other hand ffmpeg needs special care, see bug #115568 .
Comment 4 Xake 2008-06-18 21:55:50 UTC
this bug has nothin to do with textrels to begin with.

I think the problem found by the original reporter is the same as mine:
make  check-TESTS
make[2]: Entering directory `/var/tmp/portage/media-libs/a52dec-0.7.4-r5/work/a52dec-0.7.4/test'
SKIP: regression
SKIP: compile
BAD GLOBAL SYMBOLS:
__i686.get_pc_thunk.bx
__i686.get_pc_thunk.bx
__i686.get_pc_thunk.bx
__i686.get_pc_thunk.bx
__i686.get_pc_thunk.bx
FAIL: globals
======================
1 of 1 tests failed
(2 tests were not run)
======================
make[2]: *** [check-TESTS] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-libs/a52dec-0.7.4-r5/work/a52dec-0.7.4/test'
make[1]: *** [check-am] Error 2
make[1]: Leaving directory `/var/tmp/portage/media-libs/a52dec-0.7.4-r5/work/a52dec-0.7.4/test'
make: *** [check-recursive] Error 1


Portage 2.1.4.4 (hardened/linux/x86/2008.0, gcc-3.4.6, glibc-2.6.1-r0, 2.6.25-gentoo-r4 i686)
=================================================================
System uname: 2.6.25-gentoo-r4 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz
Timestamp of tree: Wed, 18 Jun 2008 21:35:01 +0000
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-mtune=i686 -O2 -pipe -fforce-addr"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-mtune=i686 -O2 -pipe -fforce-addr"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict test unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="sv"
LC_ALL="sv_SE.UTF-8"
LINGUAS="sv"
PKGDIR="/usr/portage/packages"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bzip2 cli cracklib crypt cups dri gdbm gpm hardened iconv isdnlog midi mudflap ncurses nptl nptlonly openmp pam pcre perl pic pppd python readline reflection session spl ssl tcpd urandom x86 xorg 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="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="sv" 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, INSTALL_MASK, LDFLAGS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 5 Samuli Suominen (RETIRED) gentoo-dev 2009-05-11 17:30:26 UTC
So, is append-flags -nopie a feasible workaround or not? It's been almost 3 years this was reported.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2009-05-12 18:27:05 UTC
+  12 May 2009; Samuli Suominen <ssuominen@gentoo.org>
+  a52dec-0.7.4-r6.ebuild:
+  filter-flags -fPIE in src_test wrt #143058

Please reopen if this doesn't help; I wasn't sure if I should use "append-ldflags -nopie" or this, but I was advised in #gentoo-hardened, Freenode, by a user and developer to use this instead.