You are not logged in.

#1 2008-09-02 21:51:48

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

[SOLVED] yaourt -S zoneminder fails

I previously posted this on the package page, but no return.  So did anyone install zoneminder with success?

zm_mpeg.h:63: error: use of enum 'PixelFormat' without previous declaration
zm_mpeg.h:64: error: ISO C++ forbids declaration of 'AVOutputFormat' with no type
zm_mpeg.h:64: error: expected ';' before '*' token
zm_mpeg.h:65: error: ISO C++ forbids declaration of 'AVFormatContext' with no type
zm_mpeg.h:65: error: expected ';' before '*' token
zm_mpeg.h:66: error: ISO C++ forbids declaration of 'AVStream' with no type
zm_mpeg.h:66: error: expected ';' before '*' token
zm_mpeg.h:67: error: ISO C++ forbids declaration of 'AVFrame' with no type
zm_mpeg.h:67: error: expected ';' before '*' token                
zm_mpeg.h:68: error: ISO C++ forbids declaration of 'AVFrame' with no type
zm_mpeg.h:68: error: expected ';' before '*' token
zm_mpeg.h:69: error: ISO C++ forbids declaration of 'uint8_t' with no type
zm_mpeg.h:69: error: expected ';' before '*' token
zm_mpeg.h:85: error: 'uint8_t' has not been declared
In file included from zm_zone.h:27,
                 from zm_monitor.h:27,
                 from zmc.cpp:27:
zm_event.h:188: warning: 'typedef' was ignored in this declaration
zm_event.h:200: warning: 'typedef' was ignored in this declaration
In file included from zmc.cpp:27:
zm_monitor.h:114: warning: 'typedef' was ignored in this declaration
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-marst/aur-zoneminder/zoneminder/src/ZoneMinder-1.23.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-marst/aur-zoneminder/zoneminder/src/ZoneMinder-1.23.3'
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...
Error: Makepkg was unable to build zoneminder package.

Last edited by marxav (2008-09-02 23:07:49)

Offline

#2 2008-09-02 22:39:05

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: [SOLVED] yaourt -S zoneminder fails

Hello,

The problem you're describing is caused because the ffmpeg headers are installed in different directories from those that zoneminder is looking in.

To make it compile you'll need to download the tarball from the AUR and edit its PKGBUILD.

Just after line 37 (where the patch commands reside) put:

sed -i 's|<ffmpeg/avformat.h>|<libavformat/avformat.h>|' $srcdir/ZoneMinder-$pkgver/src/zm_mpeg.h
sed -i 's|<ffmpeg/swscale.h>|<libswscale/swscale.h>|' $srcdir/ZoneMinder-$pkgver/src/zm_mpeg.h

Then proceed to build the package with makepkg.

Offline

#3 2008-09-02 23:07:08

marxav
Member
From: Gatineau, PQ, Canada
Registered: 2006-09-24
Posts: 386

Re: [SOLVED] yaourt -S zoneminder fails

foutrelis, you rock!  Thanks.  Just need to figure out how to use it now.

Offline

#4 2010-02-26 01:38:16

guisacouto
Member
From: Portugal
Registered: 2009-06-27
Posts: 107

Re: [SOLVED] yaourt -S zoneminder fails

sorry to bump this old thread but I'm having the same problem..
I already tried what foutrelis said but didnt work.. same error.. maybe the names of the files changed.. can someone give me some help in this?



