Compilation errors on Red Hat

Support and queries relating to all previous versions of ZoneMinder
Locked
vlad_tym
Posts: 5
Joined: Sat Apr 23, 2005 8:27 am
Location: Kiev, Ukraine

Compilation errors on Red Hat

Post by vlad_tym »

OS: Red Hat 7.3, kernel 2.4.30 + patch-o-matic-ng-20050417 + kernel patch from the Openwall + ffmpeg-0.4.8

On to the problem:

cd zm-1.21.0

1. ./configure --with-mysql=/usr --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache

Ok

2. # make

make all-recursive
make[1]: Entering directory `/opt/zm-1.21.0'
Making all in src
make[2]: Entering directory `/opt/zm-1.21.0/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/include -g -O2 -MT zm_z
one.o -MD -MP -MF ".deps/zm_zone.Tpo" -c -o zm_zone.o zm_zone.cpp; \
then mv -f ".deps/zm_zone.Tpo" ".deps/zm_zone.Po"; else rm -f ".deps/zm_zone.Tpo
"; exit 1; fi
In file included from zm_zone.h:25,
from zm_zone.cpp:22:
zm_box.h: In method `const Coord Box::Centre () const':
zm_box.h:60: `round' undeclared (first use this function)
zm_box.h:60: (Each undeclared identifier is reported only once for each
function it appears in.)
In file included from zm_zone.h:26,
from zm_zone.cpp:22:
zm_image.h: At top level:
zm_image.h:34: `double round (double)' used prior to declaration
make[2]: *** [zm_zone.o] Error 1
make[2]: Leaving directory `/opt/zm-1.21.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/zm-1.21.0'
make: *** [all] Error 2


:?:
Please tell me that I'm doing something embarassing.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

After you did your ./configure,
did your run
perl ./zmconfig.pl
before you did the make?
Regards,
Cordel
vlad_tym
Posts: 5
Joined: Sat Apr 23, 2005 8:27 am
Location: Kiev, Ukraine

Post by vlad_tym »

cordel wrote:After you did your ./configure,
did your run
perl ./zmconfig.pl
before you did the make?
Regards,
Cordel
O, yes! I have overlooked to write about it. I did it certainly.

1. ./configure
2. perl ./zmconfig.pl
3. make
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Can you post the output of your configure command, and the output you get when you do

Code: Select all

grep ROUND config.h
Phil
vlad_tym
Posts: 5
Joined: Sat Apr 23, 2005 8:27 am
Location: Kiev, Ukraine

Post by vlad_tym »

zoneminder wrote:Can you post the output of your configure command, and the output you get when you do

Code: Select all

grep ROUND config.h
Phil


1.

./configure --with-mysql=/usr --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking how to run the C++ preprocessor... g++ -E
checking pcre/pcre.h usability... yes
checking pcre/pcre.h presence... yes
checking for pcre/pcre.h... yes
checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
checking whether round is declared... no
checking whether strsignal is declared... no
checking whether MD5 is declared... yes
checking for jpeg_start_compress in -ljpeg... yes
checking for compress in -lz... yes
checking for dlsym in -ldl... yes
checking for mysql_init in -lmysqlclient... yes
checking for MD5 in -lcrypto... yes
checking for pcre_compile in -lpcre... yes
checking for avcodec_init in -lavcodec... no
configure: WARNING: libavcodec.a is required for MPEG streaming
checking for av_new_stream in -lavformat... no
configure: WARNING: libavformat.a is required for MPEG streaming
checking for lame_init in -lmp3lame... no
configure: WARNING: libmp3lame.a may be required if ffmpeg was built with it
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating web/Makefile
config.status: creating web/graphics/Makefile
config.status: creating scripts/Makefile
config.status: creating db/Makefile
config.status: creating zmconfig.pl
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
checking for zmconfig.txt... yes


2.
grep ROUND config.h

#define HAVE_DECL_ROUND 0


I thank you for the help me.
vlad_tym
Posts: 5
Joined: Sat Apr 23, 2005 8:27 am
Location: Kiev, Ukraine

Post by vlad_tym »

By the way, release 1.19.4 it was perfectly compiled without error ! :D
I did not change other software. The reason of error in compilation - the new version :?:
User avatar
chaapaï
Posts: 19
Joined: Fri Aug 13, 2004 2:26 pm
Location: France

Post by chaapaï »

hello all !!

you can try this :
zoneminder wrote:Thanks for that. Previous versions did use round but the header that defined it if it wasn't found is not included in zm_box.h.

To get round ( :lol: ) this you can edit zm.h and add the following lines

Code: Select all

extern "C"
{
#if !HAVE_DECL_ROUND
double round(double);
#endif
}
just under the line

Code: Select all

#include "zm_config.h"
only this...
i think it work...

original here http://www.zoneminder.com/forums/viewto ... edeclround
oooops, i'm sorry but i speak english like as spanish cow...
vlad_tym
Posts: 5
Joined: Sat Apr 23, 2005 8:27 am
Location: Kiev, Ukraine

Post by vlad_tym »

I Thank You for the help.
This answer to my question needs to be written down in FAQ for version 1.2xx ? :)
Locked