Page 1 of 1
./configure zoneminder and problems
Posted: Sun Jul 17, 2011 5:14 pm
by Devostator
Hi!
Following:
http://www.zoneminder.com/wiki/index.ph ... _Cambozola
I ran into a problem:
Code: Select all
root@zmsrv:/usr/src/zm# ./configure --with-webdir=/var/www/zm --with-cgidir=/usr/lib/cgi-bin ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=zmuser ZM_DB_PASS=zmpass ZM_SSL_LIB=openssl --enable-debug=no --with-webgroup=www-data --with-webuser=www-data --enable-mmap CPPFLAGS="-D__STDC_CONSTANT_MACROS ${CPPFLAGS}"
checking for a BSD-compatible install... /usr/bin/install -c
...
checking for pnmscale... yes
checking for pnmscale... /usr/bin/pnmscale
checking for mysql_init in -lmysqlclient... yes
checking for jpeg_start_compress in -ljpeg... no
configure: error: zm requires libjpeg.a
root@zmsrv:/usr/src/zm#
ln -s /usr/bin/g++-4.5 /usr/bin/g++ --- did not help
Please tell me how to solve this problem.
Thank you in advance.
Re: configure: error: zm requires libjpeg.a
Posted: Sun Jul 17, 2011 7:09 pm
by erict35
Hi
Are you sure that libjpeg.a is in /usr/lib directory ?
When you install libjpeg-turbo you need to make symbolic links like :
ln -s /opt/libjpeg-turbo/lib/libjpeg.a /usr/lib/libjpeg.a && \
ln -s /opt/libjpeg-turbo/include/jconfig.h /usr/include/jconfig.h && \
ln -s /opt/libjpeg-turbo/include/jerror.h /usr/include/jerror.h && \
ln -s /opt/libjpeg-turbo/include/jmorecfg.h /usr/include/jmorecfg.h && \
ln -s /opt/libjpeg-turbo/include/jpeglib.h /usr/include/jpeglib.h
Best Regards
Eric
Re: configure: error: zm requires libjpeg.a
Posted: Sun Jul 17, 2011 7:51 pm
by Devostator
Associated with libjpeg I installed only (based on the wiki):
libjpeg62 libjpeg-progs
In the folder
/usr/lib/ only (associated with libjpeg):
libjpeg.so.8 libjpeg.so.8.0.2
Run in Terminal:
Code: Select all
ln -s /opt/libjpeg-turbo/lib/libjpeg.a /usr/lib/libjpeg.a && \
ln -s /opt/libjpeg-turbo/include/jconfig.h /usr/include/jconfig.h && \
ln -s /opt/libjpeg-turbo/include/jerror.h /usr/include/jerror.h && \
ln -s /opt/libjpeg-turbo/include/jmorecfg.h /usr/include/jmorecfg.h && \
ln -s /opt/libjpeg-turbo/include/jpeglib.h /usr/include/jpeglib.h
Unfortunately did not help
Maybe I need to install any other module libjpeg?
PS: Sorry if I'm talking nonsense.
Re: configure: error: zm requires libjpeg.a
Posted: Sun Jul 17, 2011 8:43 pm
by mastertheknife
You may need to install libjpeg-dev (or libjpeg62-dev)
mastertheknife
Re: configure: error: zm requires libjpeg.a
Posted: Mon Jul 18, 2011 8:17 am
by Devostator
Thank you for helping mastertheknife. Problem solved with libjpeg (
apt-get install libjpeg-dev)
But I have a new problem
Code: Select all
checking for perl module Sys::Mmap... no
configure: error: zm requires Sys::Mmap for mapped memory - set --enable-mmap=no to use IPC shared memory instead
This is :
http://www.codingforums.com/showthread.php?t=230113 - did not help me
Any ideas?
Re: ./configure zoneminder and problems
Posted: Mon Jul 18, 2011 11:54 am
by erict35
Hi
Are you sure you installed Sys:Map perl module ?
LC_ALL=C perl -MCPAN -e shell
install Sys::Mmap
install DBI
install DBD::mysql
exit
Best regards
Eric
Re: ./configure zoneminder and problems
Posted: Tue Jul 19, 2011 9:59 am
by Devostator
Configured!
Code: Select all
LC_ALL=C perl -MCPAN -e shell
install Sys::Mmap
install DBI
install DBD::mysql
exit
But.....
Code: Select all
root@zmsrv:/usr/src/zm# make
make all-recursive
make[1]: Entering directory `/usr/src/zm'
Making all in src
make[2]: Entering directory `/usr/src/zm/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -D__STDC_CONSTANT_MACROS -g -O2 -MT zm_user.o -MD -MP -MF .deps/zm_user.Tpo -c -o zm_user.o zm_user.cpp
zm_user.cpp: In constructor 'User::User(char**&)':
zm_user.cpp:38:54: error: 'strncpy' was not declared in this scope
zm_user.cpp:40:39: error: 'atoi' was not declared in this scope
zm_user.cpp:50:47: error: 'strlen' was not declared in this scope
zm_user.cpp: In function 'User* zmLoadUser(const char*, const char*)':
zm_user.cpp:117:32: error: 'exit' was not declared in this scope
zm_user.cpp:124:32: error: 'exit' was not declared in this scope
zm_user.cpp: In function 'User* zmLoadAuthUser(const char*, bool)':
zm_user.cpp:161:39: error: 'getenv' was not declared in this scope
zm_user.cpp:176:32: error: 'exit' was not declared in this scope
zm_user.cpp:183:32: error: 'exit' was not declared in this scope
zm_user.cpp:220:51: error: 'strlen' was not declared in this scope
zm_user.cpp:228:33: error: 'strcmp' was not declared in this scope
make[2]: *** [zm_user.o] Error 1
make[2]: Leaving directory `/usr/src/zm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zm'
make: *** [all] Error 2
.... epic fail
Re: ./configure zoneminder and problems
Posted: Tue Jul 19, 2011 1:01 pm
by Devostator
try to do on another platform ...
Thank you all for your help!
PS: If you know how to fix this, I will be grateful.
Re: ./configure zoneminder and problems
Posted: Tue Jul 19, 2011 2:42 pm
by erict35
Hi
Ubuntu 11.04 64 bits works without any problem with 1.24.4.
I think it's an issue about compilator options.
You must use these :
export CFLAGS="-march=native -O2 -pipe" && \
export CXXFLAGS="${CFLAGS}" && \
export CPPFLAGS="${CFLAGS}"
Regards
Eric
Re: ./configure zoneminder and problems
Posted: Sat Jul 23, 2011 1:36 pm
by niktoo
Hi there !
Same problem for me on Ubuntu 32bits 11.04
nb: i've followed the wiki, exports are ok. Error is still there
Code: Select all
zm_user.cpp: In constructor ‘User::User(char**&)’:
zm_user.cpp:40:54: error: ‘strncpy’ was not declared in this scope
zm_user.cpp:42:39: error: ‘atoi’ was not declared in this scope
zm_user.cpp:52:47: error: ‘strlen’ was not declared in this scope
zm_user.cpp: In function ‘User* zmLoadUser(const char*, const char*)’:
zm_user.cpp:119:32: error: ‘exit’ was not declared in this scope
zm_user.cpp:126:32: error: ‘exit’ was not declared in this scope
zm_user.cpp: In function ‘User* zmLoadAuthUser(const char*, bool)’:
zm_user.cpp:163:39: error: ‘getenv’ was not declared in this scope
zm_user.cpp:178:32: error: ‘exit’ was not declared in this scope
zm_user.cpp:185:32: error: ‘exit’ was not declared in this scope
zm_user.cpp:222:51: error: ‘strlen’ was not declared in this scope
zm_user.cpp:230:33: error: ‘strcmp’ was not declared in this scope
make[2]: *** [zm_user.o] Erreur 1
make[2]: quittant le répertoire « /usr/src/zm/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /usr/src/zm »
make: *** [all] Erreur 2
Re: ./configure zoneminder and problems
Posted: Sat Jul 23, 2011 5:29 pm
by bhmusic76
I've followed "Ubuntu Server 11.04 64-bit with ZoneMinder 1.24.x from SVN" instructions error free until I get to the ./configure zoneminder step and receive similar zm_user.cpp errors regarding some basic 'c' function calls. Could there be a missing 'Include' statement in the zm_user.h header file?
zm_user.cpp:38:54: error: 'strncpy' was not declared in this scope
zm_user.cpp:40:39: error: 'atoi' was not declared in this scope
zm_user.cpp:50:47: error: 'strlen' was not declared in this scope
zm_user.cpp: In function âUser* zmLoadUser(const char*, const char*)â:
zm_user.cpp:117:32: error: 'exit' was not declared in this scope
zm_user.cpp:124:32: error: 'exit' was not declared in this scope
zm_user.cpp: In function âUser* zmLoadAuthUser(const char*, bool)â:
zm_user.cpp:161:39: error: 'getenv' was not declared in this scope
zm_user.cpp:176:32: error: 'exit' was not declared in this scope
zm_user.cpp:183:32: error: 'exit' was not declared in this scope
zm_user.cpp:220:51: error: 'strlen' was not declared in this scope
zm_user.cpp:228:33: error: 'strcmp' was not declared in this scope
make[2]: *** [zm_user.o] Error 1
make[2]: Leaving directory `/usr/src/zm/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/zm'
make: *** [all] Error 2
root@Conbuntu:/usr/src/zm#
Re: ./configure zoneminder and problems
Posted: Sat Jul 23, 2011 11:03 pm
by Devostator
I tried:
http://www.zoneminder.com/wiki/index.ph ... _Cambozola
I used the CD Ubuntu Server 10.04 + PC Celeron etc ...
works)
Re: ./configure zoneminder and problems
Posted: Mon Jul 25, 2011 3:35 pm
by tommy
I'm on PCLinuxOS.
Had the same compile errors, " ...not declared...", with 1.25.0 pre-release.
Added this to zm_user.cpp:
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <ctype.h>
Compiled ok after that.