rtsp is broken on amd64 machines Needs patch added to ebuild for amd64: http://www.zoneminder.com/forums/viewtopic.php?t=16060 (see this link for full description of the issue) diff -ur ZoneMinder-1.24.2.old/src/zm.h ZoneMinder-1.24.2/src/zm.h --- ZoneMinder-1.24.2.old/src/zm.h 2009-03-20 05:07:00.000000000 -0700 +++ ZoneMinder-1.24.2/src/zm.h 2010-06-29 10:45:24.000000000 -0700 @@ -17,6 +17,8 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // +#include "stdint.h" + #ifndef ZM_H #define ZM_H @@ -34,14 +36,14 @@ #endif } -typedef unsigned char U8; -typedef unsigned short U16; -typedef unsigned long U32; -typedef unsigned long long U64; - -typedef signed char S8; -typedef signed short S16; -typedef signed long S32; -typedef signed long long S64; +typedef uint8_t U8; +typedef uint16_t U16; +typedef uint32_t U32; +typedef uint64_t U64; + +typedef int8_t S8; +typedef int16_t S16; +typedef int32_t S32; +typedef int64_t S64; #endif // ZM_H Tested patch, and it corrects the problem Reproducible: Always Steps to Reproduce: 1.emerge -v zoneminder-1.24.2 2.configure zoneminder to work with a rtsp camera 3.fails to display video. Actual Results: zm_debug.log reports numerous errors Manaully applied patch. recompiled and problem disappeared. Note this problem only affects amd64 64-bit machines. Perhaps the patch can be applied in the ebuild for only 64-bit systems
(In reply to comment #0) > Perhaps the patch can be applied in the ebuild for only 64-bit systems The patch you pasted here looks like it should be a no-op on 32-bit machines, so unconditional application of the patch should be fine.
(In reply to comment #1) > The patch you pasted here looks like it should be a no-op on 32-bit machines, > so unconditional application of the patch should be fine. It doesn't appear to work on 32-bit machines, at least my 32-bit gentoo vm: In file included from zmc.cpp:24: zm.h:37: error: 'uint8_t' does not name a type zm.h:38: error: 'uint16_t' does not name a type zm.h:39: error: 'uint32_t' does not name a type zm.h:40: error: 'uint64_t' does not name a type make[2]: *** [zmc.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/www-misc/zoneminder-1.24.2/work/ZoneMinder-1.24.2/src'
(In reply to comment #2) > It doesn't appear to work on 32-bit machines, at least my 32-bit gentoo vm: Weird. I did not test it (and have never even looked at Zoneminder), but it ought to work. Could you attach (or put in a pastebin) a post-processed copy of the failed file? Generate it by invoking the compiler with the same options, but change -c to -E and drop any -o <file>.
(In reply to comment #3) > (In reply to comment #2) > > It doesn't appear to work on 32-bit machines, at least my 32-bit gentoo vm: > Weird. I did not test it (and have never even looked at Zoneminder), but it > ought to work. Could you attach (or put in a pastebin) a post-processed copy > of the failed file? Generate it by invoking the compiler with the same > options, but change -c to -E and drop any -o <file>. Not sure what you want me to do here. Zone minder uses a ./configure script to compile zoneminder. I believe its just that the datatypes such as "uint8_t" aren't available on 32-bit systems. The only other change I have that is non-standard is "CXXFLAGS=-D__STDC_CONSTANT_MACROS" to address the issue with ffmpeg-0.6 (see http://bugs.gentoo.org/show_bug.cgi?id=320081) The same patch on a x86_64 system compiles without any errors. Its has to be a include header issue, but I don't know where to apply the correct change. below is the configure script options: Compiling source in /var/tmp/portage/www-misc/zoneminder-1.24.2/work/ZoneMinder-1.24.2 ... ./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-libarch=lib --with-mysql=/usr --with-ffmpeg --with-webdir=/var/www/zoneminder/htdocs --with-cgidir=/var/www/zoneminder/cgi-bin --with-webuser=apache --with-webgroup=apache --enable-debug=no --enable-crashtrace=no compile stalls right at the beginning: make all-recursive make[1]: Entering directory `/var/tmp/portage/www-misc/zoneminder-1.24.2/work/ZoneMinder-1.24.2' Making all in src make[2]: Entering directory `/var/tmp/portage/www-misc/zoneminder-1.24.2/work/ZoneMinder-1.24.2/src' i686-pc-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -Iyes/include -Wall -Wno-sign-compare -fno-inline -Iyes/include -frepo -D__STDC_CONSTANT_MACROS -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp In file included from zmc.cpp:24: zm.h:37: error: 'uint8_t' does not name a type zm.h:38: error: 'uint16_t' does not name a type zm.h:39: error: 'uint32_t' does not name a type zm.h:40: error: 'uint64_t' does not name a type make[2]: *** [zmc.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/www-misc/zoneminder-1.24.2/work/ZoneMinder-1.24.2/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/www-misc/zoneminder-1.24.2/work/ZoneMinder-1.24.2' make: *** [all] Error 2 FWIW: After messing around with zm for a while on a x86_64 system I ran into a another issue with shm. Under the x86_64 system it does properly set the ipc share permissions to the correct user. if I start zm under the user apache (default), ipcs -m reports the owner as root. I checked and all of the zm processes are running under apache. This breaks zm as when /usr/bin/zmc tries to connect to the shm, it gets access denied because the shm owner is root. On the 32-bit vm ipcs -m shows the owner as appache. I looked in zm_monitor.cpp to see if where it was setting the owner and there is no call other than shmget. I suspect the shmget is suppose to set the shm handle owner to same user as the calling process. I am not sure if this is a bug in x86_64 system or in zoneminder. Another words even if this apache is applied its still broken because of the ipc shm owner glitch. I would show the the error, but I recompiled zm on my x86_64 system using mmap. That seems to work better, but its not perfect. For now I am going with a 32-bit vm to get around this problem. I think it may be best to wait until the developer updates zm to work on 64-bit systems. Thanks.
Removed from main tree.
Reopened for tracking and hopefully zoneminder revival
Looking at the code this should be fixed in 1.25.0