Page 1 of 1

can't compile zoneminder on arch linux

Posted: Mon May 21, 2012 2:27 pm
by tritron4
I had zoneminder working fine on arch linux I installed updates and then my zoneminder stoped working and I attempted to recompile it and I get this error

Code: Select all

zm_local_camera.h:101:5: error: 'PixelFormat' does not name a type
zm_local_camera.h:102:5: error: 'PixelFormat' does not name a type
zm_local_camera.h:103:12: error: 'AVFrame' does not name a type
zm_local_camera.cpp:44:8: error: 'PixelFormat' does not name a type
zm_local_camera.cpp:259:1: error: 'AVFrame' does not name a type
zm_local_camera.cpp: In constructor 'LocalCamera::LocalCamera(int, const string&, int, int, const string&, int, int, int, int, int, int, int, bool)':
zm_local_camera.cpp:324:9: error: 'imagePixFormat' was not declared in this scope
zm_local_camera.cpp:324:39: error: 'PIX_FMT_GRAY8' was not declared in this scope
zm_local_camera.cpp:324:53: error: 'PIX_FMT_RGB24' was not declared in this scope
zm_local_camera.cpp:325:9: error: 'capturePixFormat' was not declared in this scope
zm_local_camera.cpp:325:79: error: 'getFfPixFormatFromV4lPalette' was not declared in this scope
zm_local_camera.cpp: In member function 'void LocalCamera::Initialise()':
zm_local_camera.cpp:341:27: error: 'AV_LOG_DEBUG' was not declared in this scope
zm_local_camera.cpp:341:40: error: 'av_log_set_level' was not declared in this scope
zm_local_camera.cpp:343:27: error: 'AV_LOG_QUIET' was not declared in this scope
zm_local_camera.cpp:343:40: error: 'av_log_set_level' was not declared in this scope
zm_local_camera.cpp:464:9: error: 'capturePictures' was not declared in this scope
zm_local_camera.cpp:464:31: error: expected type-specifier before 'AVFrame'
zm_local_camera.cpp:464:31: error: expected ';' before 'AVFrame'
zm_local_camera.cpp:488:18: error: 'imagePixFormat' was not declared in this scope
zm_local_camera.cpp:488:36: error: 'capturePixFormat' was not declared in this scope
zm_local_camera.cpp:490:58: error: 'avcodec_alloc_frame' was not declared in this scope
zm_local_camera.cpp:493:34: error: 'AVPicture' was not declared in this scope
zm_local_camera.cpp:493:45: error: expected primary-expression before ')' token
zm_local_camera.cpp:493:187: error: 'avpicture_fill' was not declared in this scope
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
zm_local_camera.cpp: In member function 'virtual int LocalCamera::Capture(Image&)':
zm_local_camera.cpp:1643:16: error: 'AVFrame' does not name a type
zm_local_camera.cpp:1645:14: error: 'imagePixFormat' was not declared in this scope
zm_local_camera.cpp:1645:32: error: 'capturePixFormat' was not declared in this scope
zm_local_camera.cpp:1649:146: error: 'SWS_BICUBIC' was not declared in this scope
zm_local_camera.cpp:1649:176: error: 'sws_getCachedContext' was not declared in this scope
zm_local_camera.cpp:1653:17: error: 'tmpPicture' was not declared in this scope
zm_local_camera.cpp:1653:50: error: 'avcodec_alloc_frame' was not declared in this scope
zm_local_camera.cpp:1656:85: error: 'avpicture_get_size' was not declared in this scope
zm_local_camera.cpp:1657:74: error: 'av_malloc' was not declared in this scope
zm_local_camera.cpp:1660:34: error: 'AVPicture' was not declared in this scope
zm_local_camera.cpp:1660:45: error: expected primary-expression before ')' token
zm_local_camera.cpp:1660:103: error: 'avpicture_fill' was not declared in this scope
zm_local_camera.cpp:1662:46: error: 'capturePictures' was not declared in this scope
zm_local_camera.cpp:1662:137: error: 'tmpPicture' was not declared in this scope
zm_local_camera.cpp:1662:176: error: 'sws_scale' was not declared in this scope
make[2]: *** [zm_local_camera.o] Error 1
make[2]: Leaving directory `/home/dev/zoneminder/src/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/dev/zoneminder/src/ZoneMinder-1.25.0'
make: *** [all] Error 2

Re: can't compile zoneminder on arch linux

Posted: Tue May 22, 2012 5:53 pm
by troydwill
Do a Google seach on "AUR zoneminder" to find the AUR package page.

You can run the two sed commands posted by Ganin on Wed, 16 May 2012 15:53:00 and then you can compile.

Hope this helps.

Re: can't compile zoneminder on arch linux

Posted: Wed May 23, 2012 12:56 am
by tritron4
I have aur on my arch linux server are you talking about this line ?

Code: Select all

sed -i -e '1 s/^/#include <unistd.h>\n/;' src/zm_logger.cpp
  sed -i -e '1 s/^/#include <unistd.h>\n/;' src/zm_thread.h
Because the error listed above is showing wwith that patch

Re: can't compile zoneminder on arch linux

Posted: Wed May 23, 2012 4:32 pm
by troydwill
Yep. I just compiled it this morning on an i686 system.

Re: can't compile zoneminder on arch linux

Posted: Wed May 23, 2012 10:08 pm
by tritron4
I have 64 bit system and I tried on both of the are you running latest packages ? Did you type pacman -Suy.

Re: can't compile zoneminder on arch linux

Posted: Fri May 25, 2012 3:21 am
by troydwill
Yes, I did. I'm reinstalling Arch x86_64 on my VPN and will try compiling. I'll probably end up distributing an x86_64 binary package if your interested, will let you know the result in any event.

--Troy

Re: can't compile zoneminder on arch linux

Posted: Fri May 25, 2012 4:27 am
by troydwill
My x86-64 compile failed, although I got a different error message:

Code: Select all

/usr/bin/ld: i386 architecture of input file `zm_ffmpeg.o' is incompatible with i386:x86-64 output
collect2: error: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/home/troy/rsync/zoneminder-aur-tdw/src/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/troy/rsync/zoneminder-aur-tdw/src/ZoneMinder-1.25.0'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
When I inspect zm_ffmpeg.o with file I get:

