make error

Support and queries relating to all previous versions of ZoneMinder
Locked
BadFish
Posts: 25
Joined: Wed Apr 19, 2006 6:18 pm

make error

Post by BadFish »

Hello,
I've been trying to install zoneminder and I keep getting this error when I attempt to issue the make command.

In file included from zm_event.cpp:29:
zm_mpeg.h:27:29: error: ffmpeg/avformat.h: No such file or directory
zm_mpeg.h:57: error: use of enum ‘PixelFormat’ without previous declaration
zm_mpeg.h:58: error: ISO C++ forbids declaration of ‘AVOutputFormat’ with no type
zm_mpeg.h:58: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:59: error: ISO C++ forbids declaration of ‘AVFormatContext’ with no type
zm_mpeg.h:59: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:60: error: ISO C++ forbids declaration of ‘AVStream’ with no type
zm_mpeg.h:60: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:61: error: ISO C++ forbids declaration of ‘AVFrame’ with no type
zm_mpeg.h:61: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:62: error: ISO C++ forbids declaration of ‘AVFrame’ with no type
zm_mpeg.h:62: error: expected ‘;’ before ‘*’ token
zm_mpeg.h:63: error: ISO C++ forbids declaration of ‘uint8_t’ with no type
zm_mpeg.h:63: error: expected ‘;’ before ‘*’ token


I am using Fedora Core 6
Zoneminder 1.22.3
I also followed the guide for fedora 6
I complied ffmpeg from the svn link I got from the installation documentation.
I did not see any errors when I installed it.
I also tried yum ffmpeg-devel with no results.
I also tried googling the error but have found nothing,
so if anyone here has any advise for me i'd really
appericate it.
BadFish
Posts: 25
Joined: Wed Apr 19, 2006 6:18 pm

Post by BadFish »

Well I found the information aboiut changing zm_mpeg.h and I did that.
http://www.zoneminder.com/wiki/index.ph ... tes#ffmpeg

I do
./configure
make
now I get this
zm_mpeg.cpp:280: error: cannot convert ‘ByteIOContext**’ to ‘ByteIOContext*’ for argument ‘1’ to ‘int url_fclose(ByteIOContext*)’
electron
Posts: 37
Joined: Fri Aug 19, 2005 6:43 am

Post by electron »

I had almost the exact same error messages also, ZM1.23.3 on FC7 64 bit, following the wiki's FC6 distro specific install, I used SVN checkout of ffmpeg. I did this to fix it: make uninstall, then make clean in ffmpeg folder to remove ffmpeg SVN version. Then I went to ATrpms site, enabled the repository by modifying my yum.conf file after importing ATrpms key. Then I did a yum install ffmpeg. It didn't work right the first time, it complained about libraw1394 at first, so I removed libraw1394, tried again, it had one other complaint about versions/compaitbility etc,, so I removed the other incompatible software. Then I was able to type yum install ffmpeg, & it installed the ATrpms version with no problem. Now all is well.
BadFish
Posts: 25
Joined: Wed Apr 19, 2006 6:18 pm

Post by BadFish »

OK I found this thread and I followed the advice to change line 280 in zm_mpeg.cpp,
http://www.zoneminder.com/forums/viewto ... ot+convert
url_fclose(&ofc->pb);
to
url_fclose(ofc->pb);

Now I get this error when I do make:

