Make Fails - zm_image.h

Support and queries relating to all previous versions of ZoneMinder
Locked
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Make Fails - zm_image.h

Post by Rayxen »

Hi guys,

I've spent most of the afternoon trying to install ZM and I'm not having much luck, it's just problem after problem. Admittedly, I used XAMPP (http://www.apache-friends.org) instead of installing apache, php etc, manually but I don't think that should cause a problem.

Now i've gone from having problems with missing libjpeg, libmysqlclient and numerous other issues - but i've finally managed to get the configure to complete. I've run the perl script which set the values, i've created the zm database with the schema, but now when attempting to run make, I get:
In file included from zm_jpeg.h:20,
from zm_image.h:37,
from zm_monitor.h:28,
from zmc.cpp:26:
jinclude.h:20:55: jconfig.h: No such file or directory
In file included from zm_image.h:37,
from zm_monitor.h:28,
from zmc.cpp:26:
zm_jpeg.h:21:21: jpeglib.h: No such file or directory
zm_jpeg.h:22:20: jerror.h: No such file or directory
In file included from zm_image.h:37,
from zm_monitor.h:28,
from zmc.cpp:26:
zm_jpeg.h:25: error: variable or field `jpeg_mem_src' declared void
zm_jpeg.h:25: error: `j_decompress_ptr' was not declared in this scope
zm_jpeg.h:25: error: `JOCTET' was not declared in this scope
zm_jpeg.h:25: error: `inbuffer' was not declared in this scope
zm_jpeg.h:25: error: expected primary-expression before "int"
zm_jpeg.h:25: error: initializer expression list treated as compound expression
zm_jpeg.h:26: error: variable or field `jpeg_mem_dest' declared void
zm_jpeg.h:26: error: `j_compress_ptr' was not declared in this scope
zm_jpeg.h:26: error: `JOCTET' was not declared in this scope
zm_jpeg.h:26: error: `outbuffer' was not declared in this scope
zm_jpeg.h:26: error: expected primary-expression before "int"
zm_jpeg.h:26: error: initializer expression list treated as compound expression
In file included from zm_monitor.h:28,
from zmc.cpp:26:
zm_image.h:71: error: ISO C++ forbids declaration of `JSAMPLE' with no type
zm_image.h:71: error: expected `;' before '*' token
zm_image.h:103: error: `JSAMPLE' has not been declared
zm_image.h:104: error: ISO C++ forbids declaration of `p_buffer' with no type
zm_image.h:150: error: ISO C++ forbids declaration of `JSAMPLE' with no type
zm_image.h:150: error: `JSAMPLE' declared as an `inline' field
zm_image.h:150: error: expected `;' before '*' token
zm_image.h:151: error: expected `;' before "inline"
zm_image.h:151: error: ISO C++ forbids declaration of `JSAMPLE' with no type
zm_image.h:151: error: `JSAMPLE' declared as an `inline' field
zm_image.h:151: error: expected `;' before '*' token
zm_image.h:153: error: expected `;' before "inline"
zm_image.h:203: error: `JOCTET' has not been declared
zm_image.h:203: error: ISO C++ forbids declaration of `inbuffer' with no type
zm_image.h:204: error: `JOCTET' has not been declared
zm_image.h:204: error: ISO C++ forbids declaration of `outbuffer' with no type
zm_image.h: In constructor `Image::Image()':
zm_image.h:91: error: `buffer' undeclared (first use this function)
zm_image.h:91: error: (Each undeclared identifier is reported only once for each function it appears in.)
zm_image.h: In constructor `Image::Image(const char*)':
zm_image.h:98: error: `buffer' undeclared (first use this function)
zm_image.h: In constructor `Image::Image(int, int, int, int*)':
zm_image.h:114: error: `buffer' undeclared (first use this function)
zm_image.h:119: error: `JSAMPLE' has not been declared
zm_image.h: In copy constructor `Image::Image(const Image&)':
zm_image.h:132: error: `buffer' undeclared (first use this function)
zm_image.h:132: error: `JSAMPLE' has not been declared
zm_image.h:133: error: 'const class Image' has no member named 'buffer'
zm_image.h: In destructor `Image::~Image()':
zm_image.h:141: error: `buffer' undeclared (first use this function)
zm_image.h: In member function `void Image::Assign(int, int, int, unsigned char*)':
zm_image.h:164: error: `buffer' undeclared (first use this function)
zm_image.h:165: error: `JSAMPLE' has not been declared
zm_image.h: In member function `void Image::Assign(const Image&)':
zm_image.h:182: error: `buffer' undeclared (first use this function)
zm_image.h:183: error: `JSAMPLE' has not been declared
zm_image.h:187: error: 'const class Image' has no member named 'buffer'
zm_image.h: In member function `void Image::CopyBuffer(const Image&)':
zm_image.h:193: error: `buffer' undeclared (first use this function)
zm_image.h:193: error: 'const class Image' has no member named 'buffer'
zm_image.h: In member function `Image& Image::operator=(const unsigned char*)':
zm_image.h:197: error: `buffer' undeclared (first use this function)
zm_image.h: In member function `void Image::Clear()':
zm_image.h:220: error: `buffer' undeclared (first use this function)
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/usr/local/src/zm-1.19.5/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/zm-1.19.5'
make: *** [all] Error 2
And to be honest with you, I really have no idea where to go from here. Does anyone have any ideas? Thanks for any help you can provide!
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

