BUG: multiple definition of `file_protocol'
I used the latest svn from ffmpeg, configured it with "./configure" (and make, make install) and got the daily snap of motion (20071128-051001). I then configured motion with "./configure --with-ffmpeg=/usr/local". I got a TON of "undefined reference to" until I added "-lavutil" in the LIB section of the Makefile. The only thing it complains about now is file_protocol.
3.2.9 has this problem but also 20071128-051001.
Linking Motion...
--------------------------------------------------------------------------------
gcc -lmjpegutils -llavjpeg -L/usr/local/lib -o motion motion.o conf.o draw.o video.o video2.o video_common.o netcam.o netcam_ftp.o netcam_jpeg.o netcam_wget.o track.o alg.o event.o picture.o rotate.o webhttpd.o webcam.o ffmpeg.o -lm -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lavutil -lm -lz
/usr/local/lib/libavformat.a(file.o):(.data+0x0): multiple definition of `file_protocol'
ffmpeg.o:(.data+0x40): first defined here
collect2: ld returned 1 exit status
make: *** [motion] Error 1
Environment
Motion version: |
3.2.9 |
ffmpeg version: |
SVN-r11107 |
Shared libraries: |
ffmpeg |
Server OS: |
Debian lenny/sid, 2.6.22-1-k7 |
--
GerbenRoest - 28 Nov 2007
Follow up
How did you compile ffmpeg ?
I tried to reproduce in debian etch with ffmpeg svn -r11130 and no errors.
btw if you install ffmpeg in /usr/local don't need to specify --with-ffmpeg=/usr/local
* ffmpeg
./configure --enable-shared ; make ; make install
* motion
************************
* Configure status *
************************
OS : Linux
pthread Support: Yes
jpeg Support: Yes
mjpeg Support: No
V4L included: Yes
V4L2 supported: Yes
FFmpeg Support: Yes
MYSQL Support: Yes
PostgreSQL Support: Yes
CFLAGS: -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DHAVE_FFMPEG_NEW -DHAVE_MYSQL -I/usr/include/mysql -DHAVE_PGSQL -I/usr/include/postgresql -DMOTION_V4L2 -DTYPE_32BIT="int" -DHAVE_BSWAP -march=pentium2 -mfpmath=387 -mmmx
LIBS: -lm -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz -L/usr/lib -lmysqlclient -lz -L/usr/lib -lpq
LDFLAGS: -L/usr/local/lib
# make
....
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DHAVE_FFMPEG_NEW -DHAVE_MYSQL -I/usr/include/mysql -DHAVE_PGSQL -I/usr/include/postgresql -DMOTION_V4L2 -DTYPE_32BIT="int" -DHAVE_BSWAP -march=pentium2 -mfpmath=387 -mmmx -Wall -DVERSION=\"3.2.9\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\" -c -o ffmpeg.o ffmpeg.c
...
Linking Motion...
--------------------------------------------------------------------------------
gcc -L/usr/local/lib -o motion motion.o conf.o draw.o video.o video2.o video_common.o netcam.o netcam_ftp.o netcam_jpeg.o netcam_wget.o track.o alg.o event.o picture.o rotate.o webhttpd.o webcam.o ffmpeg.o -lm -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz -L/usr/lib -lmysqlclient -lz -L/usr/lib -lpq
--------------------------------------------------------------------------------
Motion has been linked.
--
AngelCarpintero - 02 Dec 20
Fix record