Page 1 of 1

Still having the compilation error

Posted: Wed Mar 12, 2008 8:09 am
by decibel83
I'm still having the boring compilation error about ffmpeg.
I'm trying to build the 1.23.2 version of ZoneMinder on Ubuntu 7.10.
I downloaded and installed ffmpeg from the cvs with the --enable-swscaler option but I didn't solve the problem:

Code: Select all

make  all-recursive
make[1]: Entering directory `/usr/local/src/ZoneMinder-1.23.2'
Making all in src
make[2]: Entering directory `/usr/local/src/ZoneMinder-1.23.2/src'
g++ -DHAVE_CONFIG_H -I. -I..  -I/usr/include -I/usr/include   -g -O2 -MT zm_mpeg.o -MD -MP -MF .deps/zm_mpeg.Tpo -c -o zm_mpeg.o zm_mpeg.cpp
zm_mpeg.cpp: In destructor ‘VideoStream::~VideoStream()’:
zm_mpeg.cpp:281: error: cannot convert ‘ByteIOContext’ to ‘ByteIOContext*’ for argument ‘1’ to ‘int url_fclose(ByteIOContext*)’
make[2]: *** [zm_mpeg.o] Error 1
make[2]: Leaving directory `/usr/local/src/ZoneMinder-1.23.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/ZoneMinder-1.23.2'
make: *** [all] Error 2
Could you help me, please?
I'm very confused for this problem...

Thank you very much for your help!
Bye.

Posted: Wed Mar 12, 2008 10:46 am
by caladeira
Hi there.

Have you checked ffmpeg steps at this post:
http://www.zoneminder.com/forums/viewto ... sc&start=0

I've updated to ZM 1.23.2

Also dont forget step 17 if you want ffmpeg to work properly.

Best regards.

Posted: Wed Mar 12, 2008 2:03 pm
by decibel83
I followed your howto (even if this was almost the same procedure I followed yesterday), but I'm still having that compilation error.
I don't understand why this happens, perhaps due to a diffferent version of ffmpeg downloaded from the cvs?

Posted: Wed Mar 12, 2008 2:23 pm
by caladeira
It could be.

When you download the ffmpeg from svn, you could specify the version you want.

Try this:

Code: Select all

svn checkout -r 11637 svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
It may solve your problem.

Another possibility is instead of compiling, use the pre build DEB files from Peter.

Check this topic:

http://www.zoneminder.com/forums/viewtopic.php?t=11309

Best regards.

Posted: Wed Mar 12, 2008 5:39 pm
by decibel83
I'm very unlucky.
I can't compile the 11637 revision of ffmpeg:

Code: Select all

rgb2rgb_template.c:1148: error: ‘mask16r’ undeclared (first use in this function)
rgb2rgb_template.c:1148: error: ‘mmx_null’ undeclared (first use in this function)
rgb2rgb_template.c:1198: error: ‘mask24l’ undeclared (first use in this function)
rgb2rgb_template.c:1198: error: ‘mask24h’ undeclared (first use in this function)
rgb2rgb_template.c:1198: error: ‘mask24hh’ undeclared (first use in this function)
rgb2rgb_template.c:1198: error: ‘mask24hhh’ undeclared (first use in this function)
rgb2rgb_template.c:1198: error: ‘mask24hhhh’ undeclared (first use in this function)
rgb2rgb_template.c:1089: error: memory input 2 is not directly addressable
rgb2rgb_template.c:1089: error: memory input 3 is not directly addressable
rgb2rgb_template.c:1089: error: memory input 4 is not directly addressable
rgb2rgb_template.c:1089: error: memory input 5 is not directly addressable
rgb2rgb_template.c:1151: error: memory input 2 is not directly addressable
rgb2rgb_template.c:1151: error: memory input 3 is not directly addressable
rgb2rgb_template.c:1151: error: memory input 4 is not directly addressable
rgb2rgb_template.c:1151: error: memory input 5 is not directly addressable
rgb2rgb_template.c:1151: error: memory input 6 is not directly addressable
rgb2rgb_template.c: In function ‘rgb15to32_3DNOW’:
rgb2rgb_template.c:1262: error: ‘mask15b’ undeclared (first use in this function)
rgb2rgb_template.c:1262: error: ‘mask15g’ undeclared (first use in this function)
rgb2rgb_template.c:1262: error: ‘mask15r’ undeclared (first use in this function)
rgb2rgb_template.c:1231: error: memory input 2 is not directly addressable
rgb2rgb_template.c:1231: error: memory input 3 is not directly addressable
rgb2rgb_template.c:1231: error: memory input 4 is not directly addressable
rgb2rgb_template.c: In function ‘rgb16to32_3DNOW’:
rgb2rgb_template.c:1340: error: ‘mask15b’ undeclared (first use in this function)
rgb2rgb_template.c:1340: error: ‘mask16g’ undeclared (first use in this function)
rgb2rgb_template.c:1340: error: ‘mask16r’ undeclared (first use in this function)
rgb2rgb_template.c:1309: error: memory input 2 is not directly addressable
rgb2rgb_template.c:1309: error: memory input 3 is not directly addressable
rgb2rgb_template.c:1309: error: memory input 4 is not directly addressable
rgb2rgb_template.c: In function ‘rgb32tobgr32_3DNOW’:
rgb2rgb_template.c:1419: error: ‘mask32b’ undeclared (first use in this function)
rgb2rgb_template.c:1419: error: ‘mask32r’ undeclared (first use in this function)
rgb2rgb_template.c:1419: error: ‘mmx_one’ undeclared (first use in this function)
rgb2rgb_template.c:1371: error: memory input 3 is not directly addressable
rgb2rgb_template.c:1371: error: memory input 4 is not directly addressable
rgb2rgb_template.c:1371: error: memory input 5 is not directly addressable
make[1]: *** [rgb2rgb.o] Error 1
make[1]: Leaving directory `/home/mattia/ffmpeg/libswscale'
make: *** [lib] Error 2
I searched for this error but I didn't find anything special...

