Having trouble compiling Zoneminder. Started on 10.04LTS and couldn't figure out how to get past "Undefined reference to av_free_packet" error. Upgraded to 11.10 and now getting a slightly different error. Could someone please point me in the right direction?
make error (replaced the g++ line with "..." spam filters didn't like it)
# make
make all-recursive
make[1]: Entering directory `/usr/src/ZoneMinder-1.25.0'
Making all in src
make[2]: Entering directory `/usr/src/ZoneMinder-1.25.0/src'
...
zm_mpeg.o: In function `VideoStream::OpenStream()':
/usr/src/ZoneMinder-1.25.0/src/zm_mpeg.cpp:225: undefined reference to `avio_open'
zm_mpeg.o: In function `~VideoStream':
/usr/src/ZoneMinder-1.25.0/src/zm_mpeg.cpp:293: undefined reference to `avio_close'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/usr/src/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/ZoneMinder-1.25.0'
make: *** [all] Error 2
<--- Not a *buntu user so I do not know how you would determine this. But, do you know for certain you have all the development versions of the libraries needed?
libavformat-dev, libavcodec-dev, libavutil-dev & libswscale-dev are all installed and up to date. These are all the libraries included in zm_ffmpeg.h, are there any I'm missing? I'm completely out of ideas, googled anything I could possibly think of
Since I build for other people I do not use the default db user/pass. I set the DB user and password for each build by hand in the zm.conf file in the Build directory prior to running 'make install'. Feel free to modify this simple script for your use.
checking for gawk... no
configure: WARNING: You can call configure with the --with-extralibs option.
Ordinarily you will need to use this option only when your copy of ffmpeg has been built
with support for additional formats and you would use this option to detail which additional
libraries ffmpeg was built with so that it is able to link successfully with ZoneMinder.
You will need to wrap this option in quotes if it contains any spaces.
e.g. --with-extralibs="-lmp3lame"
configure: WARNING: You can call configure with the --with-webhost option.
This tells configure what the host name is for name based virtual hosting. This is only used to populate the sample web/zmHttpd.conf file.
e.g. --with-webhost=zm.localdomain
checking whether we are cross compiling... no
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 ffmpeg... /usr/local/bin/ffmpeg
checking for pnmscale... no
checking for pnmscale... no
checking for av_image_copy in -lavcore... no
checking linux/videodev.h usability... no
checking linux/videodev.h presence... no
checking for linux/videodev.h... no
checking pcre/pcre.h usability... no
checking pcre/pcre.h presence... no
checking for pcre/pcre.h... no
checking for perl module Device::SerialPort... no
configure: WARNING: Device::SerialPort is required for RS232/RS485 PTZ camera control
checking for perl module Expect... no
configure: WARNING: Expect is required for automatic event uploading using sftp
checking for perl module Archive::Zip... no
configure: WARNING: Archive::Zip may be required for automatic event uploading
checking for perl module X10::ActiveHome... no
configure: WARNING: X10::ActiveHome is required for X.10 support
Is there a way to trace down that undefined reference to 'avio_open' error? I just don't know where to even begin.
Well, as far as I know, and I am no programmer, undefined reference usually means missing libraries or missing functionality in libraries due to some "--include-foo" missing at the time the library was built. Your undefined reference message is for ffmpeg stuff, which can always give one headaches if not built properly. If you know you have installed the development libraries and are getting this error, then you may need to file a bug report with your distribution.
The other option is to try to build ffmpeg yourself. But man, I would hate to do that myself on a system that is supposed to be up to date and includes package management.
Went without a hitch. Including building ffmpeg 0.9.1 from source. I used the libjpeg turbo i386, of course. He was missing the CPAN ftp packages I think, for the upload feature. I neglected cambozola and webmin, but that shouldn't matter, for it was a test build. First time I got Zm built from source.
A couple of lame nags; /etc/init.d/networking restart is deprecated. I used ifdown/up to set static ip. Needed to reboot after all was said and done, zm admin was coming up with a blank page.
Built x264 & ffmpeg from source using the following guide: http://ubuntuforums.org/showthread.php?t=786095. ZoneMinder make error remains src/zm_mpeg.cpp:225: undefined reference to `avio_open'. Will try guide suggested by attilahooper when I get home today.
forgot to mention that I get stuck on the exact same error with 1.24.4 & 1.24.3 (after installing PHP::Serialization module that 1.24.3 ./configure complained about)
I notice the pcre complaint; check for pcre-devel package installed (PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics as Perl 5). Make sure you have the ffmpeg-devel installed also.
Tried that tutorial. Did not resolve error. Also tried same tutorial on a different machine running same OS, compiles just fine. Will probably just start from scratch and reinstall ubuntu when I get some free time.
Finally got time to do clean install of Ubuntu 2011.10 server. Followed guide posted by mastertheknife, zoneminder compiled and installed with no problems. Just had to change
--with-webdir=/var/www
to
--with-webdir=/var/www/zm
Thanks everyone for help.
Time to start troubleshooting the PV-183 - 16 port card.