Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 96395 - avidemux 2.0.40 compile hardened pic gcc O3
Summary: avidemux 2.0.40 compile hardened pic gcc O3
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords: PMASKED
: 117249 (view as bug list)
Depends on:
Blocks: 158340
  Show dependency tree
 
Reported: 2005-06-17 10:31 UTC by doejoe
Modified: 2007-02-03 13:26 UTC (History)
3 users (show)

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


Attachments
avidemux-2.0.40-pic.patch (avidemux-2.0.40-pic.patch,4.85 KB, patch)
2005-07-13 06:10 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description doejoe 2005-06-17 10:31:15 UTC
I couldn't compile avidemux-2.0.40-r1 and earlier version with hardened
gcc/profile. Because of that emerge -e world doesn't work. I works for every
installed application including xorg but not for avidemux.
The problem seems that the avidemux installations script compiles parts with the
O3 tag which isn't compatbile with hardened.

There should be a possibility in ebuild to deactivate the O3 tag.

Reproducible: Always
Steps to Reproduce:
1.(create hardened gentoo environment)
2.emerge avidemux or emerge -e world with avidemux installed
Actual Results:  
/bin/sh ../libtool --silent --mode=link x86_64-pc-linux-gnu-g++  -I..
-IADM_library -I../ADM_library  -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2
-falign-loops=16   -o avidemux2  -L/usr/X11R6/lib   -Wl,--export-dynamic
-pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm
-lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl
-lgthread-2.0 -lglib-2.0   -lfreetype -lz    -lxml2 -lpthread -lz -lm  
-lvorbisenc -lvorbis -lm -logg   -lmad -lm   ../adm_lavcodec/libavcodec.a -lX11
-lXext  gui_keyframes.o support.o guiplay.o gui_xv.o gui_savenew.o gui_rgb.o
gui_navigate.o gtk_gui.o callbacks.o avilist.o main.o prefs.o ADM_guiBitrate.o
ADM_requantize.o ADM_pp.o ADM_memsupport.o ../adm_lavcodec/libavcodec.a
../adm_lavcodec/libpostproc/libpostproc.a ./ADM_script/libADM_script.a
./ADM_editor/libADM_editor.a ./ADM_library/libADM_library.a
./ADM_openDML/libADM_openDML.a ./oplug_ogm/liboplug_ogm.a
./ADM_audiocodec/libADM_audiocodec.a ./ADM_audio/libADM_audio.a
./oplug_avi/liboplug_avi.a ./oplug_mpeg/liboplug_mpeg.a
./oplug_mpegFF/liboplug_mpegFF.a ./ADM_requant/libADM_requant.a
./ADM_mplex/libADM_mplex.a ./ADM_lavformat/libADM_lavformat.a
./ADM_lvemux/libADM_lvemux.a ./ADM_filter/libADM_filter.a
./ADM_video/libADM_video.a   ./ADM_encoder/libADM_encoder.a
./MPlayer_pp/libMPlayer_pp.a ./ADM_codecs/libADM_codecs.a
./ADM_vp32/libADM_vp32.a   ./ADM_audiofilter/libADM_audiofilter.a
./libtoolame/liblibtoolame.a ./ADM_gui2/libADM_gui2.a ./mpeg2enc/libmpeg2enc.a
./ADM_gui/libADM_gui.a ./ADM_inpics/libADM_inpics.a  ./ADM_3gp/libADM_3gp.a
./ADM_h263/libADM_h263.a ./ADM_nuv/libADM_nuv.a  ./ADM_ogm/libADM_ogm.a
./ADM_audiodevice/libADM_audiodevice.a ./ADM_mpeg2dec/libADM_mpeg2dec.a
./ADM_xvidratectl/libADM_xvidratectl.a ./ADM_ocr/libADM_ocr.a
./ADM_dialog/libADM_dialog.a ./ADM_mpegindexer/libADM_mpegindexer.a
./ADM_mpeg2dec/libADM_mpeg2dec.a ./libMpeg2Dec/liblibMpeg2Dec.a
./ADM_toolkit/libADM_toolkit.a ./ADM_colorspace/libADM_colorspace.a
../adm_lavcodec/libpostproc/libpostproc.a ./ADM_library/libADM_library.a  -lXv
-lmp3lame -la52 -lfaac -lfaad -lasound -lm -ldl -lpthread -lm -ldl -lpthread -lm
-ldl -lpthread -lxvidcore -lxvidcore
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
../adm_lavcodec/libavcodec.a(dsputil_mmx.o): relocation R_X86_64_32S against `a
local symbol' can not be used when making a shared object; recompile with -fPIC
../adm_lavcodec/libavcodec.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [avidemux2] Error 1
make[3]: Leaving directory
`/var/tmp/portage/avidemux-2.0.40-r1/work/avidemux-2.0.40/avidemux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/avidemux-2.0.40-r1/work/avidemux-2.0.40/avidemux'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/avidemux-2.0.40-r1/work/avidemux-2.0.40'
make: *** [all] Error 2

