View unanswered posts | View active topics It is currently Sun Oct 26, 2014 2:48 am



Reply to topic  [ 4 posts ] 
Trouble compiling ZM 1.25.0 on Debian 6.0.4 x64 from source 
Author Message

Joined: Wed Jul 06, 2011 1:37 am
Posts: 2
Post Trouble compiling ZM 1.25.0 on Debian 6.0.4 x64 from source
I have a fresh install of Debian 6.0.4 x64 that I plan on having as a dedicated ZM box. Following the wiki and a number of tutorials, I believe I have all of the pre-reqs installed, but am still having issues compiling ZM that I wasn't able to sort out by searching the forum.

Here's my ./configure settings:

Code:
./configure --prefix=/opt/zm --with-webuser=www-data --with-webgroup=www-data --enable-mmap=yes --with-webdir=/var/www --with-cgidir=/usr/lib/cgi-bin ZM_SSL_LIB=openssl ZM_DB_PASS=**** --with-webhost=kZoneMinder

I export the following:

Code:
export CFLAGS="-march=native -O2 -pipe" && \
export CXXFLAGS="${CFLAGS}" && \
export CPPFLAGS="${CFLAGS} -D__STDC_CONSTANT_MACROS"]

I'm able to fun ffmpeg successfully:

Code:
ffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers
  built on Apr  3 2012 15:05:55 with gcc 4.4.5
  configuration: --enable-gpl --enable-shared --enable-pthreads
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'

Here are the "no" items from when I run configure:

Code:
checking whether we are cross compiling... no
checking for gcc option to accept ISO C89... none needed
checking for _Bool... no
checking for struct sigcontext.eip... no
checking whether gcc needs -traditional... no
checking whether stat accepts an empty string... no
checking for _doprnt... no
checking for ioctlsocket... no
checking for pnmscale... no
checking for pnmscale... no
checking for x264_predict_16x16_init in -lx264... no
checking for av_image_copy in -lavcore... no
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no

And here's the fun part of the 'make' output (ran as root):

Code:
lcrypto -ldl -lpthread -ljpeg -lmysqlclient
zm_ffmpeg_camera.o: In function `FfmpegCamera::Capture(Image&)':
zm_ffmpeg_camera.cpp:(.text+0x6d): undefined reference to `av_free_packet'
zm_ffmpeg_camera.cpp:(.text+0xf3): undefined reference to `avcodec_decode_video2'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x3c5): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x485): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::OpenStream()':
zm_mpeg.cpp:(.text+0x5e1): undefined reference to `avio_open'
zm_mpeg.o: In function `VideoStream::SetupFormat(char const*, char const*)':
zm_mpeg.cpp:(.text+0xaf3): undefined reference to `av_guess_format'
zm_mpeg.cpp:(.text+0xbd8): undefined reference to `av_guess_format'
zm_remote_camera_rtsp.o: In function `RemoteCameraRtsp::Capture(Image&)':
zm_remote_camera_rtsp.cpp:(.text+0x1c6): undefined reference to `avcodec_decode_video2'
collect2: ld returned 1 exit status
zm_ffmpeg_camera.o: In function `FfmpegCamera::Capture(Image&)':
zm_ffmpeg_camera.cpp:(.text+0x6d): undefined referencemake[2]:  to *** [zmf] Error 1`
av_free_packet'
zm_ffmpeg_camera.cpp:(.text+0xf3): undefined make[2]: reference*** Waiting for unfinished jobs....
to `avcodec_decode_video2'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x3c5): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x485): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::OpenStream()':
zm_mpeg.cpp:(.text+0x5e1): undefined reference to `avio_open'
zm_mpeg.o: In function `VideoStream::SetupFormat(char const*, char const*)':
zm_mpeg.cpp:(.text+0xaf3): undefined reference to `av_guess_format'
zm_mpeg.cpp:(.text+0xbd8): undefined reference to `av_guess_format'
zm_remote_camera_rtsp.o: In function `RemoteCameraRtsp::Capture(Image&)':
zm_remote_camera_rtsp.cpp:(.text+0x1c6): undefined reference to `avcodec_decode_video2'
collect2: ld returned 1 exit status
make[2]: *** [zma] Error 1
zm_ffmpeg_camera.o: In function `FfmpegCamera::Capture(Image&)':
zm_ffmpeg_camera.cpp:(.text+0x6d): undefined reference to `av_free_packet'
zm_ffmpeg_camera.cpp:(.text+0xf3): undefined reference to `avcodec_decode_video2'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x3c5): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x485): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::OpenStream()':
zm_mpeg.cpp:(.text+0x5e1): undefined reference to `avio_open'
zm_mpeg.o: In function `VideoStream::SetupFormat(char const*, char const*)':
zm_mpeg.cpp:(.text+0xaf3): undefined reference to `av_guess_format'
zm_mpeg.cpp:(.text+0xbd8): undefined reference to `av_guess_format'
zm_remote_camera_rtsp.o: In function `RemoteCameraRtsp::Capture(Image&)':
zm_remote_camera_rtsp.cpp:(.text+0x1c6): undefined reference to `avcodec_decode_video2'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
zm_ffmpeg_camera.o: In function `FfmpegCamera::Capture(Image&)':
zm_ffmpeg_camera.cpp:(.text+0x6d): undefined reference to `av_free_packet'
zm_ffmpeg_camera.cpp:(.text+0xf3): undefined reference to `avcodec_decode_video2'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x3c5): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x485): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::OpenStream()':
zm_mpeg.cpp:(.text+0x5e1): undefined reference to `avio_open'
zm_mpeg.o: In function `VideoStream::SetupFormat(char const*, char const*)':
zm_mpeg.cpp:(.text+0xaf3): undefined reference to `av_guess_format'
zm_mpeg.cpp:(.text+0xbd8): undefined reference to `av_guess_format'
zm_remote_camera_rtsp.o: In function `RemoteCameraRtsp::Capture(Image&)':
zm_remote_camera_rtsp.cpp:(.text+0x1c6): undefined reference to `avcodec_decode_video2'
collect2: ld returned 1 exit status
make[2]: *** [zmu] Error 1
zm_ffmpeg_camera.o: In function `FfmpegCamera::Capture(Image&)':
zm_ffmpeg_camera.cpp:(.text+0x6d): undefined reference to `av_free_packet'
zm_ffmpeg_camera.cpp:(.text+0xf3): undefined reference to `avcodec_decode_video2'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x3c5): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::~VideoStream()':
zm_mpeg.cpp:(.text+0x485): undefined reference to `avio_close'
zm_mpeg.o: In function `VideoStream::OpenStream()':
zm_mpeg.cpp:(.text+0x5e1): undefined reference to `avio_open'
zm_mpeg.o: In function `VideoStream::SetupFormat(char const*, char const*)':
zm_mpeg.cpp:(.text+0xaf3): undefined reference to `av_guess_format'
zm_mpeg.cpp:(.text+0xbd8): undefined reference to `av_guess_format'
zm_remote_camera_rtsp.o: In function `RemoteCameraRtsp::Capture(Image&)':
zm_remote_camera_rtsp.cpp:(.text+0x1c6): undefined reference to `avcodec_decode_video2'
collect2: ld returned 1 exit status
make[2]: *** [zms] Error 1
make[2]: Leaving directory `/home/zoneuser/Downloads/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zoneuser/Downloads/ZoneMinder-1.25.0'
make: *** [all] Error 2



