[PATCH][Ffmpeg-devel] Compilation Issue - Policy decision needed!

Michel Bardiaux mbardiaux
Tue Oct 4 17:18:13 CEST 2005


Michel Bardiaux wrote:
> Alexander Strasser wrote:
> 
>> Hi,
>>
>> Michel Bardiaux wrote:
>>
>>> Alexander Strasser wrote:
>>>
>>>> Oh, sorry. Here is an updated patch.
>>>
>>>
>>> Here is what I get for a shared-lib compile on mingw:
>>
>>
>> [...]
>>
>>> 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?
>>
>>
>>
>>   Oh, i didn't know it is such a `new' linker option. OK, then
>> i guess there is no way to make it work for every one without
>> doing some changes to the code.
>>
>> [...]
>>
>>> 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?
>>
>>
>>
>>   I don't know when it was exactly introduced, but i guess somewhen
>> at end of 2002 and beginning of 2003 (not sure tho).
>>   I am still a little bit confused of the issue as it requires special
>> options for GNU ld but works (as it seems) flawlessly with m$ linker.
>> What i have read would rather imply the opposite situation if i
>> understood correctly.
>>
>>   Another question is if we should apply this for now to fix the
>> situation for people with recent linker versions as the shared build
>> won't work correctly for the current version anyway?
> 
> 
> I dont understand at all what you mean. Let me rephrase the questions.
> 
> (1) What version of gcc do you use?
> 
> (2) Why did you introduce --enable-runtime-pseudo-reloc? What fails if 
> that option is not present?

OK, I have 'patched the patch' to remove --enable-runtime-pseudo-reloc 
and now I get an error:

Info: resolving _ff_log2_tab by linking to __imp__ff_log2_tab (auto-import)
Info: resolving _ff_sqrt_tab by linking to __imp__ff_sqrt_tab (auto-import)
vp3.o: In function `theora_decode_tables':
p:/people/michel/internet/ffmpeg-mingw-org/libavcodec/vp3.c:2777: 
variable 'ff_log2_tab' can't be auto-imported. Please read the 
documentation for ld's --enable-auto-import for details.
p:/people/michel/internet/ffmpeg-mingw-org/libavcodec/vp3.c:2791: 
variable 'ff_log2_tab' can't be auto-imported. Please read the 
documentation for ld's --enable-auto-import for details.
Creating library file: libavcodec.dll.a
make[1]: *** [avcodec.dll] Error 1
make[1]: Leaving directory 
`/p/people/michel/internet/ffmpeg-mingw-org/libavcodec'
make: *** [lib] Error 2

I'm pretty sure this did not happen when I tried mingw a few weeks ago, 
which is why we didnt understand each other. After reading man ld and 
googling for --enable-runtime-pseudo-reloc it is now clear that the 
latter is intended to fix exactly that king of problem.

The question is now rather simple: which minimal version of the mingw 
gcc will be mandated for ffmpeg? If we want to support gcc 3.2, then 
some changes to the code will be necessary, as described under 
--enable-auto-import in man ld.

> 
>>
>>   Maybe the best fix for all is to use the link directly-to-dll
>> feature you demonstrated in your previous mails.
> 
> 
> Uh? What do you mean? I dont think VC++ can link to a DLL without a .def 
> or a .lib.
> 
>>  But it will be
>> a bit more involved to implement it properly.
>>
>>   Alex (beastd)
>>
> 
> 
> 


-- 
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