[FFmpeg-devel] [PATCH] Add SLIB_UNINSTALL_EXTRA_CMD to build system.

Ramiro Polla ramiro
Sun Oct 14 04:08:45 CEST 2007


V?ctor Paesa wrote:
> Hi,
> 
> Ramiro Polla said:
>> Dave Yeo wrote:
>>> On 10/08/07 06:28 am, Diego Biurrun wrote:
>>>> On Sun, Oct 07, 2007 at 10:16:26PM -0700, Dave Yeo wrote:
>>>>> Diego Biurrun wrote:
>>>>>> On Sat, Sep 15, 2007 at 09:38:39PM -0700, Dave Yeo wrote:
>>>>>>> Diego Biurrun wrote:
>>> ...
>>>>>>> Note also that we (and also Windows?) need an extra uninstall
>>> command as
>>>>>>> well in a future patch.
>>>>>> Patches welcome.
>>>>> Yes, well one patch at a time :)
>>>> Let's see the patch right away.  If it is needed on Windows I'll
>>> likely apply it right away.
>>> ...
>>> I've attached a quick untested patch for mingw, should uninstall the
>>> same lib installed by SLIB_INSTALL_EXTRA_CMD. Though I am somewhat
>>> confused as I thought the SLIB_INSTALL_EXTRA_CMD was installing an
>>> import lib yet it seems to be installing the DLL with a .lib suffix
>>> instead of .dll.
>> This is an MSVC import lib.
>>> Also it looks like gcc is creating an import lib with the suffix of
>>> .dll.a which is not installed.
>>> Kept to the same style as used in the rest of mingw section of
>>> configure. Also cygwin has similar behaviour, looks like it creates an
>>> import lib  but never installs it.
> That's a bug, the .dll.a should be installed. It is also a proof that I
> don't link to libav* anything besides of ffmpeg ;-)

Some .dll.a should be installed in libdir. But the static ones created 
with --out-implib aren't the best ones and [1] explains why. IMO the 
patch I sent should still be applied. Your method is better (linking to 
the .dll), but it has some issues. See below.

>>> Do both cygwin and mingw allow directly linking against DLLs and if so
>>>  what is the point of creating import libs and in mingw case
>>> installing  the DLL with a lib suffix?
>> Reading [1], it seems OK to remove them. I'll apply attached patch
>> tomorrow unless someone has a good reason to object.
> Besides that, there should be a link, as suggested in [1]:
> 
>           bin/
>           	cygxxx-5.dll
>           lib/
>           	libxxx.dll.a -> ../bin/cygxxx-5.dll
> 
>> [1] http://sourceware.org/binutils/docs-2.18/ld/WIN32.html
> Something alike to:
> SLIB_INSTALL_EXTRA_CMD=\
> '$(LN_) $(SHLIBDIR)/$(SLIBNAME_WITH_VERSION)$(SLIBSUF)
> "$(LIBDIR)/lib$(NAME).dll.a"'

Correct for Windows systems would be:
/bin
     libavutil-49.dll
     libavcodec-51.dll
     libavformat-51.dll
/lib
     libavutil.dll.a
     libavutil-49.dll.a
     libavutil-49.5.0.dll.a
     libavcodec.dll.a
     libavcodec-51.dll.a
     libavcodec-51.45.0.dll.a
     libavformat.dll.a
     libavformat-51.dll.a
     libavformat-51.14.0.dll.a
     + MSVC import libs

For MinGW that means one more copy of the dlls, since we don't have 
symlinks.

The build system maintainers have made it clear through rejecting and 
specially ignoring patches that they don't want to make these extra 
commands much longer than they already are. They also don't want them to 
be clean in a proper Makefile manner.

Good luck,
Ramiro Polla




More information about the ffmpeg-devel mailing list