[root@Zoneminder ZoneMinder-1.22.3]# make
make all-recursive
make[1]: Entering directory `/root/ZoneMinder-1.22.3'
Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.22.3/src'
g++ -g -O3 -march=pentium4 -L/usr/local//lib -L/usr/lib/mysql -o zmc zmc.o zm.o zm_db.o zm_config.o zm_coord.o zm_box.o zm_poly.o zm_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o zm_remote_camera.o zm_file_camera.o zm_monitor.o zm_user.o zm_mpeg.o zm_jpeg.o zm_regexp.o zm_signal.o zm_buffer.o zm_debug.o -lavformat -lavcodec -lavutil -lpcre -lcrypto -lmysqlclient -ldl -lz -ljpeg
zm_mpeg.o: In function `VideoStream::EncodeFrame(unsigned char*, int, bool, unsigned int)':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:310: undefined reference to `img_convert(AVPicture*, int, AVPicture const*, int, int, int)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:339: undefined reference to `avcodec_encode_video(AVCodecContext*, unsigned char*, int, AVFrame const*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:346: undefined reference to `av_init_packet(AVPacket*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:351: undefined reference to `av_rescale_q(long long, AVRational, AVRational)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:359: undefined reference to `av_write_frame(AVFormatContext*, AVPacket*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:325: undefined reference to `av_init_packet(AVPacket*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:332: undefined reference to `av_write_frame(AVFormatContext*, AVPacket*)'
zm_mpeg.o: In function `~VideoStream':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:254: undefined reference to `avcodec_close(AVCodecContext*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:258: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:259: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:262: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:263: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:265: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:269: undefined reference to `av_write_trailer(AVFormatContext*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:274: undefined reference to `av_freep(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:280: undefined reference to `url_fclose(ByteIOContext*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:254: undefined reference to `avcodec_close(AVCodecContext*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:258: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:259: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:262: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:263: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:265: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:269: undefined reference to `av_write_trailer(AVFormatContext*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:274: undefined reference to `av_freep(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:280: undefined reference to `url_fclose(ByteIOContext*)'
zm_mpeg.o: In function `VideoStream::OpenStream()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:165: undefined reference to `avcodec_find_encoder(CodecID)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:172: undefined reference to `avcodec_open(AVCodecContext*, AVCodec*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:178: undefined reference to `avcodec_alloc_frame()'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:183: undefined reference to `avpicture_get_size(int, int, int)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:190: undefined reference to `avpicture_fill(AVPicture*, unsigned char*, int, int, int)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:198: undefined reference to `avcodec_alloc_frame()'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:203: undefined reference to `avpicture_get_size(int, int, int)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:210: undefined reference to `avpicture_fill(AVPicture*, unsigned char*, int, int, int)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:217: undefined reference to `url_fopen(ByteIOContext**, char const*, int)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:187: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:207: undefined reference to `av_free(void*)'
zm_mpeg.o: In function `VideoStream::SetParameters()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:126: undefined reference to `av_set_parameters(AVFormatContext*, AVFormatParameters*)'
zm_mpeg.o: In function `VideoStream::SetupCodec(int, int, int, int, int)':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:79: undefined reference to `av_new_stream(AVFormatContext*, int)'
zm_mpeg.o: In function `VideoStream::SetupFormat(char const*, char const*)':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:49: undefined reference to `guess_format(char const*, char const*, char const*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:61: undefined reference to `av_mallocz(unsigned int)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:53: undefined reference to `guess_format(char const*, char const*, char const*)'
zm_mpeg.o: In function `VideoStream::Initialise()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:39: undefined reference to `av_register_all()'
zm_mpeg.o: In function `VideoStream::SetParameters()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:126: undefined reference to `av_set_parameters(AVFormatContext*, AVFormatParameters*)'
zm_mpeg.o: In function `VideoStream::Initialise()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:39: undefined reference to `av_register_all()'
zm_mpeg.o: In function `VideoStream::SetParameters()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:126: undefined reference to `av_set_parameters(AVFormatContext*, AVFormatParameters*)'
zm_mpeg.o: In function `VideoStream::Initialise()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:39: undefined reference to `av_register_all()'
zm_mpeg.o: In function `~VideoStream':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:284: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:284: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:284: undefined reference to `av_free(void*)'
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:284: undefined reference to `av_free(void*)'
zm_mpeg.o: In function `VideoStream::OpenStream()':
/root/ZoneMinder-1.22.3/src/zm_mpeg.cpp:233: undefined reference to `av_write_header(AVFormatContext*)'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.22.3/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.22.3'
make: *** [all] Error 2


I've run out of ideas, and one ever deal with this issue care to share how they fixed it?
Locked