[PATCH][Ffmpeg-devel] Compilation Issue

Michel Bardiaux mbardiaux
Tue Sep 27 11:56:49 CEST 2005


Alexander Strasser wrote:
> Hi,
> 
> Michel Bardiaux wrote:
> 
>>Alexander Strasser wrote:
> 
> [...]
> 
>>> I tried to work out a solution today. The attached patch is what
>>>I have so far, it may not be the best solution but i think it is 
>>>better than before. Please test (on all platforms).
>>>
>>>[...]
>>
>>Sorry, the patch is rejected when applied to CVS as of 2005-09-26 
>>10:13GMT. Please redo the diff against a current CVS. TIA.
> 
> 
>   Oh, sorry. Here is an updated patch.
> 
>   Alex (beastd)

Here is what I get for a shared-lib compile on mingw:

michel at PCDEVEL ~/internet/ffmpeg-mingw-org
$  ./configure  --enable-shared --enable-memalign-hack --disable-strip
install prefix   /c/Program Files/FFmpeg
source path      /p/people/michel/internet/ffmpeg-mingw-org
C compiler       gcc
make             make
CPU              x86 (generic)
big-endian       no
inttypes.h       yes
broken inttypes.h no
MMX enabled      yes
Vector Builtins  yes
gprof enabled    no
zlib enabled     no
libgsm enabled   no
mp3lame enabled  no
libogg enabled   no
Vorbis enabled   no
Theora enabled   no
FAAD enabled     no
faadbin enabled  no
FAAC enabled     no
XviD enabled     no
x264 enabled     no
a52 support      no
a52 dlopened     no
DTS support      no
pp support       no
debug symbols    yes
strip symbols    no
optimize         yes
shared pp        no
video hooking    no
SDL support      no
Sun medialib support no
pthreads support no
AMR-NB float support no
AMR-NB fixed support no
AMR-WB float support no
AMR-WB IF2 support no
network support      no
License: LGPL
Creating config.mak and config.h...

michel at PCDEVEL ~/internet/ffmpeg-mingw-org
$ make
make -C libavutil all
make[1]: Entering directory 
`/p/people/michel/internet/ffmpeg-mingw-org/libavutil'
gcc -O3 -g -Wall -Wno-switch  -DHAVE_AV_CONFIG_H -I.. 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -c -o 
mathematics.o         mathematics.c
gcc -O3 -g -Wall -Wno-switch  -DHAVE_AV_CONFIG_H -I.. 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -c -o 
integer.o inte        ger.c
gcc -O3 -g -Wall -Wno-switch  -DHAVE_AV_CONFIG_H -I.. 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -c -o 
rational.o rat        ional.c
gcc -O3 -g -Wall -Wno-switch  -DHAVE_AV_CONFIG_H -I.. 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE  -c -o 
intfloat_readw        rite.o intfloat_readwrite.c
rm -f libavutil.a
ar rc libavutil.a mathematics.o integer.o rational.o intfloat_readwrite.o
ranlib libavutil.a
gcc -shared 
-Wl,--enable-runtime-pseudo-reloc,--output-def,avutil.def,--out-implib,libavutil.dll.a 
-o avutil.dll mathematics.o integ        er.o rational.o 
intfloat_readwrite.o  -lm
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe: 
unrecognized option '--enable-runtime-pseudo-reloc'
c:\mingw\bin\..\lib\gcc-lib\mingw32\3.2\..\..\..\..\mingw32\bin\ld.exe: 
use the --help option for usage information
make[1]: *** [avutil.dll] Error 1
make[1]: Leaving directory 
`/p/people/michel/internet/ffmpeg-mingw-org/libavutil'
make: *** [lib] Error 2

$ gcc --version
gcc.exe (GCC) 3.2 (mingw special 20020817-1)

Seems your patch depends on a very recent feature of gcc. What is it 
supposed to do?

The static-only build on mingw and linux works OK. So does a vanilla 
shared lib build on linux (gcc 2.95.4). The sizes for the latter look OK:

la ffmpeg */*.so
-rwxrwx---    1 michel   pkdev       68744 Sep 27 11:39 ffmpeg
-rwxrwx---    1 michel   pkdev     7088262 Sep 27 11:38 
libavcodec/libavcodec.so
-rwxrwx---    1 michel   pkdev     1368270 Sep 27 11:39 
libavformat/libavformat.so
-rwxrwx---    1 michel   pkdev       46296 Sep 27 11:37 
libavutil/libavutil.so

as do the dependencies:

ldd ffmpeg
         libavformat.so => 
/pktbes02/dsk3/people/michel/binl/libavformat.so (0x40014000)
         libavcodec.so => 
/pktbes02/dsk3/people/michel/binl/libavcodec.so (0x4007f000)
         libavutil.so => not found

(This looks wrong but actually fixes itself after installation)

Short version: it all hangs on --enable-runtime-pseudo-reloc. A little 
google shows it is strongly recommended for all dll builds using mingw, 
so I suppose we'll want to keep it even if not absolutely necessary. So, 
what is the minimum version of mingw/gcc/msys I need?

-- 
Michel Bardiaux
R&D Director
T +32 [0] 2 790 29 41
F +32 [0] 2 790 29 02
E mailto:mbardiaux at mediaxim.be

Mediaxim NV/SA
Vorstlaan 191 Boulevard du Souverain
Brussel 1160 Bruxelles
http://www.mediaxim.com/





More information about the ffmpeg-devel mailing list