Do you have any idea?

Posted: Thu Mar 13, 2008 1:57 pm
by caladeira
Unfortunately, I can't see any failure reason from your error message.

Yesterday, I've reinstalled one system using Peter DEB, and everything is working without issues.
This way it's much easier and it takes less than one hour to install all system from scratch.

Check the link I've told you.

Best regards.

Posted: Thu Mar 13, 2008 2:05 pm
by decibel83
Yes, I wish to use the Peter's .deb file, but it is for the i386 arch only, and I'm using Ubuntu 7.10 amd64...

Posted: Thu Mar 13, 2008 5:21 pm
by caladeira
OK.

The procedure I've descrived was only tested with i386, haven't tested with AMD64.

However I do know that there are some extra options that you should use with ffmpeg if you're compiling for amd64.
I recall something related with extralibs....)

Search the foruns and you'll find it.

Best luck.

Same problem...

Posted: Sun Mar 30, 2008 8:32 am
by lucasr
I'm having the same problem here...same system, Ubuntu 7.10 x64
The zm_mpeg.cpp gives the same error..I've triend compiling ffmpeg in different ways but nothing seems to fix it...

Anyone got it working already?

Thanks...

Posted: Tue Apr 08, 2008 1:41 am
by badone
Here is a patch that will get it to compile.

Code: Select all


*** zm_mpeg.cpp 2008-04-08 11:13:09.000000000 +1000
--- zm_mpeg.new.cpp     2008-04-08 11:14:23.000000000 +1000
***************
*** 277,287 ****
        if (!(of->flags & AVFMT_NOFILE))
        {
                /* close the output file */
- #if ZM_FFMPEG_SVN
-               url_fclose(ofc->pb);
- #else
                url_fclose(&ofc->pb);
- #endif
        }

        /* free the stream */
--- 277,283 ----
Put it in a file called zm_mpeg_cpp.patch in the ZoneMinder-1.23.2/src directory and issue the following command in the ZoneMinder-1.23.2/src dircetory:

patch -p0 < zm_mpeg_cpp.patch

Or change the line that reads;

url_fclose(ofc->pb);

to;

url_fclose(&ofc->pb);

same as the line 2 below it.

It appears as though either the test for ZM_FFMPEG_SVN is failing or there is effectively no difference between the two calls, thus rendering the if statement redundant.

WARNING! This is not an official patch and the results of it have not been tested! Use at your own risk WARNING!

Cheers,
badone

[edit]Fixed typo in patch file name[/edit]