1.2.4 Compile problem

Support and queries relating to all previous versions of ZoneMinder
Locked
KorayPeksayar
Posts: 12
Joined: Fri Nov 11, 2005 11:35 pm
Location: Istanbul/Turkiye
Contact:

1.2.4 Compile problem

Post by KorayPeksayar »

I have been successfully using ZoneMinder 1.2.3 for some time now.

When I heard that the version is out I tried to compile 1.2.4.

I used ffmpeg 0.4.8 installed in /usr/local firstly. The result is failure:

Code: Select all

make[2]: Entering directory `/usr/src/packages/BUILD/zm-1.21.4/src'
if g++ -DHAVE_CONFIG_H -I. -I. -I..  -I/usr/include -I/usr/local/include   -g -O2 -MT zm_mpeg.o -MD -MP -MF ".deps/zm_mpeg.Tpo" -c -o zm_mpeg.o zm_mpeg.cpp; \
then mv -f ".deps/zm_mpeg.Tpo" ".deps/zm_mpeg.Po"; else rm -f ".deps/zm_mpeg.Tpo"; exit 1; fi
zm_mpeg.cpp: In member function `void VideoStream::SetupCodec(int, int, int,
   int, int)':
zm_mpeg.cpp:79: error: cannot convert `AVCodecContext' to `AVCodecContext*' in
   initialization
zm_mpeg.cpp:98: error: 'struct AVCodecContext' has no member named 'time_base'
zm_mpeg.cpp:99: error: 'struct AVCodecContext' has no member named 'time_base'
zm_mpeg.cpp: In member function `void VideoStream::OpenStream()':
zm_mpeg.cpp:133: error: cannot convert `AVCodecContext' to `AVCodecContext*' in
   initialization
zm_mpeg.cpp: In destructor `VideoStream::~VideoStream()':
zm_mpeg.cpp:237: error: cannot convert `AVCodecContext' to `AVCodecContext*'
   for argument `1' to `int avcodec_close(AVCodecContext*)'
zm_mpeg.cpp: In member function `double VideoStream::EncodeFrame(uint8_t*, int,
   bool, unsigned int)':
zm_mpeg.cpp:284: error: cannot convert `AVCodecContext' to `AVCodecContext*' in
   initialization
make[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/usr/src/packages/BUILD/zm-1.21.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/zm-1.21.4'
make: *** [all] Error 2
Afterwards I tried the latest ffmpeg 0.4.9 cvs release although I don't enable faac, which fault as dafult, the ffmpeg compilation result is again failure:

Code: Select all

faac.c:26:18: faac.h: No such file or directory
faac.c:29: error: syntax error before "faacEncHandle"
faac.c:29: warning: no semicolon at end of struct or union
faac.c:30: warning: type defaults to `int' in declaration of `FaacAudioContext'
faac.c:30: warning: data definition has no type or storage class
faac.c: In function `Faac_encode_init':
faac.c:34: error: `s' undeclared (first use in this function)
faac.c:34: error: (Each undeclared identifier is reported only once
faac.c:34: error: for each function it appears in.)
faac.c:35: error: `faacEncConfigurationPtr' undeclared (first use in this function)
faac.c:35: error: syntax error before "faac_cfg"
faac.c:42: warning: implicit declaration of function `faacEncOpen'
faac.c:47: error: `faac_cfg' undeclared (first use in this function)
faac.c:47: warning: implicit declaration of function `faacEncGetCurrentConfiguration'
faac.c:48: error: `FAAC_CFG_VERSION' undeclared (first use in this function)
faac.c:50: warning: implicit declaration of function `faacEncClose'
faac.c:55: error: `LOW' undeclared (first use in this function)
faac.c:56: error: `MPEG4' undeclared (first use in this function)
faac.c:65: error: `FAAC_INPUT_16BIT' undeclared (first use in this function)
faac.c:67: warning: implicit declaration of function `faacEncSetConfiguration'
faac.c:84: warning: implicit declaration of function `faacEncGetDecoderSpecificInfo'
faac.c: In function `Faac_encode_frame':
faac.c:97: error: `s' undeclared (first use in this function)
faac.c:100: warning: implicit declaration of function `faacEncEncode'
faac.c: In function `Faac_encode_close':
faac.c:111: error: `s' undeclared (first use in this function)
make[1]: *** [faac.o] Error 1
make[1]: Leaving directory `/usr/src/packages/BUILD/ffmpeg-cvs/ffmpeg/libavcodec'
make: *** [lib] Error 2
I am using SuSE Linux 9.3 with mostly the latest libraries updated via apt.

I can revert back to zm 1.2.3, however I want to use the new features and want to help on further development.

Could you please help ?

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

Post by zoneminder »

In your first example where you have ffmpeg in a nont standard location, I can't see any evidence that the compiler is looking there for the include files. It looks like a version mismatch somewhere. What were your configure options?

The second problem is just ffmpeg and I don't even know what faac is I'm afraid!

Phil
KorayPeksayar
Posts: 12
Joined: Fri Nov 11, 2005 11:35 pm
Location: Istanbul/Turkiye
Contact:

Post by KorayPeksayar »

/usr/local has ffmpeg 0.4.8 installed.

The configure line was:

Code: Select all

./configure --with-mysql=/usr --with-ffmpeg=/usr/local --with-lame=/usr --with-webdir=/srv/www/htdocs/fm --with-cgidir=/srv/www/cgi-bin/fm --with-openssl=/usr --with-webuser=wwwrun --with-webgroup=www
I found out the problem and successfully compiled.

Reason: The versions of ffmpeg in /usr and /usr/local conflict with each other.
Here is the solution: I completely removed the ffmpeg installation (from source files) in /usr/local and reinstalled the 20051015 cvs version from Packman RPMs.

./configure --with-mysql=/usr --with-ffmpeg=/usr --with-lame=/usr --with-webdir=/srv/www/htdocs/fm --with-cgidir=/srv/www/cgi-bin/fm --with-openssl=/usr --with-webuser=wwwrun --with-webgroup=www

perl zmpkp.pl -noi

make

make install

Successful installation !

(BTW I'm sorry for the bother. I just missed a simple point)
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks for the update. It's always useful to have solutions posted as well as problems :D

Phil
KorayPeksayar
Posts: 12
Joined: Fri Nov 11, 2005 11:35 pm
Location: Istanbul/Turkiye
Contact:

Post by KorayPeksayar »

No problem.

I know what it means to be a solution developer :D

I want to post other issues regarding database schemas for easier internationalisation nd further more.

In which forum should I post them to ?

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

Post by zoneminder »

Possibly the Feature Requests forum would be the best one. I know you sent me a mail a couple of days ago on this. I've been away for the weekend and have only just got back so I will reply to you this evening. But if you want to open this up to a wider audience then posting is probably just as good!

Phil
Locked