./configure zoneminder and problems

Forum for questions and support relating to the 1.24.x releases only.
Locked
Devostator
Posts: 11
Joined: Tue Jun 28, 2011 1:15 pm

./configure zoneminder and problems

Post 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.
Last edited by Devostator on Sat Jul 23, 2011 8:39 pm, edited 2 times in total.
User avatar
erict35
Posts: 12
Joined: Thu May 26, 2011 9:08 am
Location: Rennes FRANCE

Re: configure: error: zm requires libjpeg.a

Post 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
Devostator
Posts: 11
Joined: Tue Jun 28, 2011 1:15 pm

Re: configure: error: zm requires libjpeg.a

Post 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.
mastertheknife
Posts: 678
Joined: Wed Dec 16, 2009 4:32 pm
Location: Israel

Re: configure: error: zm requires libjpeg.a

Post by mastertheknife »

You may need to install libjpeg-dev (or libjpeg62-dev)

mastertheknife
Kfir Itzhak.
Devostator
Posts: 11
Joined: Tue Jun 28, 2011 1:15 pm

Re: configure: error: zm requires libjpeg.a

Post 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?
User avatar
erict35
Posts: 12
Joined: Thu May 26, 2011 9:08 am
Location: Rennes FRANCE

Re: ./configure zoneminder and problems

Post 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
Devostator
Posts: 11
Joined: Tue Jun 28, 2011 1:15 pm

Re: ./configure zoneminder and problems

Post 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
Devostator
Posts: 11
Joined: Tue Jun 28, 2011 1:15 pm

Re: ./configure zoneminder and problems

Post 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.
User avatar
erict35
Posts: 12
Joined: Thu May 26, 2011 9:08 am
Location: Rennes FRANCE

Re: ./configure zoneminder and problems

Post 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
niktoo
Posts: 1
Joined: Sat Jul 23, 2011 1:33 pm

Re: ./configure zoneminder and problems

Post 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
bhmusic76
Posts: 2
Joined: Sat Jul 23, 2011 4:42 pm

Re: ./configure zoneminder and problems

Post 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#
Devostator
Posts: 11
Joined: Tue Jun 28, 2011 1:15 pm

Re: ./configure zoneminder and problems

Post by Devostator »

I tried:

http://www.zoneminder.com/wiki/index.ph ... _Cambozola

I used the CD Ubuntu Server 10.04 + PC Celeron etc ...

works)
tommy
Posts: 45
Joined: Sun Aug 17, 2003 2:58 am

Re: ./configure zoneminder and problems

Post 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.
Locked