|
Home > Archive > Unix Programming > September 2006 > DT_TEXTREL
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| oliver 2006-09-16, 1:43 pm |
| Hi, I'm having some trouble getting ffmpeg working on hardend linux
kernel. I hope this newsgroup is the appropiate place to ask (I did
find a previous refference about DT_TEXTREL which unfortunatly did not
help me).
I'm using gentoo linux to start with, with a hardened 2.6.16 kernel
(pax etc enabled).
my gcc version is:
7of9 libavcodec # cc --version
gcc (GCC) 3.4.6 (Gentoo Hardened 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
and my ld version is:
7of9 libavcodec # ld --version
GNU ld version 2.16.1
When I install ffmpeg-0.4.9_p20060816 it builds and installs just fine,
however running it I get a permission denied error, coming most likly
from a DT_TEXTREL error.
ffmpeg: error while loading shared libraries:
/usr/lib/libavcodec.so.51: cannot make segment writable for relocation:
Permission denied
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
The previous post I found about this issue was to make sure that the
sources where compiled with the -fPIC option. I checked and it appears
to be so.
For gentoo people, to double check I did an ebuild ffmpeg compile, goto
the libavcodec dir, edited the makefile to insert an -fPIC (though I
was quite sure it would take my cflag fPIC anyhow) and here is the
snipped of the result. As it's clearly visible, fPIC is set twice,
(once from the profile once from the makefile)
i686-pc-linux-gnu-gcc -fPIC -fomit-frame-pointer -fomit-frame-pointer
-Wdeclaration-after-statement -Wall -Wno-switch -fPIC
-DHAVE_AV_CONFIG_H -I..
-I/var/tmp/portage/ffmpeg-0.4.9_p20060816/work/ffmpeg/libavutil
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -fPIC
-DPIC -c -o liba52/imdct.o liba52/imdct.c
i686-pc-linux-gnu-gcc -fPIC -fomit-frame-pointer -fomit-frame-pointer
-Wdeclaration-after-statement -Wall -Wno-switch -fPIC
-DHAVE_AV_CONFIG_H -I..
-I/var/tmp/portage/ffmpeg-0.4.9_p20060816/work/ffmpeg/libavutil
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -fPIC
-DPIC -c -o liba52/parse.o liba52/parse.c
i686-pc-linux-gnu-gcc -fPIC -fomit-frame-pointer -fomit-frame-pointer
-Wdeclaration-after-statement -Wall -Wno-switch -fPIC
-DHAVE_AV_CONFIG_H -I..
-I/var/tmp/portage/ffmpeg-0.4.9_p20060816/work/ffmpeg/libavutil
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -fPIC
-DPIC -c -o liba52/crc.o liba52/crc.c
i686-pc-linux-gnu-gcc -fPIC -fomit-frame-pointer -fomit-frame-pointer
-Wdeclaration-after-statement -Wall -Wno-switch -fPIC
-DHAVE_AV_CONFIG_H -I..
-I/var/tmp/portage/ffmpeg-0.4.9_p20060816/work/ffmpeg/libavutil
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -fPIC
-DPIC -c -o liba52/resample.o liba52/resample.c
rm -f libavcodec.a
ar rc libavcodec.a bitstream.o utils.o allcodecs.o mpegvideo.o
jrevdct.o jfdctfst.o jfdctint.o mjpeg.o resample.o resample2.o
dsputil.o motion_est.o imgconvert.o mpeg12.o mpegaudiodec.o
simple_idct.o ratecontrol.o eval.o error_resilience.o fft.o mdct.o
raw.o golomb.o cabac.o faandct.o parser.o vp3dsp.o h264idct.o
rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o opt.o bitstream_filter.o
imgresample.o aasc.o ac3enc.o alac.o asv1.o avs.o bmp.o cavs.o
cavsdsp.o cinepak.o cljr.o cook.o cscd.o lzo.o cyuv.o dvbsubdec.o
dvbsub.o dvdsub.o dvdsubenc.o dv.o 8bps.o ffv1.o huffyuv.o flac.o
flacenc.o flashsv.o flicvideo.o 4xm.o fraps.o h261.o h264.o
idcinvideo.o indeo2.o indeo3.o interplayvideo.o dpcm.o kmvc.o loco.o
mace.o mmvideo.o mpegaudio.o msrle.o msvideo1.o lcl.o nuv.o rtjpeg.o
png.o qdm2.o qdrw.o qpeg.o qtrle.o ra144.o ra288.o roqvideo.o rpza.o
rv10.o shorten.o smacker.o smc.o snow.o sonic.o svq1.o vp3.o
truemotion1.o truemotion2.o truespeech.o tscc.o tta.o ulti.o vc1.o
vc1dsp.o vcr1.o vmdav.o vorbis.o vqavideo.o wmadec.o wnv1.o ws-snd1.o
xan.o xl.o zmbv.o pcm.o adpcm.o adx.o g726.o faad.o faac.o xvidff.o
xvid_rc.o x264.o mp3lameaudio.o oggvorbis.o a52dec.o
liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o
liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o
ranlib libavcodec.a
i686-pc-linux-gnu-gcc -shared -Wl,-soname,libavcodec.so.51
-Wl,--warn-common -rdynamic -export-dynamic -Wl,--as-needed
-Wl,-rpath-link,/var/tmp/portage/ffmpeg-0.4.9_p20060816/work/ffmpeg/libavcodec
-Wl,-rpath-link,/var/tmp/portage/ffmpeg-0.4.9_p20060816/work/ffmpeg/libavformat
-Wl,-rpath-link,/var/tmp/portage/ffmpeg-0.4.9_p20060816/work/ffmpeg/libavutil
-o libavcodec.so.51 bitstream.o utils.o allcodecs.o mpegvideo.o
jrevdct.o jfdctfst.o jfdctint.o mjpeg.o resample.o resample2.o
dsputil.o motion_est.o imgconvert.o mpeg12.o mpegaudiodec.o
simple_idct.o ratecontrol.o eval.o error_resilience.o fft.o mdct.o
raw.o golomb.o cabac.o faandct.o parser.o vp3dsp.o h264idct.o
rangecoder.o pnm.o h263.o msmpeg4.o h263dec.o opt.o bitstream_filter.o
imgresample.o aasc.o ac3enc.o alac.o asv1.o avs.o bmp.o cavs.o
cavsdsp.o cinepak.o cljr.o cook.o cscd.o lzo.o cyuv.o dvbsubdec.o
dvbsub.o dvdsub.o dvdsubenc.o dv.o 8bps.o ffv1.o huffyuv.o flac.o
flacenc.o flashsv.o flicvideo.o 4xm.o fraps.o h261.o h264.o
idcinvideo.o indeo2.o indeo3.o interplayvideo.o dpcm.o kmvc.o loco.o
mace.o mmvideo.o mpegaudio.o msrle.o msvideo1.o lcl.o nuv.o rtjpeg.o
png.o qdm2.o qdrw.o qpeg.o qtrle.o ra144.o ra288.o roqvideo.o rpza.o
rv10.o shorten.o smacker.o smc.o snow.o sonic.o svq1.o vp3.o
truemotion1.o truemotion2.o truespeech.o tscc.o tta.o ulti.o vc1.o
vc1dsp.o vcr1.o vmdav.o vorbis.o vqavideo.o wmadec.o wnv1.o ws-snd1.o
xan.o xl.o zmbv.o pcm.o adpcm.o adx.o g726.o faad.o faac.o xvidff.o
xvid_rc.o x264.o mp3lameaudio.o oggvorbis.o a52dec.o
liba52/bit_allocate.o liba52/bitstream.o liba52/downmix.o
liba52/imdct.o liba52/parse.o liba52/crc.o liba52/resample.o
-L../libavutil -lavutil -lm -lz -lmp3lame -lvorbis -lvorbisenc -logg
-logg -lxvidcore -lx264 -lfaac -lfaad -ldl
/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld:
warning: creating a DT_TEXTREL in object.
ln -sf libavcodec.so.51 libavcodec.so
So how do I go about fixing this ...?
| |
| Måns Rullgård 2006-09-16, 1:43 pm |
| "oliver" <oliver.schinagl@gmail.com> writes:
> Hi, I'm having some trouble getting ffmpeg working on hardend linux
> kernel. I hope this newsgroup is the appropiate place to ask (I did
The ffmpeg mailing list would probably be a better place. A more
descriptive subject wouldn't hurt either.
> find a previous refference about DT_TEXTREL which unfortunatly did not
> help me).
>
> I'm using gentoo linux to start with, with a hardened 2.6.16 kernel
> (pax etc enabled).
> my gcc version is:
> 7of9 libavcodec # cc --version
> gcc (GCC) 3.4.6 (Gentoo Hardened 3.4.6-r1, ssp-3.4.5-1.0, pie-8.7.9)
>
> and my ld version is:
> 7of9 libavcodec # ld --version
> GNU ld version 2.16.1
>
> When I install ffmpeg-0.4.9_p20060816 it builds and installs just fine,
Always get ffmpeg sources directly from subversion.
> however running it I get a permission denied error, coming most likly
> from a DT_TEXTREL error.
> ffmpeg: error while loading shared libraries:
> /usr/lib/libavcodec.so.51: cannot make segment writable for relocation:
> Permission denied
> /usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../../../i686-pc-linux-gnu/bin/ld:
> warning: creating a DT_TEXTREL in object.
>
> The previous post I found about this issue was to make sure that the
> sources where compiled with the -fPIC option. I checked and it appears
> to be so.
[...]
> -logg -lxvidcore -lx264 -lfaac -lfaad -ldl
Your libx264 is probably a static library built without -fPIC. Try
building ffmpeg without support for any extra libraries.
--
Måns Rullgård
mru@inprovide.com
| |
| oliver 2006-09-16, 1:43 pm |
|
M=E5ns Rullg=E5rd wrote:
> "oliver" <oliver.schinagl@gmail.com> writes:
>
>
> The ffmpeg mailing list would probably be a better place. A more
> descriptive subject wouldn't hurt either.
True that, Sorry.
>
>
> Always get ffmpeg sources directly from subversion.
I could make an ebuild for the latest svn version myself, but I'd
rather run the older 'stable' version. I shoulndn't run this on a
server anyhow, I know, but I run gallery 2 on that website, and for the
movies, it needs/wants ffmpeg...
>
ld:[vbcol=seagreen]
>
> [...]
>
>
> Your libx264 is probably a static library built without -fPIC. Try
> building ffmpeg without support for any extra libraries.
Ahh, didn't think of that, without any libs it works just fine, so now
to find out which lib is the offender and 'fix' it's flags.
>=20
> --=20
> M=E5ns Rullg=E5rd
> mru@inprovide.com
Thanks alot,
Oliver
| |
| Måns Rullgård 2006-09-16, 1:43 pm |
| "oliver" <oliver.schinagl@gmail.com> writes:
> Måns Rullgård wrote:
> I could make an ebuild for the latest svn version myself, but I'd
> rather run the older 'stable' version. I shoulndn't run this on a
> server anyhow, I know, but I run gallery 2 on that website, and for the
> movies, it needs/wants ffmpeg...
The latest source from svn is generally the most stable.
--
Måns Rullgård
mru@inprovide.com
|
|
|
|
|