Date: Fri, 20 Apr 2007 11:19:19 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: multimedia@FreeBSD.org Cc: Kris Kennaway <kris@obsecurity.org> Subject: way to fix ffmpeg-devel build on amd64 [Was: amd64: cc -dumpmachine [ffmpeg]] Message-ID: <46287787.8080605@icyb.net.ua>
next in thread | raw e-mail | index | archive | help
I've already sent this to ahze@, but I thought I'd forward this here since multimedia@ is registered as a maintainer of the port. P.S. Kris is CC-ed just in case. -------- Original Message -------- Subject: Re: amd64: cc -dumpmachine [ffmpeg] Date: Thu, 19 Apr 2007 20:37:57 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: Michael Johnson <ahze@ahze.net> References: <4614BD4B.5010109@icyb.net.ua> <b2203fed0704050409w52840391g676ebfe1d39ef7e7@mail.gmail.com> on 05/04/2007 14:09 Michael Johnson said the following: > yeah, I noticed that. ffmpeg doesn't build on amd64 right now as > ARCH_X86 or ARCH_X86_64. and ffmpeg-devel tries to compile > amd64 as ARCH_X86 right now. Michael, I've noticed that ffmpeg-devel has been updated recently, both upstream and port-wise, but it still doesn't compile on amd64. I've done some googling and found the following post: http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2007-April/026482.html To be honest, I've understood less than 10% of the discussion in that thread about relocations, registers and so on. Not sure what the patch at the end of the post actually does (maybe disables assembly completely?), but it allowed compilation to proceed further. Still port build failed at a later step: cc -shared -Wl,-soname,libavcodec.so.1 -Wl,--warn-common -L/usr/local/lib -fPIC -rdynamic -export-dynamic -Wl,-rpath-link,"/usr/ports/multimedia/ffmpeg-devel/work/ffmpeg-2007-04-18"/libavcodec -Wl,-rpath-link,"/usr/ports/multimedia/ffmpeg-devel/work/ffmpeg-2007-04-18"/libavformat -Wl,-rpath-link,"/usr/ports/multimedia/ffmpeg-devel/work/ffmpeg-2007-04-18"/libavutil -o libavcodec.so.1 bitstream.o ................... -L"/usr/ports/multimedia/ffmpeg-devel/work/ffmpeg-2007-04-18"/libavutil -lavutil -L/usr/local/lib -pthread -lm -lz -la52 -ldts -lm -lgsm -lmp3lame -lm -lvorbis -lvorbisenc -logg -logg -lxvidcore -lx264 -lfaac -lfaad /usr/bin/ld: /usr/local/lib/libdts.a(parse.o): relocation R_X86_64_32S can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libdts.a: could not read symbols: Bad value gmake[1]: *** [libavcodec.so.1] Error 1 gmake[1]: Leaving directory `/usr/ports/multimedia/ffmpeg-devel/work/ffmpeg-2007-04-18/libavcodec' gmake: *** [lib] Error 2 *** Error code 2 Stop in /usr/ports/multimedia/ffmpeg-devel. It seems that on amd64 multimedia/libdts goes through extra step to specify that dependents should link with -ldts_pic. I am not sure why ffmeg-devel didn't do that, but after I manually changed config.mak the build was able to complete successfully! Hope this is of any help. -- Andriy Gapon -- Andriy Gapon
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?46287787.8080605>