Now for a bit of information, I'm using:

- ZoneMinder 1.19.5
- GCC 3.4.3
- ffmpeg 0.4.9-pre1
- mysql 4.1.7

I have also tried to use ffmpeg 0.4.8 but that failed to compile ... I think this might be related to ffmpeg - perhaps I haven't got the right files.. or I need the libraries and headers? I'm pretty new to this, but have been able to get this far, and I'm not going to give up.

This is the configure parameters I used:

/configure --with-mysql=/opt/lampp/lib/mysql/ --with-webdir=/opt/lampp/htdocs/zm/ --with-cgidir=/opt/lampp/cgi-bin/ --with-ffmpeg=/usr/local/src/ffmpeg-0.4.9-pre1/

Have i got that right? Or should I be pointing ffmpeg to the ffmpeg binaries? Thanks
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

Ok, I'm very slowly trying to make sense of this, it seems to be a problem with libjpeg, rather than with ffmpeg. I've reconfigured and 'make install''ed libjpeg again, and I get this error:
/usr/bin/install -c -m 644 ./cjpeg.1 /usr/man/man1/cjpeg.1
/usr/bin/install: cannot create regular file `/usr/man/man1/cjpeg.1': No such file or directory
make: *** [install] Error 1
Now I got that last time, but I just created the /usr/man/man1/ directory, and it worked without a problem (when I re-ran it). Perhaps that wasn't the correct thing to do? I'll look into this, to see if I can work out what is causing it.
fra&fra
Posts: 12
Joined: Tue Nov 23, 2004 3:41 pm

Post by fra&fra »

I have the files (jconfig.h, jerror.h and jpeglib.h) in /usr/include directory. Make sure that your libjpeg's installation put this file in the right directory.

In my case i have no problem.

Bye
Rayxen
Posts: 28
Joined: Thu Nov 25, 2004 7:14 am
Contact:

Post by Rayxen »

Thanks for the suggestion and the very fast response. I hadn't noticed I got a reply, before attempting to tackle the situation some more myself.

I re-extracted the libjpeg-6b archive, reconfigured it with the following options:
./configure --enable-static --enable-shared --prefix=/usr
Then ran, make and make install. I attempted another make againf or ZM and it worked. I played around with the above options a little bit, ensured I did make clean before attempting make again and got it all to work. I still had to manually create that man/man1 directory, but it doesn't seem to have caused a problem.

So everything is working so far, I have the ZM page fired up, waiting for me to authenticate. I just thought I had better reply here with my solution, should anyone else have the problem in the future. Thanks again fra&fra for your quick response. The problem appeared to lie in the initially configuration installed the files at:

/usr/lib/jpeg-6b/

Wheras my subsequent installation installed them at:

/usr/include/

So you (fr&fra) were definately on the right track. Cheers, now let's hope everything else runs smoothly!
Locked