Page 1 of 1

Errors during rebuild

Posted: Thu Mar 03, 2011 10:47 pm
by pete
I lost my old zm system so I'm trying to build a new one. Installed Opensuse 11.3 and downloaded the 1.24 zm source archive. I had to install about a dozen more items during configure, but it finally completed successfully using the following options.

./configure --with-webdir=/var/www/zm --with-cgidir=/var/www/cgi-bin

Now when I run make, it errors immediately with:

fizzy:/home/zm/ZoneMinder-1.24.2 # make
make all-recursive
make[1]: Entering directory `/home/zm/ZoneMinder-1.24.2'
Making all in src
make[2]: Entering directory `/home/zm/ZoneMinder-1.24.2/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -frepo -g -O2 -MT zmc.o -MD -MP -MF ".deps/zmc.Tpo" -c -o zmc.o zmc.cpp; \
then mv -f ".deps/zmc.Tpo" ".deps/zmc.Po"; else rm -f ".deps/zmc.Tpo"; exit 1; fi
In file included from zm_image.h:26:0,
from zm_monitor.h:25,
from zmc.cpp:28:
zm_jpeg.h:39:85: error: declaration of C function ‘void jpeg_mem_src(jpeg_decompress_struct*, const JOCTET*, int)’ conflicts with
/usr/include/jpeglib.h:959:14: error: previous declaration ‘void jpeg_mem_src(jpeg_decompress_struct*, unsigned char*, long unsigned int)’ here
zm_jpeg.h:40:81: error: declaration of C function ‘void jpeg_mem_dest(jpeg_compress_struct*, JOCTET*, int*)’ conflicts with
/usr/include/jpeglib.h:956:14: error: previous declaration ‘void jpeg_mem_dest(jpeg_compress_struct*, unsigned char**, long unsigned int*)’ here
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/home/zm/ZoneMinder-1.24.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/zm/ZoneMinder-1.24.2'
make: *** [all] Error 2

Posted: Fri Mar 04, 2011 10:15 am
by zoneminder
The libjpeg people added some memory based functions which they happened to name exactly the same as the ones in ZM. You might want to try the 1.24.3 preview release available from the thread in this forum. If not then a simple workaround is to rename all references and declarations of jpeg_mem_src/dest to zm_jpeg_mem_src/dest.

Posted: Sat Mar 05, 2011 9:52 pm
by pete
Thanks. Downloaded the 1.24.3 build and got it to compile. If you use opensuse, make sure that you include the ZM_SSL_LIB option with configure as make will complain about not finding libcrypt and md5 stuff if you don't.

So I got everything built and installed, apache is up, running, and tested with a basic index.html, installed the tables in mysql, ran zmpkg.pl start, and tried to load index.php. I get a blank screen with the following in my apache error_log file:

[Sat Mar 05 07:35:18 2011] [error] [client 192.168.1.100] PHP Parse error: syntax error, unexpected $end in /var/www/htdocs/includes/functions.php on line 2319

So I went and looked in functions.php and line 2319 is the end? I'm getting close but this error is a bit ambiguous. Can someone offer some advice as to what the problem might be? Thanks again for the help.

Posted: Sat Mar 05, 2011 9:54 pm
by mastertheknife
Verify php short tags enabled in your php.ini

mastertheknife

Posted: Sat Mar 05, 2011 10:42 pm
by pete
That did it. Got a zm screen now and now I can start adding cameras. Thanks!

Posted: Fri Mar 11, 2011 12:11 am
by pete
OK, got the basic package up and running and then I figured I'd install ffmpeg and recompile. Got the code to build and install OK w/o errors but when I run zmpkg.pl start now, I get the following in the messages file:

Mar 10 17:03:02 fizzy zmpkg[4204]: ERR [Unable to run "sudo -u apache /usr/local/bin/zmfix", output is ""]
Mar 10 17:03:28 fizzy zmfix[4223]: ERR [Attempt to fetch string value for ZM_COLOUR_JPEG_FILES, actual type is boolean. Try running 'zmupdate.pl -f' to reload config.]

I ran the zmupdate.pl -f and it seems to complete successfully, but no change in the error. Do I need to run something else or change a configuration somewhere? Thanks.

Posted: Fri Mar 11, 2011 12:53 am
by pete
One more thing. zm was shut down when I ran zmupdate.pl -f. Have done some searching on the forums and this issue seems to happen with rebuilds and upgrades. I've tried restarting both apache and mysql, but still having the same problem. Thanks.