SOLVED: newbie: zoneminder will not build on centos 5
Posted: Mon Dec 17, 2012 10:16 pm
running centos 5.8 server, brand new net install.
I've tried to follow the instructions at http://www.zoneminder.com/wiki/index.php/CentOS but zoneminder keeps falling over when running make.
Everything goes fine up until the bit about installing ZoneMinder-1.25.0, the ./configure command works fine and I get:
Checking if your kit is complete...
Looks good
Writing Makefile for ZoneMinder
but when I run make I get:
<snip>
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/share/ffmpeg/include -D__STDC_CONSTANT_MACROS -g -O2 -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.cpp:105:44: error: missing binary operator before token "("
zm_ffmpeg_camera.h:39: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
zm_ffmpeg_camera.h:39: error: expected ‘;’ before ‘*’ token
zm_ffmpeg_camera.h:41: error: ISO C++ forbids declaration of ‘AVCodecContext’ with no type
zm_ffmpeg_camera.h:41: error: expected ‘;’ before ‘*’ token
zm_ffmpeg_camera.h:42: error: ISO C++ forbids declaration of ‘AVCodec’ with no type
zm_ffmpeg_camera.h:42: error: expected ‘;’ before ‘*’ token
and loads more errors after that.
I can't find a solution to this anywhere. I tried all three configure commands on that page.
I also tried to install ZoneMinder-1.24.1 but on make I got:
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/share/ffmpeg/include -D__STDC_CONSTANT_MACROS -frepo -g -O2 -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.h:39: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
zm_ffmpeg_camera.h:39: error: expected ‘;’ before ‘*’ token
zm_ffmpeg_camera.h:41: error: ISO C++ forbids declaration of ‘AVCodecContext’ with no type
zm_ffmpeg_camera.h:41: error: expected ‘;’ before ‘*’ token
etc etc...
I also tried a build on centos 6 server but the ./configure command gives:
configure: error: zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead
I'd like to persist with centos 5.8 and get it working if I can, thanks for any help.
I've tried to follow the instructions at http://www.zoneminder.com/wiki/index.php/CentOS but zoneminder keeps falling over when running make.
Everything goes fine up until the bit about installing ZoneMinder-1.25.0, the ./configure command works fine and I get:
Checking if your kit is complete...
Looks good
Writing Makefile for ZoneMinder
but when I run make I get:
<snip>
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/share/ffmpeg/include -D__STDC_CONSTANT_MACROS -g -O2 -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.cpp:105:44: error: missing binary operator before token "("
zm_ffmpeg_camera.h:39: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
zm_ffmpeg_camera.h:39: error: expected ‘;’ before ‘*’ token
zm_ffmpeg_camera.h:41: error: ISO C++ forbids declaration of ‘AVCodecContext’ with no type
zm_ffmpeg_camera.h:41: error: expected ‘;’ before ‘*’ token
zm_ffmpeg_camera.h:42: error: ISO C++ forbids declaration of ‘AVCodec’ with no type
zm_ffmpeg_camera.h:42: error: expected ‘;’ before ‘*’ token
and loads more errors after that.
I can't find a solution to this anywhere. I tried all three configure commands on that page.
I also tried to install ZoneMinder-1.24.1 but on make I got:
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/share/ffmpeg/include -D__STDC_CONSTANT_MACROS -frepo -g -O2 -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.h:39: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
zm_ffmpeg_camera.h:39: error: expected ‘;’ before ‘*’ token
zm_ffmpeg_camera.h:41: error: ISO C++ forbids declaration of ‘AVCodecContext’ with no type
zm_ffmpeg_camera.h:41: error: expected ‘;’ before ‘*’ token
etc etc...
I also tried a build on centos 6 server but the ./configure command gives:
configure: error: zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead
I'd like to persist with centos 5.8 and get it working if I can, thanks for any help.