FW: Link error - Relocations in generic ELF (EM: 3)
Hello list, I have a link error with my released version of mplayer package. At the end of compilation with (my arm toolchain) "ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc", the link start, and immediately failed with the following error: ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc -I../libswscale -I../libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I.. -I.. -I../libavutil -Wdeclaration-after-statement -I. -I.. -I../libavutil -W -Wall -Wno-unused-parameter -O2 -g -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cr oss/arm-wrs-linux-gnueabi/lib/live -c -o armv4l/simple_idct_armv5te.o armv4l/simple_idct_armv5te.S ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc -I../libswscale -I../libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I.. -I.. -I../libavutil -Wdeclaration-after-statement -I. -I.. -I../libavutil -W -Wall -Wno-unused-parameter -O2 -g -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cr oss/arm-wrs-linux-gnueabi/lib/live -c -o armv4l/mpegvideo_armv5te.o armv4l/mpegvideo_armv5te.c ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc -I../libswscale -I../libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I.. -I.. -I../libavutil -Wdeclaration-after-statement -I. -I.. -I../libavutil -W -Wall -Wno-unused-parameter -O2 -g -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -I/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cr oss/arm-wrs-linux-gnueabi/lib/live -c -o armv4l/simple_idct_armv6.o armv4l/simple_idct_armv6.S In file included from ../libavcodec/dsputil.h:33, from armv4l/mpegvideo_arm.c:22: ../libavcodec/avcodec.h:2501: warning: `ImgReSampleContext' is deprecated (declared at ../libavcodec/avcodec.h:2480) ../libavcodec/avcodec.h:2507: warning: `ImgReSampleContext' is deprecated (declared at ../libavcodec/avcodec.h:2480) In file included from ../libavcodec/dsputil.h:33, from armv4l/mpegvideo_armv5te.c:28: ../libavcodec/avcodec.h:2501: warning: `ImgReSampleContext' is deprecated (declared at ../libavcodec/avcodec.h:2480) ../libavcodec/avcodec.h:2507: warning: `ImgReSampleContext' is deprecated (declared at ../libavcodec/avcodec.h:2480) armv4l/mpegvideo_armv5te.c: In function `dct_unquantize_h263_intra_armv5te': armv4l/mpegvideo_armv5te.c:161: warning: unused variable `i' armv4l/mpegvideo_armv5te.c: In function `dct_unquantize_h263_inter_armv5te': armv4l/mpegvideo_armv5te.c:190: warning: unused variable `i' armv4l/mpegvideo_armv5te.c:190: warning: unused variable `level' rm -f libavcodec.a ar rc libavcodec.a bitstream.o utils.o allcodecs.o mpegvideo.o jrevdct.o jfdctfst.o jfdctint.o resample.o resample2.o dsputil.o motion_est.o imgconvert.o mpeg12.o simple_idct.o ratecontrol.o eval.o error_resilience.o raw.o faandct.o parser.o rangecoder.o h263.o opt.o bitstream_filter.o audioconvert.o imgresample.o aasc.o alac.o asv1.o atrac3.o mdct.o fft.o avs.o bethsoftvideo.o bmp.o c93.o cavs.o cavsdsp.o golomb.o cinepak.o cljr.o cook.o cscd.o cyuv.o dca.o dnxhddec.o dsicinav.o dvbsubdec.o dvdsubdec.o dv.o dxa.o 8bps.o ffv1.o huffyuv.o flac.o flashsv.o flicvideo.o 4xm.o fraps.o gifdec.o lzw.o h261dec.o h261.o h263dec.o h264.o h264idct.o cabac.o idcinvideo.o imc.o indeo2.o indeo3.o interplayvideo.o dpcm.o jpeglsdec.o jpegls.o mjpegdec.o mjpeg.o kmvc.o loco.o mace.o mjpegbdec.o mmvideo.o mpegaudiodec.o mpegaudiodecheader.o mpegaudio.o mpegaudiodata.o mpc.o msmpeg4.o msmpeg4data.o msrle.o msvideo1.o lcl.o nuv.o rtjpeg.o png.o ptx.o qdm2.o qdrw.o qpeg.o qtrle.o ra144.o ra288.o roqvideodec.o roqvideo.o rpza.o rv10.o sgidec.o shorten.o smacker.o smc.o snow.o sonic.o sp5xdec.o svq1.o targa.o vp3.o xiph.o vp3dsp.o tiertexseqv.o tiff.o truemotion1.o truemotion2.o truespeech.o tscc.o tta.o txd.o s3tc.o ulti.o vc1.o vc1data.o vc1dsp.o vcr1.o vmdav.o vmnc.o vorbis_dec.o vorbis.o vorbis_data.o vp5.o vp56.o vp56data.o vp6.o vqavideo.o wavpack.o wmadec.o wma.o wnv1.o ws-snd1.o xan.o xl.o zmbv.o pcm.o adpcm.o adx.o g726.o aac_parser.o aac_ac3_parser.o ac3_parser.o ac3tab.o cavs_parser.o dca_parser.o dvbsub_parser.o dvdsub_parser.o h261_parser.o h263_parser.o h264_parser.o mjpeg_parser.o mpeg4video_parser.o mpegaudio_parser.o mpegvideo_parser.o pnm_parser.o pnm.o vc1_parser.o dump_extradata_bsf.o remove_extradata_bsf.o noise_bsf.o mp3_header_compress_bsf.o mp3_header_decompress_bsf.o mjpega_dump_header_bsf.o imx_dump_header_bsf.o pthread.o armv4l/dsputil_arm.o armv4l/mpegvideo_arm.o armv4l/jrevdct_arm.o armv4l/simple_idct_arm.o armv4l/dsputil_arm_s.o armv4l/simple_idct_armv5te.o armv4l/mpegvideo_armv5te.o armv4l/simple_idct_armv6.o arm-wrs-linux-gnueabi-armv5tel-glibc_small-ranlib libavcodec.a make[2]: Leaving directory `/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/build/mp layer-checkout-2007-06-01/libavcodec' ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc -o mplayer mplayer.o m_property.o mp_fifo.o mp_msg.o mixer.o parser-mpcmd.o subopt-helper.o command.o asxparser.o codec-cfg.o cpudetect.o edl.o find_sub.o m_config.o m_option.o m_struct.o mpcommon.o parser-cfg.o playtree.o playtreeparser.o spudec.o sub_cc.o subreader.o vobsub.o unrarlib.o libvo/libvo.a libao2/libao2.a input/libinput.a libmpcodecs/libmpcodecs.a libaf/libaf.a libmpdemux/libmpdemux.a stream/stream.a libswscale/libswscale.a libvo/libosd.a libavformat/libavformat.a libavcodec/libavcodec.a libavutil/libavutil.a libpostproc/libpostproc.a mp3lib/libmp3.a liba52/liba52.a libmpeg2/libmpeg2.a tremor/libvorbisidec.a dvdread/libdvdread.a libdvdcss/libdvdcss.a osdep/libosdep.a -Wl,-z,noexecstack /home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cros s/arm-wrs-linux-gnueabi/lib/live/liveMedia/libliveMedia.a /home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cros s/arm-wrs-linux-gnueabi/lib/live/groupsock/libgroupsock.a /home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cros s/arm-wrs-linux-gnueabi/lib/live/UsageEnvironment/libUsageEnvironment.a /home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cros s/arm-wrs-linux-gnueabi/lib/live/BasicUsageEnvironment/libBasicUsageEnvi ronment.a -L/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/host-cr oss/arm-wrs-linux-gnueabi/lib/live -Wl,-rpath-link,/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platfo rm_prj/host-cross/arm-wrs-linux-gnueabi/lib -lncurses -lpng -lz -ljpeg -lasound -ldl -lpthread -lz -lstdc++ -lpthread -ldl -rdynamic -lm /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) libmpdemux/libmpdemux.a: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [mplayer] Error 1 make[1]: Leaving directory `/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/build/mp layer-checkout-2007-06-01' make: *** [mplayer.compile] Error 2 [dsodemo@WindRiverVM build]$ The path /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ is pointing to /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/arm-wrs-linux-g nueabi/bin (it's my native Linux toolchain), when actually it should point to (my arm toolchain) in: /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin. I checked linker flags (LD) in our toolchain configuration , and saw that everything is correct. I'm attached here several files, could you please check this files, and let me know if there is something not configured correctly. In current version (svn) , there was a dependency from mplayer on live555 package, this created a compilation problem. I saw a fix ( http://osdir.com/ml/video.mplayer.cygwin/2007-01/msg00036.html <http://osdir.com/ml/video.mplayer.cygwin/2007-01/msg00036.html> ) in Google, that suggested to remove the "--with-livelibdir=DIR" from configure, and add instead , --with-extraincdir=DIR & --with-extralibdir=DIR (both points to $(HOST_CROSS_LIB_DIR)/live , and remove "--enable-live" from Makefile (Makefile from workspace-nokia770_layer-dist-mplayer). I applied this changes and got this link error. Please let me know if some other info you might needed. P.S. Sorry if this gets reposted, I had previously attached my configure & configure.log but the message was too large. Thanks, Alex
On Mon, Jun 04, 2007 at 07:58:29PM -0700, Shapiro, Alex (OTTAWA) wrote:
I have a link error with my released version of mplayer package. At the end of compilation with (my arm toolchain) "ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc", the link start, and immediately failed with the following error:
-c -o armv4l/simple_idct_armv6.o armv4l/simple_idct_armv6.S armv4l/mpegvideo_armv5te.c: In function `dct_unquantize_h263_intra_armv5te': armv4l/mpegvideo_armv5te.c:161: warning: unused variable `i' armv4l/mpegvideo_armv5te.c: In function `dct_unquantize_h263_inter_armv5te': armv4l/mpegvideo_armv5te.c:190: warning: unused variable `i' armv4l/mpegvideo_armv5te.c:190: warning: unused variable `level'
Warnings fixed. No idea about the rest though. Diego
Hi! Shapiro, Alex (OTTAWA <Alex.Shapiro <at> windriver.com> writes:
I have a link error with my released version of mplayer package. At the end of compilation with (my arm toolchain) "ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc", the link start, and immediately failed with the following error:
I don't have a cross compiler on my linux system (and I couldn't find anything like "arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc" using Google), so I can't try myself, but I think a few answers may help: You mention "Makefile from workspace-nokia770_layer-dist-mplayer" - does this mean you use a patched Makefile, not the one provided by svn checkout? Does the compilation succeed if you use --disable-live (or don't provide the necessary include directory)? What configure line are you using? [...]
The path /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ is pointing to /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/arm-wrs-linux-g nueabi/bin (it's my native Linux toolchain), when actually it should point to (my arm toolchain) in: /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin.
If I understand that correctly, you suspect the linking stage not using the correct toolchain. Did you try to link manually by copying the line and changing the beginning to use the correct path? Carl Eugen
Hi Carl, Siarhei, First I'd like to mention that the svn version I'm working, downloaded 5 days ago.
I don't have a cross compiler on my linux system (and I couldn't find anything like "arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc" using Google), so I can't try myself, but I think a few answers may help:
The "arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc" is part of my ARM toolchain that I'm using for Linux projects for my NOKIA-770. Before the compilation starts, there is a stage that we unpacking, extracting mplayer-checkout-snapshot.tar.bz2, creating patch list (may 3 small patches that I created from rc1), patching, checking all configure flags against makefile ("Makefile from workspace-nokia770_layer-dist-mplayer") and generating config.mak & config.h files with following configuration:
What configure line are you using?
./configure --target=arm-linux --host-cc=gcc --enable-debug --disable-freetype --enable-network --with-extraincdir=/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Pla tform_prj/host-cross/arm-wrs-linux-gnueabi/lib/live --with-extralibdir=/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Pla tform_prj/host-cross/arm-wrs-linux-gnueabi/lib/live --disable-ftp --disable-faad-internal --disable-dvdread --disable-tv --disable-tv-v4l1 --disable-tv-v4l2 --enable-fbdev --disable-mencoder --disable-gui --disable-win32dll --disable-x11
You mention "Makefile from workspace-nokia770_layer-dist-mplayer" - does this mean you use a patched Makefile, not the one provided by svn checkout?
After the configuration stage finish, the compilation starts with the Makefile that provided by svn checkout. Are you suggesting that there are patches from svn that have to be applied as well?
Does the compilation succeed if you use --disable-live (or don't provide the necessary include directory)?
If I understand that correctly, you suspect the linking stage not using
I tried adding "--disable-live" and removing "--with-extraincdir=$(HOST_CROSS_LIB_DIR)/live" and "--with-extralibdir=$(HOST_CROSS_LIB_DIR)/live", the compilation and link are successfully finished! The link output (link-out.txt) is attached. the correct
toolchain. Did you try to link manually by copying the line and changing the beginning to use the correct path?
I checked if *.a files are compiled for ARM architecture (using 'readelf -h somefile.a') as suggested by Siarhei. It compiled for ARM architecture, see results is in attached readelf.txt file. With the correct toolchain: (no output = linkage succeed) [dsodemo@WindRiverVM build]$ arm-wrs-linux-gnueabi-armv5tel-glibc_small-ranlib ./mplayer-checkout-2007-06-01/libavcodec/libavcodec.a [dsodemo@WindRiverVM build]$ With incorrect toolchain: [dsodemo@WindRiverVM build]$ /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld ./mplayer-checkout-2007-06-01/libavcodec/libavcodec.a /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: warning: cannot find entry symbol _start; not setting start address [dsodemo@WindRiverVM build]$ Thanks, Alex -----Original Message----- From: mplayer-dev-eng-bounces@mplayerhq.hu [mailto:mplayer-dev-eng-bounces@mplayerhq.hu] On Behalf Of Carl Eugen Hoyos Sent: Tuesday, June 05, 2007 4:35 PM To: mplayer-dev-eng@mplayerhq.hu Subject: Re: [MPlayer-dev-eng] FW: Link error - Relocations in generic ELF(EM: 3) Hi! Shapiro, Alex (OTTAWA <Alex.Shapiro <at> windriver.com> writes:
I have a link error with my released version of mplayer package. At the end of compilation with (my arm toolchain) "ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc", the link start, and immediately failed with the following error:
I don't have a cross compiler on my linux system (and I couldn't find anything like "arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc" using Google), so I can't try myself, but I think a few answers may help: You mention "Makefile from workspace-nokia770_layer-dist-mplayer" - does this mean you use a patched Makefile, not the one provided by svn checkout? Does the compilation succeed if you use --disable-live (or don't provide the necessary include directory)? What configure line are you using? [...]
The path /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gc c/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ is pointing to /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/arm-wrs-linux -g nueabi/bin (it's my native Linux toolchain), when actually it should point to (my arm toolchain) in: /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin.
If I understand that correctly, you suspect the linking stage not using the correct toolchain. Did you try to link manually by copying the line and changing the beginning to use the correct path? Carl Eugen _______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
Hi Alex! Shapiro, Alex (OTTAWA <Alex.Shapiro <at> windriver.com> writes:
[dsodemo <at> WindRiverVM mplayer-checkout-2007-05-30]$ readelf -h .../mplayer-checkout-2007-06-01/libvo/libvo.a
Please try with libmpdemux.a containing demux_rtp.o and demux_rtp_codec.o Carl Eugen
Hi Carl, My libmpdemux.a Makefile has the following line: SRCS_COMMON-$(STREAMING_LIVE555) += demux_rtp.cpp demux_rtp_codec.cpp I tried with libmpdemux.a containing demux_rtp.o and demux_rtp_codec.o SRCS_COMMON = asfheader.c \ aviheader.c \ .... video.c \ demux_rtp.cpp \ demux_rtp_codec.cpp \ yuv4mpeg.c \ yuv4mpeg_ratio.c \ And removed the following line: #SRCS_COMMON-$(STREAMING_LIVE555) += demux_rtp.cpp demux_rtp_codec.cpp But the result is the same: emux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) libmpdemux/libmpdemux.a: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [mplayer] Error 1 make[1]: Leaving directory `/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/build/mp layer-checkout-2007-06-01' make: *** [mplayer.compile] Error 2 [dsodemo@WindRiverVM build]$ Alex -----Original Message----- From: mplayer-dev-eng-bounces@mplayerhq.hu [mailto:mplayer-dev-eng-bounces@mplayerhq.hu] On Behalf Of Carl Eugen Hoyos Sent: Wednesday, June 06, 2007 5:33 AM To: mplayer-dev-eng@mplayerhq.hu Subject: Re: [MPlayer-dev-eng] FW: Link error - Relocations in genericELF(EM: 3) Hi Alex! Shapiro, Alex (OTTAWA <Alex.Shapiro <at> windriver.com> writes:
[dsodemo <at> WindRiverVM mplayer-checkout-2007-05-30]$ readelf -h .../mplayer-checkout-2007-06-01/libvo/libvo.a
Please try with libmpdemux.a containing demux_rtp.o and demux_rtp_codec.o Carl Eugen _______________________________________________ MPlayer-dev-eng mailing list MPlayer-dev-eng@mplayerhq.hu http://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
On Wednesday 06 June 2007 17:58, Shapiro, Alex (OTTAWA) wrote:
My libmpdemux.a Makefile has the following line: SRCS_COMMON-$(STREAMING_LIVE555) += demux_rtp.cpp demux_rtp_codec.cpp
Just did a test with crosscompiling mplayer again and figured out what's the problem. Configure just does not have support for c++crosscompiler and host g++ is used to compile *.cpp files (producing object files in host system format). Crosscompiling after configuring with '--disable-live' is fine. But if you want to enable live support, you need to set CXX variable for gnu makefile properly (it is used in default implicit rules for compiling files having .cpp extension). Some kind of patch is attached (not sure if it can be considered clean as it replaces invocation of 'g++' with 'gcc', but it fixes this particular crosscompilation problem). A better fix would be probably to add some extra '--cxx=' option to configure, but I'm not good with shell scripts programming. Also here are some instructions for those who use gentoo linux and would like to reproduce/test crosscompilation of all this c++ stuff for ARM (if anybody is interested of course): 1. Get the crosscompiler installed. Run # emerge crossdev # crossdev --target arm-softfloat-linux-gnueabi 2. Compile live with ARM crosscompiler. Download the sources of live (http://live555.com/liveMedia/), edit 'config.armlinux' file and change the following variables to: CROSS_COMPILE= arm-softfloat-linux-gnueabi- CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ LINK = $(CROSS_COMPILE)g++ -o After editing is done, just run # ./genMakefiles armlinux # make 3. Checkout mplayer trunk from SVN, configure and compile it # CFLAGS="-O2 -mcpu=arm926ej-s" ./configure --enable-cross-compile --cc=arm-softfloat-linux-gnueabi-gcc --as=arm-softfloat-linux-gnueabi-as --target=arm-linux --host-cc=gcc --with-extraincdir=<full_path_to_live_directory> --with-extralibdir=<full_path_to_live_directory> # make That's all <offtopic> By the way, Alex, are you using/building some kind of alternative non-Nokia firmware for Nokia 770? </offtopic>
Siarhei,
Configure just does not have support for c++crosscompiler and host g++ is used to compile *.cpp files (producing object files in host g++ system format).
Thanks ! Very nice, the solution is to add the "CXX = $_cc" to configure. Now mplayer Linked, thanks! --
<offtopic> By the way, Alex, are you using/building some kind of alternative non-Nokia firmware for Nokia 770? </offtopic> I'm using the original Nokia firmware, but with Qtopia-opensource-4.2.1 user interface (instead of Nokia 770 Internet Tablet).
Alex -----Original Message----- From: Siarhei Siamashka [mailto:siarhei.siamashka@gmail.com] Sent: Wednesday, June 06, 2007 5:34 PM To: mplayer-dev-eng@mplayerhq.hu Cc: Shapiro, Alex (OTTAWA) Subject: Re: [MPlayer-dev-eng] FW: Link error - Relocations in genericELF(EM: 3) On Wednesday 06 June 2007 17:58, Shapiro, Alex (OTTAWA) wrote:
My libmpdemux.a Makefile has the following line: SRCS_COMMON-$(STREAMING_LIVE555) += demux_rtp.cpp demux_rtp_codec.cpp
Just did a test with crosscompiling mplayer again and figured out what's the problem. Configure just does not have support for c++crosscompiler and host g++ is used to compile *.cpp files (producing object files in host g++ system format). Crosscompiling after configuring with '--disable-live' is fine. But if you want to enable live support, you need to set CXX variable for gnu makefile properly (it is used in default implicit rules for compiling files having .cpp extension). Some kind of patch is attached (not sure if it can be considered clean as it replaces invocation of 'g++' with 'gcc', but it fixes this particular crosscompilation problem). A better fix would be probably to add some extra '--cxx=' option to configure, but I'm not good with shell scripts programming. Also here are some instructions for those who use gentoo linux and would like to reproduce/test crosscompilation of all this c++ stuff for ARM (if anybody is interested of course): 1. Get the crosscompiler installed. Run # emerge crossdev # crossdev --target arm-softfloat-linux-gnueabi 2. Compile live with ARM crosscompiler. Download the sources of live (http://live555.com/liveMedia/), edit 'config.armlinux' file and change the following variables to: CROSS_COMPILE= arm-softfloat-linux-gnueabi- CPLUSPLUS_COMPILER = $(CROSS_COMPILE)g++ LINK = $(CROSS_COMPILE)g++ -o After editing is done, just run # ./genMakefiles armlinux # make 3. Checkout mplayer trunk from SVN, configure and compile it # CFLAGS="-O2 -mcpu=arm926ej-s" ./configure --enable-cross-compile --cc=arm-softfloat-linux-gnueabi-gcc --as=arm-softfloat-linux-gnueabi-as --target=arm-linux --host-cc=gcc --with-extraincdir=<full_path_to_live_directory> --with-extralibdir=<full_path_to_live_directory> # make That's all <offtopic> By the way, Alex, are you using/building some kind of alternative non-Nokia firmware for Nokia 770? </offtopic>
On Tuesday 05 June 2007 05:58, Shapiro, Alex (OTTAWA) wrote:
I have a link error with my released version of mplayer package. At the end of compilation with (my arm toolchain) "ccache arm-wrs-linux-gnueabi-armv5tel-glibc_small-gcc", the link start, and immediately failed with the following error:
[...]
/home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) /home/dsodemo/WindRiver/gnu/3.4.4-wrlinux-1.5/x86-linux2/bin/../lib/gcc/ arm-wrs-linux-gnueabi/3.4.4/../../../../arm-wrs-linux-gnueabi/bin/ld: libmpdemux/libmpdemux.a(demux_rtp.o): Relocations in generic ELF (EM: 3) libmpdemux/libmpdemux.a: could not read symbols: File in wrong format collect2: ld returned 1 exit status make[1]: *** [mplayer] Error 1 make[1]: Leaving directory `/home/dsodemo/WindRiver/workspace/Nokia-770-LX1.5-Platform_prj/build/mp layer-checkout-2007-06-01' make: *** [mplayer.compile] Error 2 [dsodemo@WindRiverVM build]$
Can you check if your *.a files are compiled for ARM architecture (using 'readelf -h somefile.a'). Maybe you tried to compile the same sources for x86 before and have some stale *.a files remaining? Anyway, I would suggest you to try a fresh mplayer SVN checkout first. I did not have any troubles building it with ARM crosscompiler a few weeks ago. Also a patch with your local modifications (are so many changes really needed?) would be much easier to analyze instead of a handful of files you have attached.
participants (4)
-
Carl Eugen Hoyos -
Diego Biurrun -
Shapiro, Alex (OTTAWA) -
Siarhei Siamashka