compile error under openSuse 12.1

Forum for questions and support relating to the 1.25.x releases only.
Post Reply
norzaw
Posts: 7
Joined: Wed Aug 26, 2009 11:54 am

compile error under openSuse 12.1

Post by norzaw » Sun Dec 04, 2011 12:49 am

Hello,

after upgrading to Suse 12.1 I didn't manage to get zm work again.

Since the .rpm installation doesn't work (the rpm insists on perl=5.12.3 but I can only find perl 5.14.2) I tried the "compile from source way".

Running

Code: Select all

./configure --with-libarch=lib64 --with-mysql=/usr --with-ffmpeg=/usr/lib64 --with-webdir=/srv/www/htdocs --with-cgidir=/srv/www/cgi-bin
seems to go thru without errors.

But calling make afterwards gives compile errors:

Code: Select all

g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/lib64/include -Wall -Wno-sign-compare -fno-inline -I/usr/lib64/include   -g -O2 -MT zm_local_camera.o -MD -MP -MF .deps/zm_local_camera.Tpo -c -o zm_local_camera.o zm_local_camera.cpp
zm_local_camera.cpp: In static member function ‘static bool LocalCamera::GetCurrentSettings(const char*, char*, int, bool)’:
zm_local_camera.cpp:774:22: error: ‘PATH_MAX’ was not declared in this scope
zm_local_camera.cpp:779:21: error: ‘queryDevice’ was not declared in this scope
zm_local_camera.cpp:781:22: error: ‘queryDevice’ was not declared in this scope
zm_local_camera.cpp:782:29: error: ‘queryDevice’ was not declared in this scope
zm_local_camera.cpp:799:67: error: ‘queryDevice’ was not declared in this scope
zm_local_camera.cpp:801:54: error: ‘queryDevice’ was not declared in this scope
zm_local_camera.cpp:811:92: error: ‘queryDevice’ was not declared in this scope
zm_local_camera.cpp:936:91: error: ‘queryDevice’ was not declared in this scope
zm_local_camera.cpp:961:82: error: ‘queryDevice’ was not declared in this scope
make[2]: *** [zm_local_camera.o] Error 1
make[2]: Leaving directory `/download/Linux/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/download/Linux/ZoneMinder-1.25.0'
make: *** [all] Error 2
Hmmmm .....

User avatar
monex
Posts: 169
Joined: Mon Jan 22, 2007 1:10 pm

Re: compile error under openSuse 12.1

Post by monex » Sun Dec 04, 2011 1:11 pm

Hi,

where did you take the RPMs from? The RPMs in http://liquid-co.de/pub/suse/repositories/12.1/ requires perl 5.14.2 verified with:

Code: Select all

rpm -qp --requires ZoneMinder-MP-1.25.0-7.1.x86_64.rpm
I've successfully installed the RPM without these dependency issue so I have no idea where this issue might come from.

Anyway to fix your problem you have to apply the following patch:

Code: Select all

diff --git a/src/zm_local_camera.cpp b/src/zm_local_camera.cpp
index da3c160..9667a36 100644
--- a/src/zm_local_camera.cpp
+++ b/src/zm_local_camera.cpp
@@ -29,6 +29,7 @@
 #include <unistd.h>
 #include <sys/mman.h>
 #include <errno.h>
+#include <limits.h>
 
 static int vidioctl( int fd, int request, void *arg )
 {
-- 
1.7.3.4
Hope this helps

Monex
Image

norzaw
Posts: 7
Joined: Wed Aug 26, 2009 11:54 am

Re: compile error under openSuse 12.1

Post by norzaw » Sun Dec 04, 2011 4:26 pm

monex wrote:Hi,

where did you take the RPMs from? The RPMs in /12.1/ requires perl 5.14.2 verified with:
O.k., it was some sort of "timing problem" :wink:
I upgraded my Suse to 12.1 as soon as 12.1 was officially released. At that time, when I was editing all the repo-urls, the "12.1" branch didn't yet exist.
So I kept the "/11.4/" URL.

I will try the 12.1 repo as soon as I can find some time

Thanks anyway !

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests