Page 1 of 1

Compilation error when compile libffmpeg

Posted: 29 Sep 2007 19:39
by loicb54
Hello,
I have a problem when i want to compile VLC 0.9 with ffmpeg

Code: Select all

/usr/local/lib/libavformat.a(rtsp.o): In function `rtsp_parse_line': /home/Loic/ffmpeg-trunk/libavformat/rtsp.c:665: undefined reference to `_ntohl@4 ' /usr/local/lib/libavformat.a(rtsp.o): In function `rtsp_read_header': /home/Loic/ffmpeg-trunk/libavformat/rtsp.c:1026: undefined reference to `_htonl@ 4' /home/Loic/ffmpeg-trunk/libavformat/rtsp.c:1027: undefined reference to `_inet_n toa@4' /usr/local/lib/libavformat.a(rtsp.o): In function `rtsp_read_packet': /home/Loic/ffmpeg-trunk/libavformat/rtsp.c:1149: undefined reference to `_select @20' /home/Loic/ffmpeg-trunk/libavformat/rtsp.c:1154: undefined reference to `___WSAF DIsSet@8' /usr/local/lib/libavformat.a(rtsp.o): In function `sdp_read_header': /home/Loic/ffmpeg-trunk/libavformat/rtsp.c:1371: undefined reference to `_inet_n toa@4' /usr/local/lib/libavformat.a(rtp.o): In function `rtp_parse_open': /home/Loic/ffmpeg-trunk/libavformat/rtp.c:472: undefined reference to `_gethostn ame@8' /usr/local/lib/libavformat.a(rtpproto.o): In function `rtp_read': /home/Loic/ffmpeg-trunk/libavformat/rtpproto.c:198: undefined reference to `_sel ect@20' /home/Loic/ffmpeg-trunk/libavformat/rtpproto.c:201: undefined reference to `___W SAFDIsSet@8' /home/Loic/ffmpeg-trunk/libavformat/rtpproto.c:216: undefined reference to `_rec vfrom@24' /home/Loic/ffmpeg-trunk/libavformat/rtpproto.c:219: undefined reference to `_WSA GetLastError@0' /home/Loic/ffmpeg-trunk/libavformat/rtpproto.c:219: undefined reference to `_WSA GetLastError@0' /home/Loic/ffmpeg-trunk/libavformat/rtpproto.c:214: undefined reference to `___W SAFDIsSet@8' /usr/local/lib/libavformat.a(tcp.o): In function `tcp_open': /home/Loic/ffmpeg-trunk/libavformat/network.h:51: undefined reference to `_WSASt artup@8' /usr/local/lib/libavformat.a(tcp.o): In function `tcp_open': /home/Loic/ffmpeg-trunk/libavformat/tcp.c:108: undefined reference to `_closesoc ket@4' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:60: undefined reference to `_htons@4' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:64: undefined reference to `_socket@12 ' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:70: undefined reference to `_connect@1 2' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:73: undefined reference to `_WSAGetLas tError@0' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:75: undefined reference to `_WSAGetLas tError@0' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:75: undefined reference to `_WSAGetLas tError@0' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:90: undefined reference to `_select@20 ' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:91: undefined reference to `___WSAFDIs Set@8' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:97: undefined reference to `_getsockop t@20' /usr/local/lib/libavformat.a(tcp.o): In function `tcp_read': /home/Loic/ffmpeg-trunk/libavformat/tcp.c:128: undefined reference to `_select@2 0' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:129: undefined reference to `___WSAFDI sSet@8' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:130: undefined reference to `_recv@16' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:132: undefined reference to `_WSAGetLa stError@0' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:132: undefined reference to `_WSAGetLa stError@0' /usr/local/lib/libavformat.a(tcp.o): In function `tcp_write': /home/Loic/ffmpeg-trunk/libavformat/tcp.c:158: undefined reference to `_select@2 0' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:159: undefined reference to `___WSAFDI sSet@8' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:160: undefined reference to `_send@16' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:162: undefined reference to `_WSAGetLa stError@0' /home/Loic/ffmpeg-trunk/libavformat/tcp.c:162: undefined reference to `_WSAGetLa stError@0' /usr/local/lib/libavformat.a(tcp.o): In function `tcp_close': /home/Loic/ffmpeg-trunk/libavformat/tcp.c:179: undefined reference to `_closesoc ket@4' /usr/local/lib/libavformat.a(tcp.o): In function `tcp_close': /home/Loic/ffmpeg-trunk/libavformat/network.h:60: undefined reference to `_WSACl eanup@0' /usr/local/lib/libavformat.a(udp.o): In function `udp_set_remote_url': /home/Loic/ffmpeg-trunk/libavformat/udp.c:242: undefined reference to `_htons@4' /usr/local/lib/libavformat.a(udp.o): In function `udp_open': /home/Loic/ffmpeg-trunk/libavformat/network.h:51: undefined reference to `_WSASt artup@8' /usr/local/lib/libavformat.a(udp.o): In function `udp_open': /home/Loic/ffmpeg-trunk/libavformat/udp.c:367: undefined reference to `_htonl@4' /home/Loic/ffmpeg-trunk/libavformat/udp.c:368: undefined reference to `_setsocko pt@20' /home/Loic/ffmpeg-trunk/libavformat/udp.c:411: undefined reference to `_closesoc ket@4' /home/Loic/ffmpeg-trunk/libavformat/udp.c:242: undefined reference to `_htons@4' /usr/local/lib/libavformat.a(udp.o): In function `udp_open': /home/Loic/ffmpeg-trunk/libavformat/network.h:51: undefined reference to `_WSASt artup@8' /usr/local/lib/libavformat.a(udp.o): In function `udp_open': /home/Loic/ffmpeg-trunk/libavformat/udp.c:329: undefined reference to `_socket@1 2' /home/Loic/ffmpeg-trunk/libavformat/udp.c:334: undefined reference to `_htonl@4' /home/Loic/ffmpeg-trunk/libavformat/udp.c:339: undefined reference to `_htons@4' /home/Loic/ffmpeg-trunk/libavformat/udp.c:343: undefined reference to `_setsocko pt@20' /home/Loic/ffmpeg-trunk/libavformat/udp.c:347: undefined reference to `_bind@12' /home/Loic/ffmpeg-trunk/libavformat/udp.c:351: undefined reference to `_getsockn ame@12' /home/Loic/ffmpeg-trunk/libavformat/udp.c:352: undefined reference to `_ntohs@4' /home/Loic/ffmpeg-trunk/libavformat/udp.c:358: undefined reference to `_setsocko pt@20' /home/Loic/ffmpeg-trunk/libavformat/udp.c:396: undefined reference to `_setsocko pt@20' /home/Loic/ffmpeg-trunk/libavformat/udp.c:404: undefined reference to `_setsocko pt@20' /usr/local/lib/libavformat.a(udp.o): In function `udp_read': /home/Loic/ffmpeg-trunk/libavformat/udp.c:429: undefined reference to `_recvfrom @24' /home/Loic/ffmpeg-trunk/libavformat/udp.c:432: undefined reference to `_WSAGetLa stError@0' /home/Loic/ffmpeg-trunk/libavformat/udp.c:432: undefined reference to `_WSAGetLa stError@0' /usr/local/lib/libavformat.a(udp.o): In function `udp_write': /home/Loic/ffmpeg-trunk/libavformat/udp.c:448: undefined reference to `_sendto@2 4' /home/Loic/ffmpeg-trunk/libavformat/udp.c:456: undefined reference to `_WSAGetLa stError@0' /home/Loic/ffmpeg-trunk/libavformat/udp.c:456: undefined reference to `_WSAGetLa stError@0' /usr/local/lib/libavformat.a(udp.o): In function `udp_close': /home/Loic/ffmpeg-trunk/libavformat/udp.c:483: undefined reference to `_closesoc ket@4' /usr/local/lib/libavformat.a(udp.o): In function `udp_close': /home/Loic/ffmpeg-trunk/libavformat/network.h:60: undefined reference to `_WSACl eanup@0' /usr/local/lib/libavformat.a(udp.o): In function `udp_close': /home/Loic/ffmpeg-trunk/libavformat/udp.c:473: undefined reference to `_setsocko pt@20' /usr/local/lib/libavformat.a(os_support.o): In function `resolve_host': /home/Loic/ffmpeg-trunk/libavformat/os_support.c:63: undefined reference to `_ge thostbyname@4' /usr/local/lib/libavformat.a(os_support.o): In function `ff_socket_nonblock': /home/Loic/ffmpeg-trunk/libavformat/os_support.c:74: undefined reference to `_io ctlsocket@12' /usr/local/lib/libavformat.a(os_support.o): In function `poll': /home/Loic/ffmpeg-trunk/libavformat/os_support.c:136: undefined reference to `_s elect@20' /home/Loic/ffmpeg-trunk/libavformat/os_support.c:145: undefined reference to `__ _WSAFDIsSet@8' /home/Loic/ffmpeg-trunk/libavformat/os_support.c:146: undefined reference to `__ _WSAFDIsSet@8' /home/Loic/ffmpeg-trunk/libavformat/os_support.c:147: undefined reference to `__ _WSAFDIsSet@8' Creating library file: .libs/libffmpeg_plugin.dll.a collect2: ld returned 1 exit status make[6]: *** [libffmpeg_plugin.la] Error 1 make[6]: Leaving directory `/home/Loic/vlc-0.9.0-svn/modules/codec/ffmpeg' make[5]: *** [all-modules] Error 1 make[5]: Leaving directory `/home/Loic/vlc-0.9.0-svn/modules/codec/ffmpeg' make[4]: *** [all-recursive] Error 1 make[4]: Leaving directory `/home/Loic/vlc-0.9.0-svn/modules/codec' make[3]: *** [all] Error 2 make[3]: Leaving directory `/home/Loic/vlc-0.9.0-svn/modules/codec' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/Loic/vlc-0.9.0-svn/modules' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/Loic/vlc-0.9.0-svn' make: *** [all] Error 2
I try to patch ffmpeg with an experimental patch for PAFF interlacing, but same problem with unpatched ffmpeg.
I compile with cygwin and parameters indicate in the wiki

Re: Compilation error when compile libffmpeg

Posted: 29 Sep 2007 22:07
by Jean-Baptiste Kempf
what is the method you use?

Re: Compilation error when compile libffmpeg

Posted: 29 Sep 2007 22:22
by loicb54
method cygwin indicate on the wiki with ffmpeg stand alone

Re: Compilation error when compile libffmpeg

Posted: 29 Sep 2007 23:52
by Jean-Baptiste Kempf
what is your configure line ? for ffmpeg, I mean.

Re: Compilation error when compile libffmpeg

Posted: 29 Sep 2007 23:59
by loicb54
CONTRIB_TREE=/usr/win32
PATH=${CONTRIB_TREE}/bin:$PATH \
./bootstrap && \
CPPFLAGS="-I${CONTRIB_TREE}/include -I${CONTRIB_TREE}/include/ebml" \
LDFLAGS=-L${CONTRIB_TREE}/lib \
PKG_CONFIG_LIBDIR=${CONTRIB_TREE}/lib/pkgconfig \
CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin" \
./configure \
--host=i686-pc-mingw32 \
--enable-sdl --with-sdl-config-path=${CONTRIB_TREE}/bin --disable-gtk \
--enable-nls \
--enable-ffmpeg \
--with-included-gettext \
--with-wx-config-path=${CONTRIB_TREE}/bin \
--with-freetype-config-path=${CONTRIB_TREE}/bin \
--with-fribidi-config-path=${CONTRIB_TREE}/bin \
--enable-live555 --with-live555-tree=${CONTRIB_TREE}/live.com \
--enable-caca --with-caca-config-path=${CONTRIB_TREE}/bin \
--with-xml2-config-path=${CONTRIB_TREE}/bin \
--enable-goom \
--disable-gnomevfs \
--disable-optimizations \
--enable-debug \

Re: Compilation error when compile libffmpeg

Posted: 30 Sep 2007 00:02
by Jean-Baptiste Kempf
ffmpeg configure, I mean.

Re: Compilation error when compile libffmpeg

Posted: 30 Sep 2007 00:08
by loicb54
erf, you edited just before my post ^^"

./configure --enable-memalign-hack \
--cc="gcc -mno-cygwin" \
--enable-gpl --log \

same problem with

./configure --enable-memalign-hack \
--extra-cflags=-I/usr/win32/include \
--extra-ldflags=-L/usr/win32/lib \
--prefix=/usr/win32 \
--cc="gcc -mno-cygwin" \
--enable-mp3lame --enable-pp --enable-gpl --log \

In the wiki, --enable-mingw32 it's present but in the last ffmpeg svn : not work

Re: Compilation error when compile libffmpeg

Posted: 30 Sep 2007 00:11
by Jean-Baptiste Kempf
try to --disable-network

Re: Compilation error when compile libffmpeg

Posted: 30 Sep 2007 11:54
by loicb54

Code: Select all

make[1]: Entering directory `/home/Loic/ffmpeg-svn/libavformat' gcc -mno-cygwin -I"/home/Loic/ffmpeg-svn"/libavcodec -DHAVE_AV_CONFIG_H -D_FILE _OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I"/home/Loic/ffmpeg-svn" - I"/home/Loic/ffmpeg-svn" -I"/home/Loic/ffmpeg-svn"/libavutil -I/usr/win32/includ e -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisa bled-optimization -Wpointer-arith -Wredundant-decls -O3 -c -o os_support.o os_s upport.c os_support.c:31:24: sys/select.h: No such file or directory make[1]: *** [os_support.o] Error 1 make[1]: Leaving directory `/home/Loic/ffmpeg-svn/libavformat' make: *** [lib] Error 2
and if i copy sys folder in /usr/local/win32/include