I've tried a couple of different builds of ffmpeg (from source and apt), as well as ZM 1.25.0 and 1.24.4 but always get the same results. Can anybody suggest a direction to troubleshoot in? I'm technically savvy, but compiler issues aren't my strong point. Thanks!


Wed Apr 04, 2012 6:18 am
Profile
User avatar

Joined: Thu Oct 18, 2007 2:55 pm
Posts: 572
Location: Shiloh, IL
Post Re: Trouble compiling ZM 1.25.0 on Debian 6.0.4 x64 from sou
I'm not running Debian. However, I thought I'd throw a couple of suggestions since no one else has stepped in:

  • When you built ffmpeg, did you run "make install-libs" in addition to the usual "make install"?
  • Try using ffmpeg 0.6.5 from git. The latest ffmpeg causes zoneminder 1.25 to not compile properly on CentOS so perhaps the same is true for Debian.

_________________
We want... a shrubbery! [dramatic chord]


Thu Apr 05, 2012 6:28 pm
Profile

Joined: Wed Jul 06, 2011 1:37 am
Posts: 2
Post Re: Trouble compiling ZM 1.25.0 on Debian 6.0.4 x64 from sou
Thanks for trying, but still no luck :(

I reverted to a snapshot I had taken before installing ffmpeg previously and pulled the 0.6.5 version from git, compiled it successfully (including make install-libs as I had done before). ffmpeg 0.6.5 itself seems to work, but I still get this when trying to compile ZM:

Code:
...
zm_ffmpeg_camera.o: In function `FfmpegCamera::Capture(Image&)':
zm_ffmpeg_camera.cpp:(.text+0x6d): undefined reference to `av_free_packet'
zm_ffmpeg_camera.cpp:(.text+0xf3): undefined reference to `avcodec_decode_video2'
zm_mpeg.o: In function `VideoStream::SetupFormat(char const*, char const*)':
zm_mpeg.cpp:(.text+0xaf3): undefined reference to `av_guess_format'
zm_mpeg.cpp:(.text+0xbd8): undefined reference to `av_guess_format'
zm_remote_camera_rtsp.o: In function `RemoteCameraRtsp::Capture(Image&)':
zm_remote_camera_rtsp.cpp:(.text+0x1c6): undefined reference to `avcodec_decode_video2'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/home/zoneuser/Downloads/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zoneuser/Downloads/ZoneMinder-1.25.0'
make: *** [all] Error 2



Fri Apr 06, 2012 5:17 am
Profile
User avatar

Joined: Thu Oct 18, 2007 2:55 pm
Posts: 572
Location: Shiloh, IL
Post Re: Trouble compiling ZM 1.25.0 on Debian 6.0.4 x64 from sou
Have you read these by chance?

http://www.zoneminder.com/wiki/index.php/Debian

http://www.zoneminder.com/wiki/index.php/Debian_6_Squeeze_64-bit_with_ZoneMinder_1.25.0_Preview,_FFmpeg,_libjpeg-turbo,_Webmin,_Cambozola%28Spanish_Diciembre_2011%29

According to the first link, zoneminder is in the Debian unstable repository so you may be able to cheat and just do an "apt-get install zoneminder"

The second link is in Spanish, but looking through it, the author does the following immediately after compiling ffmpeg:

Code:
cd /lib && ln -s /usr/local/lib/libswscale.so.0 && \
ln -s /usr/local/lib/libavformat.so.52 && \
ln -s /usr/local/lib/libavcodec.so.52 && \
ln -s /usr/local/lib/libavutil.so.50 && \
ln -s /usr/local/lib/libavdevice.so.52

ldconfig


hope that helps.

_________________
We want... a shrubbery! [dramatic chord]


Fri Apr 06, 2012 1:28 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group