[FFmpeg-user] Static build with libschroedinger fails

Mark Himsley mark at mdsh.com
Thu Jan 5 17:43:00 CET 2012


Hi there,

Current git head.

./configure --disable-shared --enable-static --extra-version=static 
--extra-cflags='--static -I/usr/local/include' --extra-libs='-static 
-L/usr/local/lib' --prefix=/usr/local --disable-ffplay --enable-pthreads 
--enable-libschroedinger

fails, with this as the error:

check_pkg_config schroedinger-1.0 schroedinger/schro.h schro_init
check_func_headers schroedinger/schro.h schro_init 
-I/usr/local/include/schroedinger-1.0 -I/usr/local/incl
ude/orc-0.4 -L/usr/local/lib -lschroedinger-1.0
check_ld cc -I/usr/local/include/schroedinger-1.0 
-I/usr/local/include/orc-0.4 -L/usr/local/lib -lschroedi
nger-1.0
check_cc -I/usr/local/include/schroedinger-1.0 
-I/usr/local/include/orc-0.4 -L/usr/local/lib
BEGIN /tmp/ffconf.Z2L2SwZw.c
     1   #include <schroedinger/schro.h>
     2   long check_schro_init(void) { return (long) schro_init; }
     3   int main(void) { return 0; }
END /tmp/ffconf.Z2L2SwZw.c
gcc -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=6
00 --static -I/usr/local/include -std=c99 -fomit-frame-pointer -pthread 
-I/usr/local/include/schroedinger-
1.0 -I/usr/local/include/orc-0.4 -L/usr/local/lib -c -o 
/tmp/ffconf.Ch8YJ78n.o /tmp/ffconf.Z2L2SwZw.c
gcc -Wl,--as-needed -I/usr/local/include/schroedinger-1.0 
-I/usr/local/include/orc-0.4 -L/usr/local/lib -o
  /tmp/ffconf.BQq8w1EU /tmp/ffconf.Ch8YJ78n.o -lschroedinger-1.0 -lm 
-pthread -lbz2 -lz -L/usr/local/lib
/usr/local/lib/libschroedinger-1.0.a(libschroedinger_1.0_la-schro.o): In 
function `schro_init':
[...]
plus hundreds of other errors.


I only have static libs built for orc and schroedinger, so at line 3123 
in configure the call to `require_pkg_config()` which then calls 
`check_pkg_config()` which eventually calls `pkg-config --libs 
schroedinger-1.0` but does not include --static, which is needed for a 
static build.

With the attached patch I can configure and make ffmpeg as a static. But 
I'm sure that is not a good idea, really. I hoped I was missing a 
configure switch, but I haven't seen anything.


Now, perhaps I'm wrong in trying to make a static, as this warning suggests:

LD	ffmpeg_g
libavformat/libavformat.a(rtsp.o): In function `get_sockaddr':
/home/himslm01/src/ffmpeg/libavformat/rtsp.c:160: warning: Using 
'getaddrinfo' in statically linked applications requires at runtime the 
shared libraries from the glibc version used for linking

Perhaps I should try to gather all the libs I include and set 
LD_LIBRARY_PATH - but that's a lot more of a faff than making a static 
executable.


I hope I can get some feedback from the good people on this list.

-- 
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-configure-static-001.diff
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20120105/5745337e/attachment.bin>


More information about the ffmpeg-user mailing list