[Libav-user] dependency on external libs on Mac
YIRAN LI
mrfun.china at gmail.com
Sat May 10 04:35:00 CEST 2014
Hi
I'm building ffmpeg-2.2.2 with libspeex on Mac.
Libspeex is built using ./configure --enable-shared
--prefix=/Users/liyiran/test/libs
Ffmpeg is built using ./configure --enable-shared --disable-static
--extra-cflags="-I/Users/liyiran/test/libs/include"
--extra-ldflags="-L/Users/liyiran/test/libs/lib" --enable-libspeex
But the problem is, every dylib generated depends on libspeex (When I built
on Windows, only libavcodec.dll depends on libspeex instead).
For example
libswresample.0.dylib:
/usr/local/lib/libswresample.0.dylib (compatibility version 0.0.0, current
version 0.18.100)
/usr/local/lib/libavutil.52.dylib (compatibility version 52.0.0, current
version 52.66.100)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
(compatibility version 150.0.0, current version 855.14.0)
/System/Library/Frameworks/VideoDecodeAcceleration.framework/Versions/A/VideoDecodeAcceleration
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore
(compatibility version 1.2.0, current version 1.8.0)
/usr/lib/libiconv.2.dylib (compatibility version 7.0.0, current version
7.0.0)
/Users/liyiran/test/libs/lib/libspeex.1.dylib (compatibility version 7.0.0,
current version 7.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1197.1.1)
/usr/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version
1.0.5)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
Is there any way to configure so that each component only links with
libspeex if it really uses it? I tried --extra-ldflags="-Wl,--as-needed"
but met an error:
gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.
And I found an article here saying that "-Wl,-as-needed has bug when using
in auto tools project".
https://sigquit.wordpress.com/2011/02/16/why-asneeded-doesnt-work-as-expected-for-your-libraries-on-your-autotools-project/
I
know ffmpeg is not an auto tool project, but is it possible to have the
similar problem?
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20140510/62f59697/attachment.html>
More information about the Libav-user
mailing list