Code: Select all

make[1]: Entering directory `/home/Loic/ffmpeg-svn/libavformat' gcc -mno-cygwin -I"/home/Loic/ffmpeg-svn"/libavcodec -DHAVE_AV_CONFIG_H -D_FILE _OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_ISOC9X_SOURCE -I"/home/Loic/ffmpeg-svn" - I"/home/Loic/ffmpeg-svn" -I"/home/Loic/ffmpeg-svn"/libavutil -I/usr/win32/includ e -fomit-frame-pointer -g -Wdeclaration-after-statement -Wall -Wno-switch -Wdisa bled-optimization -Wpointer-arith -Wredundant-decls -O3 -c -o os_support.o os_s upport.c In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-min gw32/include/stdio.h:406, from avformat.h:31, from os_support.c:23: /usr/win32/include/sys/types.h:104: error: conflicting types for 'clock_t' /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/time.h:55 : error: previous declaration of 'clock_t' was here In file included from avformat.h:31, from os_support.c:23: /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:4 12: error: parse error before "off64_t" /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/stdio.h:4 19: error: parse error before "ftello64" In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-min gw32/include/fcntl.h:20, from os_support.h:44, from avformat.h:895, from os_support.c:23: /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:157: error: parse error before "lseek64" /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:157: error: parse error before "off64_t" /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:158: error: parse error before "lseek64" /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:158: error: parse error before "off64_t" /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h: In function `lseek64': /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:160: error: `fd' undeclared (first use in this function) /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:160: error: (Each undeclared identifier is reported only once /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:160: error: for each function it appears in.) /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:160: error: `offset' undeclared (first use in this function) /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/io.h:160: error: `whence' undeclared (first use in this function) In file included from /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-min gw32/include/unistd.h:11, from os_support.c:24: /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/process.h : At top level: /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/process.h :61: error: parse error before "_pid_t" /usr/lib/gcc/i686-pc-mingw32/3.4.4/../../../../i686-pc-mingw32/include/process.h :63: error: parse error before "_getpid" In file included from os_support.c:31: /usr/win32/include/sys/select.h:33: warning: type defaults to `int' in declarati on of `sigset_t' /usr/win32/include/sys/select.h:33: error: parse error before '*' token make[1]: *** [os_support.o] Error 1 make[1]: Leaving directory `/home/Loic/ffmpeg-svn/libavformat' make: *** [lib] Error 2
I don't understand why it's so hard now ... 2 months ago i don't have any problem :?