Motion - Bug Report 2007x 08x 30x 103958
You are here: Foswiki>Motion Web>BugReports>BugReport2007x08x30x103958 (31 Aug 2007, AngelCarpintero)Edit Attach

BUG: compile error with ffmpeg + solution

i get an compile error with ffmpeg after "make" [Linking Motion...] i tracked down the problem to the Makefile line 37:

"LIBS = -lm -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz -L/usr/lib -lmysqlclient -lz $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)"

and changed it to:

"LIBS = -lm -lpthread -ljpeg -L/usr/local/lib -lavcodec -lavformat -lavutil -lm -lz -L/usr/lib -lmysqlclient -lz $(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)"

and it compiled just fine ...

i realy dnt know is the problem svn-ffmpeg or a paticular compiler ... never less it was a big step for me but a small one for human kind... kind regards knatterton

-EDIT- DISTRIBUTION:Slackware 11.0 *modifyed smile UNAME: Linux l3 2.6.22.1 #6 SMP Thu Aug 2 18:10:51 CEST 2007 i686 GNU/Linux GCC: gcc (GCC) 3.3.6

the are more than 1000 lines of errors so here is only the last page
<SNIP>
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x1fb4):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:659: undefined reference to `av_malloc'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x1fcb):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:660: undefined reference to `av_malloc'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x1fe5):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:661: undefined reference to `av_malloc'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x1ffe):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:662: more undefined references to `av_malloc' follow
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x2062): In function `ff_cavs_init_top_lines':
/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:668: undefined reference to `av_mallocz'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x2196): In function `ff_cavs_end':
/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:705: undefined reference to `av_free'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x21a3):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:706: undefined reference to `av_free'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x21b0):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:707: undefined reference to `av_free'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x21bd):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:708: undefined reference to `av_free'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x21ca):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:709: undefined reference to `av_free'
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x21d7):/mnt/net2/tmp/ffmpeg/libavcodec/cavs.c:710: more undefined references to `av_free' follow
/usr/local/lib/libavcodec.a(cavs.o)(.text+0x2291): In function `get_se_golomb':
/mnt/net2/tmp/ffmpeg/libavutil/common.h:110: undefined reference to `ff_log2_tab'
/usr/local/lib/libavcodec.a(png.o)(.text+0x1f): In function `ff_png_zalloc':
/mnt/net2/tmp/ffmpeg/libavcodec/png.c:51: undefined reference to `av_malloc'
/usr/local/lib/libavcodec.a(png.o)(.text+0x49): In function `ff_png_zfree':
/mnt/net2/tmp/ffmpeg/libavcodec/png.c:56: undefined reference to `av_free'
collect2: ld returned 1 exit status
make: *** [motion] Error 1


Environment

Motion version: 3.2.8
ffmpeg version: svn-r10260
Shared libraries: ffmpeg, mysql
Server OS: Linux 2.6

-- NickKnatterton - 30 Aug 2007

Follow up

I can't reproduce that problem on debian either ubuntu , but i think that is because those distros have ffmpeg-config that helps to get libs and includes.

What distribution are you using ?

-- AngelCarpintero - 30 Aug 2007


How did you compile ffmpeg ?

I've compiled svn trunk :

./configure --enable-shared
make 
make install

After compiled motion with ffmpeg support without any problem.

 /usr/local/bin/ffmpeg -version

FFmpeg version SVN-r10275, Copyright (c) 2000-2007 Fabrice Bellard, et al.
  configuration: --enable-shared
  libavutil version: 49.5.0
  libavcodec version: 51.42.0
  libavformat version: 51.12.2
  built on Aug 31 2007 23:05:43, gcc: 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
ffmpeg      SVN-r10275
libavutil   3212544
libavcodec  3353088
libavformat 3345410

-- AngelCarpintero - 31 Aug 2007

Fix record

Topic revision: r4 - 31 Aug 2007, AngelCarpintero
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.