Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 320081 - www-misc/zoneminder-1.24.2 fails to build with ffmpeg-0.6
Summary: www-misc/zoneminder-1.24.2 fails to build with ffmpeg-0.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Andreas K. Hüttel
URL:
Whiteboard: [dilfridge overlay]
Keywords:
Depends on: 359605
Blocks: ffmpeg-0.6
  Show dependency tree
 
Reported: 2010-05-17 01:30 UTC by Shawn Rutledge
Modified: 2011-09-17 14:37 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
updated ebuild appending CXXFLAG(S) (zoneminder-1.24.2.ebuild,4.13 KB, text/plain)
2011-03-22 10:30 UTC, cach0rr0
Details
re-updated ebuild (zoneminder-1.24.2.ebuild,4.06 KB, text/plain)
2011-03-22 10:45 UTC, cach0rr0
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Rutledge 2010-05-17 01:30:37 UTC
Apparently some library is being left out of the link step.

x86_64-pc-linux-gnu-g++ -frepo -march=athlon64 -O2 -pipe -fno-ident -fomit-frame-pointer  -Lyes/lib64 -L/usr/lib64/mysql -Wl,-O1  -o zmc zmc.o zm_box.o zm_buffer.o zm_camera.o zm_comms.o zm_config.o zm_coord.o zm.o zm_db.o zm_debug.o zm_event.o zm_exception.o zm_file_camera.o zm_ffmpeg_camera.o zm_image.o zm_jpeg.o zm_local_camera.o zm_monitor.o zm_ffmpeg.o zm_mpeg.o zm_poly.o zm_regexp.o zm_remote_camera.o zm_remote_camera_http.o zm_remote_camera_rtsp.o zm_rtp.o zm_rtp_ctrl.o zm_rtp_data.o zm_rtp_source.o zm_rtsp.o zm_sdp.o zm_signal.o zm_stream.o zm_thread.o zm_time.o zm_timer.o zm_user.o zm_utils.o zm_zone.o  -lz -lbz2 -lswscale -lavformat -lavcodec -lavutil -lpcre -lgnutls-openssl -ldl -lpthread -ljpeg -lmysqlclient                                                                                                                                 
zm_comms.o: In function `Select::calcMaxFd()':                                                                                                 
zm_comms.cpp:(.text+0x168): undefined reference to `std::set<CommsBase*, std::less<CommsBase*>, std::allocator<CommsBase*> >::begin() const'   
zm_comms.cpp:(.text+0x186): undefined reference to `std::_Rb_tree_const_iterator<CommsBase*>::operator++(int)'                                 
zm_comms.cpp:(.text+0x18e): undefined reference to `std::set<CommsBase*, std::less<CommsBase*>, std::allocator<CommsBase*> >::end() const'     
zm_comms.cpp:(.text+0x19e): undefined reference to `std::_Rb_tree_const_iterator<CommsBase*>::operator!=(std::_Rb_tree_const_iterator<CommsBase*> const&) const'                                                                                                                              
zm_comms.cpp:(.text+0x1aa): undefined reference to `std::_Rb_tree_const_iterator<CommsBase*>::operator*() const'                               
zm_comms.cpp:(.text+0x1c2): undefined reference to `std::_Rb_tree_const_iterator<CommsBase*>::operator*() const'                               
zm_comms.cpp:(.text+0x1e0): undefined reference to `std::set<CommsBase*, std::less<CommsBase*>, std::allocator<CommsBase*> >::begin() const'   
zm_comms.cpp:(.text+0x1f6): undefined reference to `std::_Rb_tree_const_iterator<CommsBase*>::operator++(int)'                                 
zm_comms.cpp:(.text+0x1fe): undefined reference to `std::set<CommsBase*, std::less<CommsBase*>, std::allocator<CommsBase*> >::end() const'     
zm_comms.cpp:(.text+0x20d): undefined reference to `std::_Rb_tree_const_iterator<CommsBase*>::operator!=(std::_Rb_tree_const_iterator<CommsBase

..... and many more

Reproducible: Always

Steps to Reproduce:
emerge zoneminder



I tried this on 2 different systems with the same result.  Here's the info from one of them:


Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.33-gentoo x86_64)
=================================================================                           
System uname: Linux-2.6.33-gentoo-x86_64-Intel-R-_Core-TM-_i7_CPU_860_@_2.80GHz-with-gentoo-1.12.13
Timestamp of tree: Fri, 14 May 2010 19:30:01 +0000                                                 
ccache version 2.4 [enabled]                                                                       
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.4_p6-r1, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fno-ident -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O2 -pipe -fno-ident -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests buildpkg ccache distlocks fixpackages metadata-transfer news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1"
LINGUAS="en ru"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="16bit 3dnow 3dnowext X a52 aac acct acl acpi alac alisp alsa amd64 amr amrnb amrwb ao apache2 assistant astribank audiofile autoipd automount autostart avahi bash-completion berkdb bidi bineditor bonjour bookmarks bzip2 cairo calendar cdb cdda cddb cdio cdparanoia cdr cleartype cli consolekit contactnotes cracklib crypt cups curl cxx daap dbus device-mapper dga dia dirac djvu docbook dot dri dssi dts dv dvb dvbplayer dvd dvdnav dvdr dvdread eckb1 ecmark ecmark2 ecmark3 ecmg2 ecoslec ecsteve ecsteve2 encode espeak exif expat fame fbcon festival ffmpeg fftw flac flite fortran fts3 fuse garmin gcj gd gdbm ggi gif gimp git glib glitz gnome gpgme gpm graphviz gs gstreamer gtk h323 hal handbook hddtemp heterogeneous howl howl-compat html httpd hyperestraier iconv id3 id3tag idn image imagemagick imap imlib inkjar inotify ipod ipv6 irda jabber jack java6 jbig jfs jpeg jpeg2k kate kde konqueror kqemu ladspa lame laptop lash latex lcd lcms ldap libass libsamplerate lirc lircsettings live lm_sensors log4j lv2 lzo mad madwifi maps matroska mbox mbrola mdnsresponder-compat melt midi mikmod mjpeg mmx mmxext mng modplug modules mono mozdevelop mp2 mp3 mp3rtp mp4 mpeg mplayer mudflap multilib mysql nas ncurses nemesi net netjack network nls nntp nptl nptlonly nsplugin ntfs ntp nuv nxclient objc objc++ objc-gc ogg openal opengl openmp openstreetmap optimized-qmake oscar pam pcre pda pdf perl phonon php plotutils png pop portaudio posix postgres postproc postscript ppds pppd pri pulseaudio python qt3support qt4 qtscript quicktime quotes rar rdesktop readline realmedia reflection replaygain romio rrdcgi rrdtool rss rtc rtf rtsp samba scanner schroedinger scripting sdl sdl-image sdl-sound sdlaudio sensord server session shorten shout sidebar skype slang slp smime smp smtp sndfile sockets soundtouch speex spl sql sqlite sqlite3 srt sse sse2 ssl startup-notification stream subtitles subversion svg swig sysfs tcpd teletext test-programs theora threads threadsafe thumbnail tiff timidity transcode transparent-proxy truetype twolame udev unicode upnp urandom usb v4l v4l2 vamp vcd vcdinfo vcdx vim-syntax vim-with-x visualization vlm vnc vorbis watchdog webdav webkit wifi wmf x264 xanim xcb xext xface xfs xine xml xmlpatterns xorg xosd xscreensaver xv xvid xvmc yahoo yv12 zaptel zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INITNG_PLUGINS="also bash_launcher chdir chroot conflict cpout critical ctrlaltdel daemon_clean debug_commands envparser find fmon fstat history idleprobe initctl interactive iparser last limit lockfile logfile netdev netprobe ngc4 ngcs nge pause provide reload renice rlparser simple_launcher stcmd stdout suid syncron syslog sysreq unneeded usplash" INPUT_DEVICES="evdev keyboard mouse" KERNEL="linux" LCD_DEVICES="noritakevfd" LINGUAS="en ru" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="vesa v4l fbdev nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Shawn Rutledge 2010-05-17 04:31:54 UTC
There is a lame excuse for this bug though:

http://www.zoneminder.com/wiki/index.php/FAQ#I_cannot_build_ZoneMinder_and_am_getting_lots_of_undefined_C.2B.2B_template_errors

After turning off ccache, I get different errors:

In file included from zm_local_camera.cpp:20:                                                                                 
zm_local_camera.h:96: error: ‘PixelFormat’ does not name a type                                                               
zm_local_camera.h:97: error: ‘PixelFormat’ does not name a type                                                               
zm_local_camera.h:98: error: ISO C++ forbids declaration of ‘AVFrame’ with no type                                            
zm_local_camera.h:98: error: expected ‘;’ before ‘*’ token                                                                    

(etc)
Comment 2 Shawn Rutledge 2010-05-17 04:44:40 UTC
So the next couple of problems are fixed by adding this in zm_local_camera.h:

#if HAVE_LIBSWSCALE
#include <libswscale/swscale.h>
#endif
#include <libavcodec/avcodec.h>

(I'm sure the avcodec needs to be #if'd as well)

And then we have 


collect: relinking
zm_local_camera.o: In function `LocalCamera::Capture(Image&)':
zm_local_camera.cpp:(.text+0x1c1b): undefined reference to `sws_scale(SwsContext*, unsigned char const* const*, int const*, int, int, unsigned char* const*, int const*)'
zm_local_camera.cpp:(.text+0x20b1): undefined reference to `sws_getContext(int, int, PixelFormat, int, int, PixelFormat, int, SwsFilter*, SwsFilter*, double const*)'
zm_local_camera.cpp:(.text+0x20c6): undefined reference to `avcodec_alloc_frame()'
zm_local_camera.cpp:(.text+0x20e4): undefined reference to `avpicture_get_size(PixelFormat, int, int)'
zm_local_camera.cpp:(.text+0x20eb): undefined reference to `av_malloc(unsigned int)'
zm_local_camera.cpp:(.text+0x210c): undefined reference to `avpicture_fill(AVPicture*, unsigned char*, PixelFormat, int, int)'
zm_local_camera.o: In function `LocalCamera::Initialise()':
zm_local_camera.cpp:(.text+0x465a): undefined reference to `av_log_set_level(int)'
zm_local_camera.cpp:(.text+0x4c1b): undefined reference to `avpicture_fill(AVPicture*, unsigned char*, PixelFormat, int, int)'
zm_local_camera.cpp:(.text+0x4c70): undefined reference to `avcodec_alloc_frame()'
zm_local_camera.cpp:(.text+0x4fc8): undefined reference to `avcodec_alloc_frame()'
zm_local_camera.cpp:(.text+0x4ffd): undefined reference to `avpicture_fill(AVPicture*, unsigned char*, PixelFormat, int, int)'
zm_local_camera.cpp:(.text+0x511f): undefined reference to `av_log_set_level(int)'
collect2: ld returned 1 exit status

because they didn't add -lavutil -lavcodec... basically the autoconf seems to be broken.
Comment 3 Shawn Rutledge 2010-05-17 04:45:39 UTC
BTW is there a way to disable ccache for specific packages?  That might be a good feature for a future portage, if not.
Comment 4 Shawn Rutledge 2010-05-17 08:09:02 UTC
OK needs to be more like this in zm_local_camera.h:

#if HAVE_LIBSWSCALE
#ifdef __cplusplus
extern "C" {
#include <libswscale/swscale.h>
#include <libavcodec/avcodec.h>
}
#endif
#endif

I was able to build it finally.
Comment 5 Kevin Pyle 2010-06-15 03:35:07 UTC
(In reply to comment #3)
> BTW is there a way to disable ccache for specific packages?

Per the ccache man page:

ENVIRONMENT VARIABLES
       CCACHE_DISABLE
              If  you  set the environment variable CCACHE_DISABLE then ccache
              will just call the  real  compiler,  bypassing  the  cache  com-
              pletely.

Thus, you could export CCACHE_DISABLE=1 before the relevant stage(s) of compilation for the affected package.  It should be harmless if ccache is not actually present on the system.

After reading the URL cited in comment #1, I am curious what exactly ZoneMinder did to break their package.  In theory, ccache should never disrupt a build like this, so it is likely that they found an option combination that confuses it into producing an object file without updating one or more secondary files.  If this is so, it would be worthwhile to patch ccache so that it automatically bypasses in such scenarios.  Extending it to handle those options correctly would be even better, but applying an automatic bypass based on command line options should be a quick and easy fix, and will allow it to resume caching if upstream changes to options that do not produce bad output.
Comment 6 Ron 2010-09-23 01:24:57 UTC
Found Solution:
You need to add CXXFLAGS=-D__STDC_CONSTANT_MACROS to the build for zoneminder to compile with ffpmeg-0.6
The easest way to to create the file:
/etc/portage/env/www-misc/zoneminder
and paste:
CXXFLAGS=-D__STDC_CONSTANT_MACROS

Save the file and emerge zoneminder. it will build just fine.

Comment 7 Shawn Rutledge 2010-09-23 07:19:22 UTC
(In reply to comment #6)
> Found Solution:
> You need to add CXXFLAGS=-D__STDC_CONSTANT_MACROS to the build for zoneminder
> to compile with ffpmeg-0.6
> The easest way to to create the file:
> /etc/portage/env/www-misc/zoneminder
> and paste:
> CXXFLAGS=-D__STDC_CONSTANT_MACROS
> 
> Save the file and emerge zoneminder. it will build just fine.

That wasn't adequate in my case, but maybe you mean along with (some of) the other modifications I mentioned here?
Comment 8 Ron 2010-09-23 16:24:39 UTC
>That wasn't adequate in my case, but maybe you mean along with (some of) the
>other modifications I mentioned here?

OK, try creating an env file for ffmpeg and add the same CXFLAGS statement.
recompile ffmpeg-0.6 and then zoneminder.

I found the CXXFLAG ffmpeg-0.6 issue with a google search. It wasn't clear if the CXXFLAGS had to be on the ffmpeg or the application that was linking to  ffmpeg. I had compiled ffmpeg first with the CXXFLAGS setting and recomplied Zoneminder without the setting and Zoneminder failed to compile. I later added the CXXFLAGS setting to zoneminder and it compiled successfully. Try adding the CXXFLAGS settings to both ffmpeg and zoneminder, and let us know if that corrected the problem. Sorry for my assumption that adding CXXFLAGS just to zoneminder corrected the issue.

Comment 9 Stephen Kirkby 2010-09-25 11:27:57 UTC
I can also confirm that applying the fix from comment #6 resolved my issue of compiling zoneminder with ffmpeg-0.6.

Thank you!
Comment 10 Shawn Rutledge 2010-09-25 21:22:09 UTC
(In reply to comment #8)
> >That wasn't adequate in my case, but maybe you mean along with (some of) the
> >other modifications I mentioned here?
> 
> OK, try creating an env file for ffmpeg and add the same CXFLAGS statement.
> recompile ffmpeg-0.6 and then zoneminder.

That also didn't work.  ffmpeg built fine but zoneminder didn't.  I don't understand why it's working for some people and not others.
Comment 11 Ron 2010-09-27 04:16:31 UTC
> > OK, try creating an env file for ffmpeg and add the same CXFLAGS statement.
> > recompile ffmpeg-0.6 and then zoneminder.
> That also didn't work.  ffmpeg built fine but zoneminder didn't.  I don't
> understand why it's working for some people and not others.

The only other difference I spotted is that your using "march=athlon64" and I have mine set to "march=core2" Perhaps something to do with the compiler optimizations between althon and pentium system.
Comment 12 Oo.et.oO 2010-10-13 15:48:34 UTC
my /etc/portage/env/www-misc/zoneminder file has to have all three of the following to build:

CCACHE_DISABLE=1
CXXFLAGS=-D__STDC_CONSTANT_MACROS
ZM_SSL_LIB=openssl

the second one is for this issue.
the last one is for "error: 'MD5_DIGEST_LENGTH' was not declared in this scope" issue.  haven't found a bug report on that one yet.  might add it
Comment 13 Shawn Rutledge 2010-10-13 18:26:31 UTC
> my /etc/portage/env/www-misc/zoneminder file has to have all three of the
> following to build:
> 
> CCACHE_DISABLE=1
> CXXFLAGS=-D__STDC_CONSTANT_MACROS
> ZM_SSL_LIB=openssl

I tried putting all 3 lines just like that in mine.

> The only other difference I spotted is that your using "march=athlon64" and I
> have mine set to "march=core2" Perhaps something to do with the compiler
> optimizations between althon and pentium system.
> 

CFLAGS="-march=core2 -O2 -pipe -fno-ident -fomit-frame-pointer" ACCEPT_KEYWORDS=~amd64 emerge -av zoneminder

... it still fails with undefined references to a bunch of std:: stuff.  Could be that the whole system needs rebuilding with core2, but that's probably a wild goose chase.   For purposes of testing the suggestions here, I'm testing this on my usual workstation machine (a core i7 which nevertheless has march=athlon64, for historical reasons), where I don't need zoneminder; the machine I actually run it on is an athlon64 though, so it needs to work there.

As I said in comment 4, I got it to build eventually, and the steps I did to get it to build are documented in comments 1-4.  So one way to fix it is just a matter of making patches to be included with the ebuild.  Another way is to get upstream to fix it.  Unless there is some other random thing wrong with my systems, which is the reason it builds on some people's systems and not on either of mine...
Comment 14 Oo.et.oO 2010-10-13 19:49:25 UTC
fyi, my march is "nocona" 
which, BTW has nothing to do with the amd64 gentoo keyword
Comment 15 Shawn Rutledge 2010-10-13 21:29:08 UTC
(In reply to comment #14)
> fyi, my march is "nocona" 

OK

> which, BTW has nothing to do with the amd64 gentoo keyword

I know, I did that because it's a masked ebuild.  Also I tried prepending CFLAGS in front of the emerge command, as you can see, but not sure if that works or not, to actually change the "arch" for one ebuild.
Comment 16 Ron 2010-10-14 00:15:39 UTC
Shawn: I been running into numerous problems with Zoneminder on a 64 bit system. See this entry:
http://bugs.gentoo.org/show_bug.cgi?id=338400

I also am having issues with shared memory as ZM creates a shm handle as root when ZM_USER is set to apache. The only way I can can get zm to work is if I manually launch /usr/bin/zmc as root. I also tried using MMAP, which does appear to work even though the shm handle is open by root. but does generate frequent errors. I was thinking of building a 32-bit VM and see if the problems with shm go away. If I have sometime this weekend I will give a shot. So my point is that even if you get through the ffmpeg issue you may have the 64-bit issue.
Comment 17 Oo.et.oO 2010-10-14 01:23:13 UTC
(In reply to comment #16)
> Shawn: I been running into numerous problems with Zoneminder on a 64 bit
> system. See this entry:
> http://bugs.gentoo.org/show_bug.cgi?id=338400

just FYI, i'm 64bit and zoneminder _mostly_ works for me.  i haven't played with it enough after i've gotten it going again, but i can finally get to the webserver.  i can't presently see any video, but i'm not sure yet if that's ZM's fault or not.  
Comment 18 Ron 2010-10-16 23:48:16 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Shawn: I been running into numerous problems with Zoneminder on a 64 bit
> > system. See this entry:
> > http://bugs.gentoo.org/show_bug.cgi?id=338400
> just FYI, i'm 64bit and zoneminder _mostly_ works for me.  i haven't played
> with it enough after i've gotten it going again, but i can finally get to the
> webserver.  i can't presently see any video, but i'm not sure yet if that's
> ZM's fault or not.  

Thats the problem on 64-bit systems. if you enable debug mode you'll see a bunch of errors trying to communicate over the shm, if you run "ipcs -m" you'll see that the perm is set to root, while the zm instance runs under apache. if you manually run "zmc -m 1" from a shell logged into root you probably will see it start to work. There is another issue wit ZM because of bad varible types bacause the author assumes that long, int, etc remain as 32-bit values instead of 64-bit values on 64-bit machines. This 32/64 mismatch will cause zmc to crash on 64-bit system. if you look at this link, you can manually apply the 64-bit fix patch to zm.
http://bugs.gentoo.org/show_bug.cgi?id=338400


I looked through the zm_monitor.cpp code where it creates the shm and there is no code to set the user ID. Perhaps this is automatically assigned using the userID that the process is running. It doesn't appear to work on 64-bit system, at least not my system. FWIW: I am running under linux-2.6.29-xen (64-bit dom0), with zm running on a 64-bit domU kernel. I am going to try running under a 32-bit DomU VM to see if it fixes the issue.

http://bugs.gentoo.org/show_bug.cgi?id=338400


Comment 19 Vítor Brandão (noisebleed) 2010-10-26 10:32:09 UTC
(In reply to comment #6)
> Found Solution:
> You need to add CXXFLAGS=-D__STDC_CONSTANT_MACROS to the build for zoneminder
> to compile with ffpmeg-0.6
> The easest way to to create the file:
> /etc/portage/env/www-misc/zoneminder
> and paste:
> CXXFLAGS=-D__STDC_CONSTANT_MACROS
> 
> Save the file and emerge zoneminder. it will build just fine.
> 

Perfect. That did it for me when compiling with ffmpeg support. Thanks.

-- emerge info: --
Portage 2.1.8.3 (hardened/linux/amd64/10.0, gcc-4.4.4, glibc-2.11.2-r0, 2.6.32-hardened-r9 x86_64)
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CXXFLAGS="-O2 -pipe"
FEATURES="assume-digests buildpkg distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
Comment 20 Christophe DAPREMONT 2010-10-31 14:56:48 UTC
I send you a big thank you ! after full gentoo upgrade and perl upgrade
zoneminder wan't to re-emerge and impossible to install until chage the make.conf with your tips !!!

>> Found Solution:
>> You need to add CXXFLAGS=-D__STDC_CONSTANT_MACROS to the build for zoneminder
>> to compile with ffpmeg-0.6
>> The easest way to to create the file:
>> /etc/portage/env/www-misc/zoneminder
>> and paste:
>> CXXFLAGS=-D__STDC_CONSTANT_MACROS



Comment 21 cach0rr0 2011-03-22 10:30:43 UTC
Created attachment 266823 [details]
updated ebuild appending CXXFLAG(S)

Tested on ~amd64 with all other requisite patches. Doesn't pass repoman, though neither did the original 1.24.2 ebuild.
Comment 22 cach0rr0 2011-03-22 10:32:43 UTC
Added ebuild that incorporates these changes, so you don't have to go mucking about with per-package env

note: as some will have seen, this is unmaintained by upstream,  has been for ~2 years, and is marked for removal from portage. Snag your ebuilds and dump in a local overlay while you can, because it looks like this one's going byebye in not too long.
Comment 23 cach0rr0 2011-03-22 10:45:03 UTC
Created attachment 266825 [details]
re-updated ebuild

copied wrong revision, sorry about that.
Comment 24 Lyall Pearce 2011-03-22 22:13:03 UTC
Please see https://bugs.gentoo.org/show_bug.cgi?id=359605 for a working ebuild.
Comment 25 Tomáš Chvátal (RETIRED) gentoo-dev 2011-04-28 15:54:56 UTC
Removed from main tree.
Comment 26 Andreas K. Hüttel archtester gentoo-dev 2011-09-16 19:55:35 UTC
Reopened for tracking and hopefully zoneminder revival
Comment 27 Andreas K. Hüttel archtester gentoo-dev 2011-09-17 14:37:32 UTC
ffmpeg-0.6 is not in the tree anymore