!!! ERROR: media-video/avidemux-2.0.40-r1 failed.
!!! Function src_compile, Line 85, Exitcode 2
!!! emake failed
!!! If you need support, post the topmost build error, NOT this status message.

Expected Results:  
Compiled fine.

emerge --info:
Code:

Gentoo Base System version 1.4.16
Portage 2.0.51.19 (hardened/amd64, gcc-3.4.3, glibc-2.3.4.20041102-r1,
2.6.11-hardened-r13 x86_64)
=================================================================
System uname: 2.6.11-hardened-r13 x86_64 AMD Athlon(tm) 64 Processor 3400+
Python:              dev-lang/python-2.3.5 [2.3.5 (#1, Jun  6 2005, 21:53:41)]
dev-lang/python:     2.3.5
sys-apps/sandbox:    [Not Present]
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.5
sys-devel/binutils:  2.15.92.0.2-r10
sys-devel/libtool:   1.5.16
virtual/os-headers:  2.6.8.1-r4
ACCEPT_KEYWORDS="amd64"
AUTOCLEAN="yes"
CFLAGS="-march=k8 -O2 -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="-march=k8 -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms strict"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.informatik.rwth-aachen.de/gentoo-portage"
USE="X amd64 cdr dvd dvdr gd hardened ncurses nptl nptlonly pam perl pic python
readline ssl tcpd zlib userland_GNU kernel_linux elibc_glibc"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-07-13 06:10:53 UTC
Created attachment 63309 [details, diff]
avidemux-2.0.40-pic.patch

This patch *could* fix this, as it uses __PIC__ instead of PIC (similar
problems are in ffmpeg code iirc).

Please test this as I'm not sure if it's the case to apply that if it doesn't
change anything :)
Comment 2 doejoe 2005-07-15 04:57:17 UTC
I am sorry but I got the same error.

/ADM_filter/libADM_filter.a ./ADM_video/libADM_video.a  
./ADM_encoder/libADM_encoder.a ./MPlayer_pp/libMPlayer_pp.a
./ADM_codecs/libADM_codecs.a ./ADM_vp32/libADM_vp32.a  
./ADM_audiofilter/libADM_audiofilter.a ./libtoolame/liblibtoolame.a
./ADM_gui2/libADM_gui2.a ./mpeg2enc/libmpeg2enc.a ./ADM_gui/libADM_gui.a
./ADM_inpics/libADM_inpics.a  ./ADM_3gp/libADM_3gp.a ./ADM_h263/libADM_h263.a
./ADM_nuv/libADM_nuv.a  ./ADM_ogm/libADM_ogm.a
./ADM_audiodevice/libADM_audiodevice.a ./ADM_mpeg2dec/libADM_mpeg2dec.a
./ADM_xvidratectl/libADM_xvidratectl.a ./ADM_ocr/libADM_ocr.a
./ADM_dialog/libADM_dialog.a ./ADM_mpegindexer/libADM_mpegindexer.a
./ADM_mpeg2dec/libADM_mpeg2dec.a ./libMpeg2Dec/liblibMpeg2Dec.a
./ADM_toolkit/libADM_toolkit.a ./ADM_colorspace/libADM_colorspace.a
../adm_lavcodec/libpostproc/libpostproc.a ./ADM_library/libADM_library.a  -lXv
-lmp3lame -la52 -lfaac -lfaad -lasound -lm -ldl -lpthread -lm -ldl -lpthread -lm
-ldl -lpthread -lxvidcore -lxvidcore
/usr/lib/gcc/x86_64-pc-linux-gnu/3.4.3/../../../../x86_64-pc-linux-gnu/bin/ld:
../adm_lavcodec/libavcodec.a(dsputil_mmx.o): relocation R_X86_64_32S against `a
local symbol' can not be used when making a shared object; recompile with -fPIC
../adm_lavcodec/libavcodec.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[3]: *** [avidemux2] Error 1
make[3]: Leaving directory
`/var/tmp/portage/avidemux-2.0.40-r1/work/avidemux-2.0.40/avidemux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/var/tmp/portage/avidemux-2.0.40-r1/work/avidemux-2.0.40/avidemux'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/avidemux-2.0.40-r1/work/avidemux-2.0.40'
make: *** [all] Error 2
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-07 03:31:17 UTC
That was from the emerge or after applying by hand the patch over the 
semi-compiled sources in /var/tmp/portage ? 
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-07 04:28:34 UTC
Please test and see if latest revision works. 
 
Comment 5 solar (RETIRED) gentoo-dev 2005-08-07 05:51:01 UTC
Removing myself from the CC as I'm on the hardened alias.

Tested with
CFLAGS="-fomit-frame-pointer" USE="xv xvid -mmx oss" emerge $(basename $(pwd))

fomit-frame-pointer was needed or we errored out even sooner with a 
GENERAL_REGS error telling us that all registers are in use. 

The finial fatal classic error fails later on with.
msmpeg4.c: In function `msmpeg4_encode_dc':
msmpeg4.c:720: error: can't find a register in class `BREG' while reloading `asm'
Comment 6 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-07 05:54:14 UTC
Reopening then... hardened, maybe it's better to just mask avidemux in your 
profile until a newer fixed version is in portage? 
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-07 09:38:06 UTC
As this is x86-specific, CCing x86@g.o  
Comment 8 solar (RETIRED) gentoo-dev 2005-08-07 21:36:42 UTC
per profile package masking should not be abused. 
The only time it is allowed is when merging a given package will break your system. 

# 27 Sep 2004; <carpaski@gentoo.org> (gentoo-core mailing list)
# Profiles have a package.mask for ARCHITECTURE related masking. There 
# must be an explicitly defined reason for using this file in any 
# particular way. It is NOT a general-use file. It is for specific 
# instances that involve incompatibilities between libs and specific 
# profiles.
Comment 9 solar (RETIRED) gentoo-dev 2005-08-07 21:40:06 UTC
With that said this package problems can be worked around by passing -nopie 
durring the compile to C{XX,}FLAGS -fomit-frame-pointer (disable ssp if needed). 
However that does not work as this package does not use CXX flags 
properly for all source code.
Comment 10 Olivier Crete (RETIRED) gentoo-dev 2005-08-08 05:23:14 UTC
flameeyes, dont abuse.. this is hardened.. not x86..
Comment 11 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-08-08 06:12:19 UTC
(it can also be considered x86... there was similar problems before.. oh well) 
 
I've added a patch to respect CXXFLAGS as configure.in.in was a bit broken, 
now should be better. 
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-09-02 15:39:08 UTC
News? 
Comment 13 Diego Elio Pettenò (RETIRED) gentoo-dev 2005-10-30 15:10:16 UTC
Reopen if it's still an issue, close if it's fixed. 
 
Comment 14 Jakub Moc (RETIRED) gentoo-dev 2005-12-31 00:44:23 UTC
*** Bug 117249 has been marked as a duplicate of this bug. ***
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2005-12-31 00:48:06 UTC
Still broken...
Comment 16 Steve Dibb (RETIRED) gentoo-dev 2007-02-03 13:26:29 UTC
removed from tree, file a new bug if an issue with 2.3.0