[FFmpeg-trac] #1929(build system:new): ./configure --disable-w32threads doesn't check for presence of pthreads
FFmpeg
trac at avcodec.org
Fri Dec 7 20:55:14 CET 2012
#1929: ./configure --disable-w32threads doesn't check for presence of pthreads
-------------------------------------+-------------------------------------
Reporter: rogerdpack | Owner:
Type: defect | Status: new
Priority: normal | Component: build
Version: unspecified | system
Keywords: win | Resolution:
Blocking: | Blocked By:
Analyzed by developer: 0 | Reproduced by developer: 0
-------------------------------------+-------------------------------------
Comment (by rogerdpack):
Ok I think I may have pasted a poor config.log file initially, my fault,
and my apologies.
The specific issue I will address is if there is "no" libpthread.a on the
system. I'll focus for that now (the headers may be there, however). So
here is the output, starting over:
So, after removing libpthread.a, and then configuring and building ffmpeg
with --disable-w32threads, I get this error at link time:
{{{
ffmpeg_git$ make V=1
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -Llibavcodec
-Llibavdevice -Llibavfilter -Llibavformat -Llibavresample -Llibavutil
-Llibpostproc -Llibswscale -Llibswresample -Wl,--as-needed -Wl,--warn-
common -Wl,-rpath-
link=libpostproc:libswresample:libswscale:libavfilter:libavdevice:libavformat:libavcodec:libavutil:libavresample
-o ffmpeg_g.exe ffmpeg_opt.o ffmpeg_filter.o ffmpeg.o cmdutils.o
-lavdevice -lavfilter -lavformat -lavcodec -lpostproc -lswresample
-lswscale -lavutil -lavicap32 -lpsapi -lole32 -lstrmiids -luuid -ldl -ldl
-lws2_32 -L/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lmingw32 -lSDLmain
-lSDL -lm -luser32 -lgdi32 -lwinmm -ldxguid -lnettle -lhogweed -lgmp
-lxvidcore -lxavs -lvpx -lvpx -lvorbisenc -lvorbis -logg -lvo-amrwbenc
-lvo-aacenc -lutvideo -lstdc++ -ltheoraenc -ltheoradec -logg -lspeex
-L/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lrtmp -lwinmm -lz
-lgnutls -lnettle -lhogweed -lgmp -lcrypt32 -lws2_32 -L/home/rdp/dev
/ffmpeg-windows-build-helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib
-lopus -lopenjpeg -lopencore-amrwb -lopencore-amrnb -lmp3lame -lgsm
-L/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lfreetype
-L/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lass -lm -lfontconfig
-lexpat -lfribidi -lfreetype -L/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lgnutls -lnettle
-lhogweed -lgmp -lcrypt32 -lws2_32 -L/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib -lfontconfig
-lfreetype -lexpat -lavifil32 -lm -lbz2 -lz -lpsapi -ladvapi32 -lshell32
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/i686-w64-mingw32/lib/libvpx.a(systemdependent.c.o):(.text+0x21):
undefined reference to `pthread_once'
collect2: error: ld returned 1 exit status
make: *** [ffmpeg_g.exe] Error 1
}}}
The relevant part of config.log is this
{{{
check_func pthread_create
check_ld cc
check_cc
BEGIN /tmp/ffconf.n0EK4a2U.c
1 extern int pthread_create();
2 int main(void){ pthread_create(); }
END /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__
-DPTW32_STATIC_LIB -std=c99 -fomit-frame-pointer -c -o
/tmp/ffconf.OzeIGWH5.o /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -Wl,--as-needed -o
/tmp/ffconf.1rQfly6Z.exe /tmp/ffconf.OzeIGWH5.o -lbz2 -lz -lpsapi
-ladvapi32 -lshell32
/tmp/ffconf.OzeIGWH5.o:ffconf.n0EK4a2U.c:(.text+0xc): undefined reference
to `pthread_create'
collect2: error: ld returned 1 exit status
check_func pthread_create -pthread
check_ld cc -pthread
check_cc -pthread
BEGIN /tmp/ffconf.n0EK4a2U.c
1 extern int pthread_create();
2 int main(void){ pthread_create(); }
END /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__
-DPTW32_STATIC_LIB -std=c99 -fomit-frame-pointer -pthread -c -o
/tmp/ffconf.OzeIGWH5.o /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -Wl,--as-needed
-pthread -o /tmp/ffconf.1rQfly6Z.exe /tmp/ffconf.OzeIGWH5.o -lbz2 -lz
-lpsapi -ladvapi32 -lshell32
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld:
cannot find -lpthread
collect2: error: ld returned 1 exit status
check_func pthread_create -pthreads
check_ld cc -pthreads
check_cc -pthreads
BEGIN /tmp/ffconf.n0EK4a2U.c
1 extern int pthread_create();
2 int main(void){ pthread_create(); }
END /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__
-DPTW32_STATIC_LIB -std=c99 -fomit-frame-pointer -pthreads -c -o
/tmp/ffconf.OzeIGWH5.o /tmp/ffconf.n0EK4a2U.c
i686-w64-mingw32-gcc: error: unrecognized command line option '-pthreads'
check_func pthread_create -lpthreadGC2
check_ld cc -lpthreadGC2
check_cc
BEGIN /tmp/ffconf.n0EK4a2U.c
1 extern int pthread_create();
2 int main(void){ pthread_create(); }
END /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__
-DPTW32_STATIC_LIB -std=c99 -fomit-frame-pointer -c -o
/tmp/ffconf.OzeIGWH5.o /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -Wl,--as-needed -o
/tmp/ffconf.1rQfly6Z.exe /tmp/ffconf.OzeIGWH5.o -lpthreadGC2 -lbz2 -lz
-lpsapi -ladvapi32 -lshell32
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld:
cannot find -lpthreadGC2
collect2: error: ld returned 1 exit status
check_lib pthread.h pthread_create -lpthread
check_header pthread.h
check_cpp
BEGIN /tmp/ffconf.n0EK4a2U.c
1 #include <pthread.h>
2 int x;
END /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__
-DPTW32_STATIC_LIB -std=c99 -fomit-frame-pointer -E -o
/tmp/ffconf.OzeIGWH5.o /tmp/ffconf.n0EK4a2U.c
check_func pthread_create -lpthread
check_ld cc -lpthread
check_cc
BEGIN /tmp/ffconf.n0EK4a2U.c
1 extern int pthread_create();
2 int main(void){ pthread_create(); }
END /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -D_ISOC99_SOURCE
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -U__STRICT_ANSI__
-DPTW32_STATIC_LIB -std=c99 -fomit-frame-pointer -c -o
/tmp/ffconf.OzeIGWH5.o /tmp/ffconf.n0EK4a2U.c
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/bin/i686-w64-mingw32-gcc -Wl,--as-needed -o
/tmp/ffconf.1rQfly6Z.exe /tmp/ffconf.OzeIGWH5.o -lpthread -lbz2 -lz
-lpsapi -ladvapi32 -lshell32
/home/rdp/dev/ffmpeg-windows-build-
helpers/sandbox/mingw-w64-i686/lib/gcc/i686-w64-mingw32/4.7.2/../../../../i686-w64-mingw32/bin/ld:
cannot find -lpthread
collect2: error: ld returned 1 exit status
check_lib math.h sin -lm
...
}}}
I think I copied and pasted it in there ok. It appears to find the file
"pthread.h" but the linking tests all fail, but I would be happy to be
proven wrong.
Thanks!
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1929#comment:10>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list