Code: Select all

file src/ZoneMinder-1.25.0/src/zm_ffmpeg*
src/ZoneMinder-1.25.0/src/zm_ffmpeg_camera.cpp: C source, ASCII text
src/ZoneMinder-1.25.0/src/zm_ffmpeg_camera.h:   C++ source, ASCII text
src/ZoneMinder-1.25.0/src/zm_ffmpeg_camera.o:   ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
src/ZoneMinder-1.25.0/src/zm_ffmpeg.cpp:        C source, ASCII text
src/ZoneMinder-1.25.0/src/zm_ffmpeg.h:          C source, ASCII text
src/ZoneMinder-1.25.0/src/zm_ffmpeg.o:          ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
Apparently zm_ffmpeg.cpp got complied for a i386 target but I don't have the faintest idea why.
I don't know if my failure helps you at all, but I tried.

--Troy

Re: can't compile zoneminder on arch linux

Posted: Fri May 25, 2012 4:52 am
by troydwill
Sorry for the white noise in the previous post- zoneminder did just now compile. The compile failure I reported was due to a leftover binary from my earlier i386 build.

I'm going to test this zoneminder binary package and if it's good I'll make it available on a sever.

--Troy

Re: can't compile zoneminder on arch linux

Posted: Fri May 25, 2012 5:22 am
by troydwill
I put zoneminder package on my server. The package is zoneminder-1.25.0-7-x86_64.pkg.tar.xz

You can sync it with pacman if you put my repo in your pacman.conf:

Code: Select all

zoneminder-arch]
Server = my server URL
I also put 3 zoneminder dependencies, perl-sys-mmap, perl-unicode-map, and cambozola in the repo to save people the time to have to build them by hand.

Hope it helps.

( Note: I can't post the URL of my repository due to this forum's spam filter. I'll try to think of a way to post it tomorrow.

--Troy