make[2]: Entering directory `/home/guilherme/Downloads/zoneminder/src/ZoneMinder-1.24.2/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..  -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include  -frepo -march=core2 -O2 -pipe -MT zmc.o -MD -MP -MF ".deps/zmc.Tpo" -c -o zmc.o zmc.cpp; \
    then mv -f ".deps/zmc.Tpo" ".deps/zmc.Po"; else rm -f ".deps/zmc.Tpo"; exit 1; fi
In file included from zm_image.h:26,
                 from zm_monitor.h:25,
                 from zmc.cpp:28:
zm_jpeg.h:39: error: declaration of C function 'void jpeg_mem_src(jpeg_decompress_struct*, const JOCTET*, int)' conflicts with
/usr/include/jpeglib.h:959: error: previous declaration 'void jpeg_mem_src(jpeg_decompress_struct*, unsigned char*, long unsigned int)' here
zm_jpeg.h:40: error: declaration of C function 'void jpeg_mem_dest(jpeg_compress_struct*, JOCTET*, int*)' conflicts with
/usr/include/jpeglib.h:956: error: previous declaration 'void jpeg_mem_dest(jpeg_compress_struct*, unsigned char**, long unsigned int*)' here
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/home/guilherme/Downloads/zoneminder/src/ZoneMinder-1.24.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/guilherme/Downloads/zoneminder/src/ZoneMinder-1.24.2'
make: *** [all] Error 2
==> ERROR: Build Failed.
    Aborting...

my actual PKGBUID:

# This is a ZoneMinder PKGBUILD file. 
# Contributor: Ross melin <rdmelin@gmail.com>

pkgname=zoneminder
pkgver=1.24.2
pkgrel=2
pkgdesc="Capture, analyse, record and monitor video security cameras."
arch=('i686' 'x86_64')
url="http://www.zoneminder.com"
license=('GPL')
groups=()
depends=('apache' 'php' 'mysql' 'pcre' 'openssl' 'ffmpeg-svn>=18940' 'perl-php-serialization' 'perl-libwww' 'perl-date-manip' 'perl-unicode-map' 'perl-dbi' 'perl-dbd-mysql' 'perl-io-stringy' 'perl-mime-lite' 'perl-timedate' 'perl-x10' 'perl-time-modules' 'perl-net-smtp-ssl' 'perl-sys-mmap' 'sudo' 'libv4l')
makedepends=()
provides=(zoneminder)
conflicts=(zoneminder)
replaces=()
backup=()
options=()
install=zoneminder.install
source=(http://www2.zoneminder.com/downloads/ZoneMinder-1.24.2.tar.gz \
    zm.rc.d \
     zm.conf.patch \
  zmupdate.patch \
  Controls_Orbit.sql \
  Makefile.patch \
  zm_libv4l.patch \
     zminit.arch \
  customdb \
  httpd-zm.conf \
  zmfilter.pl \
  http://www.sfr-fresh.com/unix/privat/jscalendar-1.0.zip  \
  http://www.charliemouse.com:8080/code/cambozola/cambozola-0.50.tar.gz \
  zmeventbackup)
noextract=()
md5sums=('550d2f8f08852134028c3b1cf8fa437f'
         'b20fb25b187eb6abb21321e153a7fb25'
         '1d2a4233af027452ae38a3e0b6d062ee'
         '971947cc093f7d909f39c2ce83846f35'
         '5033bc098bf497c8aed1fc1b3c9c5f9c'
         'b7b532b39f0985c2b995c7923728bc1b'
         '60f5654582873da54796a0cf0641dc3c'
         'f9720872736f26d17bc49d8725b75ae4'
         '4ace13d1e20934abe192ef7372c75988'
         '00201eba9c0a5d1ed14b10cc55410698'
         '80c52cc3575073a7462ff6a54886a345'
         '10f2160fe68294013efcd1473cd36f72'
         'daded58688e16ab513920a54a0599267'
         '8b40137b6ff54f2fb26104b70edd22e9')

build() {
    cd "$srcdir/ZoneMinder-$pkgver"

    patch -p1 < $srcdir/zm.conf.patch || read
  patch -p1 < $srcdir/zmupdate.patch || read
  patch -p1 -b < $srcdir/zm_libv4l.patch || read
  cat ../Controls_Orbit.sql >> db/zm_create.sql.in
  sed -i '22s/^$/#include <cstdio>/' \
  src/zm_utils.cpp
  sed -i 's/$max_socket_tries = 3;/$max_socket_tries = 15;/' \
  web/ajax/stream.php || read

    ./configure --prefix=/usr \
        --sysconfdir=/etc \
        --with-webuser=http  \
        --with-webgroup=http \
        --with-mysql=/usr  \
        --with-webdir=/var/lib/zm/www  \
    --with-cgidir=/var/lib/zm/cgi-bin \
    --with-extralibs="-lv4l1 -lv4l2" \
    --bindir=/usr/lib/zm/bin \
    --enable-mmap=no \
    ZM_SSL_LIB=openssl

  patch -p1 < $srcdir/Makefile.patch ||read
  sed -i 's|<ffmpeg/avformat.h>|<libavformat/avformat.h>|' $srcdir/ZoneMinder-$pkgver/src/zm_mpeg.h
  sed -i 's|<ffmpeg/swscale.h>|<libswscale/swscale.h>|' $srcdir/ZoneMinder-$pkgver/src/zm_mpeg.h
    make || return 1
    make DESTDIR="$pkgdir" install || return 1

    install -D -m 700 $startdir/src/zminit.arch  $startdir/pkg/usr/lib/zm/bin/zminit
    install -D -m 700 $startdir/src/zm.rc.d  $startdir/pkg/etc/rc.d/zm
  install -D -m 700 scripts/zmdbbackup  $startdir/pkg/usr/lib/zm/bin/zmdbbackup
  install -D -m 700 scripts/zmdbbackup  $startdir/pkg/usr/lib/zm/bin/zmdbbackup
  install -D -m 700 scripts/zmdbrestore  $startdir/pkg/usr/lib/zm/bin/zmdbrestore
  install -D -m 700 scripts/zmeventdump  $startdir/pkg/usr/lib/zm/bin/zmeventdump
  install -D -m 700 scripts/zmlogrotate.conf  $startdir/pkg/etc/logrotate.d/zm
  install -D -m 700 $startdir/src/zmeventbackup  $startdir/pkg/etc/cron.hourly/zmeventbackup
  install -D -m 755 $startdir/src/zmfilter.pl $startdir/pkg/usr/lib/zm/bin/zmfilter.pl

  tar -zxf $startdir/src/cambozola-0.50.tar.gz 
  install -m 644  cambozola-0.50/dist/cambozola.jar $startdir/pkg/var/lib/zm/www/cambozola.jar
  
  mkdir -p  $startdir/pkg/etc/httpd/conf/extra/
  install -m 644 $startdir/src/httpd-zm.conf $startdir/pkg/etc/httpd/conf/extra/httpd-zm.conf
  
  unzip  $startdir/src/jscalendar-1.0.zip
  mv $startdir/src/jscalendar-1.0 $startdir/pkg/var/lib/zm/www/tools/jscalendar

  install -D -m 700 $startdir/src/customdb $startdir/pkg/usr/lib/zm/upgrade/customdb
    install -D  db/zm*.sql $startdir/pkg/usr/lib/zm/upgrade/

  mkdir -p $startdir/pkg/var/run/zm

  ### remove special files
  find $startdir/pkg/ -name "perllocal.pod" \
    -o -name ".packlist"                \
    -o -name "*.bs"                     \
    |xargs -i rm -f {}

}

# vim:set ts=2 sw=2 et:

I copied those two lines foutrelis posted after the first two patches inside the build() and didnt worked, then I tried after the third patch and it didnt work too...(always the same error)


some help would be gr8.

regards!

Offline

#5 2010-02-26 01:47:52

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: [SOLVED] yaourt -S zoneminder fails

Your error is not from FFmpeg, it's from libjpeg. Look for threads about the recent libjpeg (from 7 to 8) upgrade for possible solutions.

I'm locking this thread because it's so old. Please start a new one if you still need help.

Offline

Board footer

Powered by FluxBB