libpcre.a?

Support and queries relating to all previous versions of ZoneMinder
Locked
reve
Posts: 16
Joined: Sun Mar 28, 2004 7:01 pm

libpcre.a?

Post by reve »

I'm going through the install process....fixed the php problems, probably fixed the shmmax problems...and now I'm stuck.

I have defined a Monitor using a remote Axis 2420 camera. It already has motion detection built in...but it is all I have to hand. When I run

zmc -m 1

I get the following in the syslog:

Mar 29 01:18:12 pig zmc-m1[1161]: INF [Debug Level = 0, Debug Log = ]
Mar 29 01:18:12 pig zmc-m1[1161]: INF [Starting Capture]
Mar 29 01:18:12 pig zmc-m1[1161]: FAT [You must have libpcre.a installed to use remote cameras]

Seems like an easy fix - but I do have libpcre.a in /usr/lib. In terms of the packages, I have pcre and pcre-devel both 3.9-5 installed.

When I try and look at the monitor directly from the console, I get:

Mar 29 01:31:40 pig zms[1873]: INF [Debug Level = 0, Debug Log = ]
Mar 29 01:31:40 pig zms[1873]: ERR [Can't shmget: Permission denied]
Mar 29 01:31:43 pig zmu[1881]: ERR [Can't shmget: Permission denied]
Mar 29 01:31:46 pig zmu[1888]: ERR [Can't shmget: Permission denied]
Mar 29 01:31:49 pig zmu[1895]: ERR [Can't shmget: Permission denied]

Apache is running as 'apache' , and I am running the zmc command as 'root'.

Version information:

Zoneminder 1.1.9.1
Apache: 2.0.40
Redhat 8.0 (+ Ximian Desktop)
Kernel 2.4.22

If anyone has any ideas, they'd be gratefully received. The program looks awesome, and I'd love to be using it in anger!

Thanks

Rupert Eve
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: libpcre.a?

Post by zoneminder »

Hi Rupert,

The first thing to check is where pcre actually is. If you do a 'locate' on libpcre.a and pcre.h what do you get? Also when you ran 'configure' what was the output? This should check for the existence or otherwise of pcre and communicate it's whereabouts to the rest of the build process.

Phil,
reve
Posts: 16
Joined: Sun Mar 28, 2004 7:01 pm

Re: libpcre.a?

Post by reve »

Thanks for the speedy reply...I'm back in front of the machine now.

Relevant output from ./configure:

checking how to run the C++ preprocessor... g++ -E
checking pcre/pcre.h usability... yes
checking pcre/pcre.h presence... yes
checking for pcre/pcre.h... yes
checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
checking whether round is declared... yes
checking whether strsignal is declared... yes
checking for jpeg_start_compress in -ljpeg... yes
checking for compress in -lz... yes
checking for dlsym in -ldl... yes
checking for mysql_init in -lmysqlclient... yes
checking for pcre_compile in -lpcre... yes
checking for avcodec_init in -lavcodec... no

It seems a bit ambiguous...! Output from locate:

[reve@pig reve]$ locate pcre.h
/usr/include/pcre/pcre.h
[reve@pig reve]$ locate libpcre.a
/usr/lib/libpcre.a
[reve@pig reve]$

It all seems OK to me - if I was better at understanding the configure script...I might understand what I need to do.

Thanks

Rupert
reve
Posts: 16
Joined: Sun Mar 28, 2004 7:01 pm

Re: libpcre.a?

Post by reve »

Thanks for the speedy reply...I'm back in front of the machine now.

Relevant output from ./configure:

checking how to run the C++ preprocessor... g++ -E
checking pcre/pcre.h usability... yes
checking pcre/pcre.h presence... yes
checking for pcre/pcre.h... yes
checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
checking whether round is declared... yes
checking whether strsignal is declared... yes
checking for jpeg_start_compress in -ljpeg... yes
checking for compress in -lz... yes
checking for dlsym in -ldl... yes
checking for mysql_init in -lmysqlclient... yes
checking for pcre_compile in -lpcre... yes
checking for avcodec_init in -lavcodec... no

It seems a bit ambiguous...! Output from locate:

[reve@pig reve]$ locate pcre.h
/usr/include/pcre/pcre.h
[reve@pig reve]$ locate libpcre.a
/usr/lib/libpcre.a
[reve@pig reve]$

It all seems OK to me - if I was better at understanding the configure script...I might understand what I need to do.

Thanks

Rupert
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: libpcre.a?

Post by zoneminder »

This looks like pcre is being correctly detected, can you look in config.h and search for PCRE and see what it says.

Cheers,

Phil,
reve
Posts: 16
Joined: Sun Mar 28, 2004 7:01 pm

Re: libpcre.a?

Post by reve »

Phil

Here are the relevant bits of config.h:

/* Define to 1 if you have the `mysqlclient' library (-lmysqlclient). */
#define HAVE_LIBMYSQLCLIENT 1

/* Define to 1 if you have the `pcre' library (-lpcre). */
#define HAVE_LIBPCRE 1

/* Define to 1 if you have the `z' library (-lz). */
#define HAVE_LIBZ 1

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the <pcre.h> header file. */
/* #undef HAVE_PCRE_H */

/* Define to 1 if you have the <pcre/pcre.h> header file. */
#define HAVE_PCRE_PCRE_H 1

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

Obvious question....what is the #undef doing when I seem to have the file... Tomorrow morning I will try again forcing in a #define and recompiling. Bit late now....

Thanks

Rupert
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Re: libpcre.a?

Post by zoneminder »

Hi Rupert,

<b>#undef HAVE_PCRE_H</b> just means that /usr/include/pcre.h wasn't found, the line <b>#define HAVE_PCRE_PCRE_H 1</b> means that /usr/include/pcre/pcre.h was found and will be used instead. The line <b>#define HAVE_LIBPCRE 1</b> is what is used to determine whether the library was found or not and is what is appears is not defined for your original error message to have appeared.

Phil,
reve
Posts: 16
Joined: Sun Mar 28, 2004 7:01 pm

Re: libpcre.a?

Post by reve »

OK - I think I know what might have happened. I installed pcre-devel when I saw the first error - so it is likely that that pcre.h was not around for the original compile - so no headers, no library. I will re-compile the whole thing tonight and have another go. There weren't any obvious errors in the ./configure output - but of course I did not keep it.

I'll let you know - hopefully you'll be able to add a 2420 to the database soon....

Thanks

Rupert
reve
Posts: 16
Joined: Sun Mar 28, 2004 7:01 pm

Re: libpcre.a?

Post by reve »

Phil

I rebuilt the whole thing from scratch - and the pcre problem is fixed. There are other problems with camera, but I will poke arond with settings before bothering you again....

Thanks for your help...

Rupert
Locked