RH 9, ZM 1.20.1 FFMPEG 0.4.9 Compile Issue
RH 9, ZM 1.20.1 FFMPEG 0.4.9 Compile Issue
System: Redhat 9
ZoneMinder: 1.20.1
FFMPEG: 0.4.9-pre1
I'm having a compilation issue that I've tried numerous things to fix with no luck at all. I've searched and can't seem to find anything that helps, so this will be long but I'll try to make it straight forward. Here's what I do.
# cd /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1
# make
# make install
That goes off without a hitch. Then:
# cd /opt/Software/ZoneMinder/zm-1.20.1
# ./configure --with-ffmpeg=/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1 --with-mysql=/usr --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache
This results in:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: WARNING: You can call configure with the --with-lame option.
This tells configure where to find the Lame library which can be used by the ffmpeg libraries
to generate IE compatible MPEG audio streams. This option is only necessary if you have built
the ffmpeg package itself with the --enable-mp3lame option and if the normal link cannot
find the library. Using mp3lame is not necessary or of any benefit to ZoneMinder per se.
e.g. --with-lame=/use/local/lib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking how to run the C++ preprocessor... g++ -E
checking pcre/pcre.h usability... yes
checking pcre/pcre.h presence... yes
checking for pcre/pcre.h... yes
checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
checking whether round is declared... yes
checking whether strsignal is declared... yes
checking whether MD5 is declared... yes
checking for jpeg_start_compress in -ljpeg... yes
checking for compress in -lz... yes
checking for dlsym in -ldl... yes
checking for mysql_init in -lmysqlclient... yes
checking for MD5 in -lcrypto... yes
checking for pcre_compile in -lpcre... yes
checking for avcodec_init in -lavcodec... yes
checking for av_new_stream in -lavformat... no
configure: WARNING: libavformat.a is required for MPEG streaming
checking for lame_init in -lmp3lame... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating web/Makefile
config.status: creating scripts/Makefile
config.status: creating db/Makefile
config.status: creating zmconfig.pl
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
checking for zmconfig.txt... no
configure: WARNING: Now run 'perl zmconfig.pl' to create your ZoneMinder configuration
Notice the bold warning above? I've tried to fix this in some other steps as well. So, I went ahead and ran:
# perl zmconfig.pl
And answered all the questions appropriatly. I tried saying yes and no to the ffmpeg question, no difference seemed to occur. I then created the db:
# cd db
# mysql < zmschema.sql
# cd ..
I then granted my user permissions in mysql, and ran:
# perl zmconfig.pl -noi
And the output was normal. So I tried `make`, and got this error at the end:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include -g -O2 -MT zm_event.o -MD -MP -MF ".deps/zm_event.Tpo" -c -o zm_event.o zm_event.cpp; \
then mv -f ".deps/zm_event.Tpo" ".deps/zm_event.Po"; else rm -f ".deps/zm_event.Tpo"; exit 1; fi
In file included from zm_event.cpp:29:
zm_mpeg.h:27:29: ffmpeg/avformat.h: No such file or directory
In file included from zm_event.cpp:29:
zm_mpeg.h:37: use of enum `PixelFormat' without previous declaration
zm_mpeg.h:37: field `pf' has incomplete type
zm_mpeg.h:38: syntax error before `*' token
zm_mpeg.h:39: syntax error before `*' token
zm_mpeg.h:40: syntax error before `*' token
zm_mpeg.h:41: syntax error before `*' token
zm_mpeg.h:42: syntax error before `*' token
zm_mpeg.h:43: syntax error before `*' token
zm_mpeg.h:58: `uint8_t' was not declared in this scope
zm_mpeg.h:58: `buffer' was not declared in this scope
zm_mpeg.h:58: parse error before `,' token
make[2]: *** [zm_event.o] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
So, since it was trying to find the /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h file, and there is no include directory in the ffmpeg release, I tried this:
# cd /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1
# mkdir include
# cd include
# ln -s ../libavformat ffmpeg
That way, it would find the missing file. I ran through the whole process of configure and zmconfig.pl and make again, after deleting and re-extracting ZM and dropping the database, and `make` outputted this error:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include -g -O2 -MT zm_event.o -MD -MP
then mv -f ".deps/zm_event.Tpo" ".deps/zm_event.Po"; else rm -f ".deps/zm_event.Tpo"; exit 1; fi
In file included from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:16:21: avcodec.h: No such file or directory
In file included from /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:18,
from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:72: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:72: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:73: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:73: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:83: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:91: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:91: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:92: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:92: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:97: type specifier
omitted for parameter `uint64_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:97: parse error
before `)' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:98: type specifier
omitted for parameter `uint64_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:98: parse error
before `)' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:128: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:135: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:149: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:149: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:154: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:154: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:157: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:158: parse error
before `*' token
In file included from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:35: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h: In function
`void av_init_packet(AVPacket*)':
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:48: `
AV_NOPTS_VALUE' undeclared (first use this function)
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:48: (Each
undeclared identifier is reported only once for each function it appears
in.)
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h: At global
scope:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:104: use of
enum `PixelFormat' without previous declaration
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:104: field `
pix_fmt' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:131: use of
enum `CodecID' without previous declaration
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:131: field `
audio_codec' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:132: field `
video_codec' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:206: '
AVCodecContext' is used as a type, but is not defined as a type.
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:215: '
AVRational' is used as a type, but is not defined as a type.
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:250: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:294: ISO C++
forbids declaration of `uint8_t' with no type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:294: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:316: field `
pix_fmt' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:320: '
AVPicture' is used as a type, but is not defined as a type.
In file included from /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:487,
from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:42: `AVCodecContext
' was not declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:42: `codec' was not
declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:42: parse error
before `)' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:43: `AVCodecContext
' was not declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:43: `codec' was not
declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:49: parse error
before `*' token
In file included from /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:489,
from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtsp.h:45: 'uint32_t' is
used as a type, but is not defined as a type.
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtsp.h:69: 'uint32_t' is
used as a type, but is not defined as a type.
In file included from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:502: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:502: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:508: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:509: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:514: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:514: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:515: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:515: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:516: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:516: parse
error before `*' token
In file included from zm_event.cpp:29:
zm_mpeg.h:37: field `pf' has incomplete type
zm_mpeg.h:41: syntax error before `*' token
zm_mpeg.h:42: syntax error before `*' token
zm_mpeg.h:43: syntax error before `*' token
zm_mpeg.h:58: `uint8_t' was not declared in this scope
zm_mpeg.h:58: `buffer' was not declared in this scope
zm_mpeg.h:58: parse error before `,' token
make[2]: *** [zm_event.o] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
So this time it couldn't find avcodec.h, so I tried one final attempt:
# cd /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1
# rm -rf include
# mkdir include
# cd include
# mkdir ffmpeg
# cd ffmpeg
# cp -ar ../../libavformat/* .
# cp -ar ../../libavcodec/* .
This would force it to find all the missing files. I ran through everything again and `make` outputted:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include -g -O2 -MT zm_debug.o -MD -MP -MF ".deps/zm_debug.Tpo" -c -o zm_debug.o zm_debug.c; \
then mv -f ".deps/zm_debug.Tpo" ".deps/zm_debug.Po"; else rm -f ".deps/zm_debug.Tpo"; exit 1; fi
g++ -g -O2 -L -L/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/lib -L/usr/lib/mysql -o zmc zmc.o zm.o zm_db.o zm_config.o zm_coord.o zm_box.o zm_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o zm_remote_camera.o zm_monitor.o zm_user.o zm_mpeg.o zm_jpeg.o zm_regexp.o zm_buffer.o zm_debug.o -L/usr/lib/mysql -lmp3lame -lavcodec -lpcre -lcrypto -lmysqlclient -ldl -lz -ljpeg
zm_mpeg.o(.text+0x7): In function `VideoStream::Initialise()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:32: undefined reference to `av_register_all'
zm_mpeg.o(.text+0x31): In function `VideoStream::SetupFormat(char const*, char const*)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:42: undefined reference to `guess_format'
zm_mpeg.o(.text+0x71):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:46: undefined reference to `guess_format'
zm_mpeg.o(.text+0x155): In function `VideoStream::SetupCodec(int, int, int, int, int)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:72: undefined reference to `av_new_stream'
zm_mpeg.o(.text+0x1ef): In function `VideoStream::SetParameters()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:107: undefined reference to `av_set_parameters'
zm_mpeg.o(.text+0x2f9): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:175: undefined reference to `url_fopen'
zm_mpeg.o(.text+0x666): In function `VideoStream::~VideoStream [not-in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x69f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x6b5):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x736): In function `VideoStream::~VideoStream [in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x76f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x785):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x91b): In function `VideoStream::EncodeFrame(unsigned char*, int, bool, unsigned)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:314: undefined reference to `av_write_frame'
zm_mpeg.o(.text+0x28f): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:199: undefined reference to `av_write_header'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
This time, no missing files, so I'm at a total loss. Any ideas?
ZoneMinder: 1.20.1
FFMPEG: 0.4.9-pre1
I'm having a compilation issue that I've tried numerous things to fix with no luck at all. I've searched and can't seem to find anything that helps, so this will be long but I'll try to make it straight forward. Here's what I do.
# cd /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1
# make
# make install
That goes off without a hitch. Then:
# cd /opt/Software/ZoneMinder/zm-1.20.1
# ./configure --with-ffmpeg=/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1 --with-mysql=/usr --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache
This results in:
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
configure: WARNING: You can call configure with the --with-lame option.
This tells configure where to find the Lame library which can be used by the ffmpeg libraries
to generate IE compatible MPEG audio streams. This option is only necessary if you have built
the ffmpeg package itself with the --enable-mp3lame option and if the normal link cannot
find the library. Using mp3lame is not necessary or of any benefit to ZoneMinder per se.
e.g. --with-lame=/use/local/lib
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking how to run the C++ preprocessor... g++ -E
checking pcre/pcre.h usability... yes
checking pcre/pcre.h presence... yes
checking for pcre/pcre.h... yes
checking pcre.h usability... no
checking pcre.h presence... no
checking for pcre.h... no
checking whether round is declared... yes
checking whether strsignal is declared... yes
checking whether MD5 is declared... yes
checking for jpeg_start_compress in -ljpeg... yes
checking for compress in -lz... yes
checking for dlsym in -ldl... yes
checking for mysql_init in -lmysqlclient... yes
checking for MD5 in -lcrypto... yes
checking for pcre_compile in -lpcre... yes
checking for avcodec_init in -lavcodec... yes
checking for av_new_stream in -lavformat... no
configure: WARNING: libavformat.a is required for MPEG streaming
checking for lame_init in -lmp3lame... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating web/Makefile
config.status: creating scripts/Makefile
config.status: creating db/Makefile
config.status: creating zmconfig.pl
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
checking for zmconfig.txt... no
configure: WARNING: Now run 'perl zmconfig.pl' to create your ZoneMinder configuration
Notice the bold warning above? I've tried to fix this in some other steps as well. So, I went ahead and ran:
# perl zmconfig.pl
And answered all the questions appropriatly. I tried saying yes and no to the ffmpeg question, no difference seemed to occur. I then created the db:
# cd db
# mysql < zmschema.sql
# cd ..
I then granted my user permissions in mysql, and ran:
# perl zmconfig.pl -noi
And the output was normal. So I tried `make`, and got this error at the end:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include -g -O2 -MT zm_event.o -MD -MP -MF ".deps/zm_event.Tpo" -c -o zm_event.o zm_event.cpp; \
then mv -f ".deps/zm_event.Tpo" ".deps/zm_event.Po"; else rm -f ".deps/zm_event.Tpo"; exit 1; fi
In file included from zm_event.cpp:29:
zm_mpeg.h:27:29: ffmpeg/avformat.h: No such file or directory
In file included from zm_event.cpp:29:
zm_mpeg.h:37: use of enum `PixelFormat' without previous declaration
zm_mpeg.h:37: field `pf' has incomplete type
zm_mpeg.h:38: syntax error before `*' token
zm_mpeg.h:39: syntax error before `*' token
zm_mpeg.h:40: syntax error before `*' token
zm_mpeg.h:41: syntax error before `*' token
zm_mpeg.h:42: syntax error before `*' token
zm_mpeg.h:43: syntax error before `*' token
zm_mpeg.h:58: `uint8_t' was not declared in this scope
zm_mpeg.h:58: `buffer' was not declared in this scope
zm_mpeg.h:58: parse error before `,' token
make[2]: *** [zm_event.o] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
So, since it was trying to find the /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h file, and there is no include directory in the ffmpeg release, I tried this:
# cd /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1
# mkdir include
# cd include
# ln -s ../libavformat ffmpeg
That way, it would find the missing file. I ran through the whole process of configure and zmconfig.pl and make again, after deleting and re-extracting ZM and dropping the database, and `make` outputted this error:
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include -g -O2 -MT zm_event.o -MD -MP
then mv -f ".deps/zm_event.Tpo" ".deps/zm_event.Po"; else rm -f ".deps/zm_event.Tpo"; exit 1; fi
In file included from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:16:21: avcodec.h: No such file or directory
In file included from /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:18,
from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:72: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:72: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:73: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:73: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:83: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:91: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:91: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:92: type specifier
omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:92: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:97: type specifier
omitted for parameter `uint64_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:97: parse error
before `)' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:98: type specifier
omitted for parameter `uint64_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:98: parse error
before `)' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:128: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:135: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:149: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:149: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:154: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:154: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:157: parse error
before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avio.h:158: parse error
before `*' token
In file included from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:35: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h: In function
`void av_init_packet(AVPacket*)':
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:48: `
AV_NOPTS_VALUE' undeclared (first use this function)
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:48: (Each
undeclared identifier is reported only once for each function it appears
in.)
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h: At global
scope:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:104: use of
enum `PixelFormat' without previous declaration
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:104: field `
pix_fmt' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:131: use of
enum `CodecID' without previous declaration
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:131: field `
audio_codec' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:132: field `
video_codec' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:206: '
AVCodecContext' is used as a type, but is not defined as a type.
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:215: '
AVRational' is used as a type, but is not defined as a type.
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:250: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:294: ISO C++
forbids declaration of `uint8_t' with no type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:294: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:316: field `
pix_fmt' has incomplete type
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:320: '
AVPicture' is used as a type, but is not defined as a type.
In file included from /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:487,
from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:42: `AVCodecContext
' was not declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:42: `codec' was not
declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:42: parse error
before `)' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:43: `AVCodecContext
' was not declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:43: `codec' was not
declared in this scope
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtp.h:49: parse error
before `*' token
In file included from /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:489,
from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtsp.h:45: 'uint32_t' is
used as a type, but is not defined as a type.
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/rtsp.h:69: 'uint32_t' is
used as a type, but is not defined as a type.
In file included from zm_mpeg.h:27,
from zm_event.cpp:29:
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:502: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:502: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:508: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:509: syntax
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:514: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:514: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:515: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:515: parse
error before `*' token
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:516: type
specifier omitted for parameter `uint8_t'
/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include/ffmpeg/avformat.h:516: parse
error before `*' token
In file included from zm_event.cpp:29:
zm_mpeg.h:37: field `pf' has incomplete type
zm_mpeg.h:41: syntax error before `*' token
zm_mpeg.h:42: syntax error before `*' token
zm_mpeg.h:43: syntax error before `*' token
zm_mpeg.h:58: `uint8_t' was not declared in this scope
zm_mpeg.h:58: `buffer' was not declared in this scope
zm_mpeg.h:58: parse error before `,' token
make[2]: *** [zm_event.o] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
So this time it couldn't find avcodec.h, so I tried one final attempt:
# cd /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1
# rm -rf include
# mkdir include
# cd include
# mkdir ffmpeg
# cd ffmpeg
# cp -ar ../../libavformat/* .
# cp -ar ../../libavcodec/* .
This would force it to find all the missing files. I ran through everything again and `make` outputted:
if gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -I/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/include -g -O2 -MT zm_debug.o -MD -MP -MF ".deps/zm_debug.Tpo" -c -o zm_debug.o zm_debug.c; \
then mv -f ".deps/zm_debug.Tpo" ".deps/zm_debug.Po"; else rm -f ".deps/zm_debug.Tpo"; exit 1; fi
g++ -g -O2 -L -L/opt/Software/ffmpeg/ffmpeg-0.4.9-pre1/lib -L/usr/lib/mysql -o zmc zmc.o zm.o zm_db.o zm_config.o zm_coord.o zm_box.o zm_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o zm_remote_camera.o zm_monitor.o zm_user.o zm_mpeg.o zm_jpeg.o zm_regexp.o zm_buffer.o zm_debug.o -L/usr/lib/mysql -lmp3lame -lavcodec -lpcre -lcrypto -lmysqlclient -ldl -lz -ljpeg
zm_mpeg.o(.text+0x7): In function `VideoStream::Initialise()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:32: undefined reference to `av_register_all'
zm_mpeg.o(.text+0x31): In function `VideoStream::SetupFormat(char const*, char const*)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:42: undefined reference to `guess_format'
zm_mpeg.o(.text+0x71):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:46: undefined reference to `guess_format'
zm_mpeg.o(.text+0x155): In function `VideoStream::SetupCodec(int, int, int, int, int)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:72: undefined reference to `av_new_stream'
zm_mpeg.o(.text+0x1ef): In function `VideoStream::SetParameters()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:107: undefined reference to `av_set_parameters'
zm_mpeg.o(.text+0x2f9): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:175: undefined reference to `url_fopen'
zm_mpeg.o(.text+0x666): In function `VideoStream::~VideoStream [not-in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x69f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x6b5):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x736): In function `VideoStream::~VideoStream [in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x76f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x785):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x91b): In function `VideoStream::EncodeFrame(unsigned char*, int, bool, unsigned)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:314: undefined reference to `av_write_frame'
zm_mpeg.o(.text+0x28f): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:199: undefined reference to `av_write_header'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
This time, no missing files, so I'm at a total loss. Any ideas?
Ben
It sounds like you need to correctly install the Library files for ffmpeg.
See this thread:
http://www.zoneminder.com/forums/viewto ... nstalllibs
or
http://www.zoneminder.com/forums/viewto ... stall+libs
or check ffmpeg.sourceforge.com for the correct way to do this.
should be as easy as adding --enable shared to the configure line.
Cheers,
Cordel
See this thread:
http://www.zoneminder.com/forums/viewto ... nstalllibs
or
http://www.zoneminder.com/forums/viewto ... stall+libs
or check ffmpeg.sourceforge.com for the correct way to do this.
should be as easy as adding --enable shared to the configure line.
Cheers,
Cordel
I actually tried the --with-shared, didn't realize until just now after retrying that it produced a different error. I tried using /usr/local and /opt/Software/ffmpeg/ffmpeg-0.4.9-pre1 as the --with-ffmpeg directory. Both times I got this:
g++ -g -O2 -L -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_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o zm_remote_camera.o zm_monitor.o zm_user.o zm_mpeg.o zm_jpeg.o zm_regexp.o zm_buffer.o zm_debug.o -L/usr/lib/mysql -lmp3lame -lavcodec -lpcre -lcrypto -lmysqlclient -ldl -lz -ljpeg
zm_mpeg.o(.text+0x7): In function `VideoStream::Initialise()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:32: undefined reference to `av_register_all'
zm_mpeg.o(.text+0x31): In function `VideoStream::SetupFormat(char const*, char const*)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:42: undefined reference to `guess_format'
zm_mpeg.o(.text+0x71):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:46: undefined reference to `guess_format'
zm_mpeg.o(.text+0x155): In function `VideoStream::SetupCodec(int, int, int, int, int)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:72: undefined reference to `av_new_stream'
zm_mpeg.o(.text+0x1ef): In function `VideoStream::SetParameters()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:107: undefined reference to `av_set_parameters'
zm_mpeg.o(.text+0x2f9): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:175: undefined reference to `url_fopen'
zm_mpeg.o(.text+0x666): In function `VideoStream::~VideoStream [not-in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x69f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x6b5):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x736): In function `VideoStream::~VideoStream [in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x76f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x785):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x91b): In function `VideoStream::EncodeFrame(unsigned char*, int, bool, unsigned)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:314: undefined reference to `av_write_frame'
zm_mpeg.o(.text+0x28f): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:199: undefined reference to `av_write_header'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
On another note, just playing around, I was able to get zm-1.19.0 to compile using ffmpeg 0.4.8. However, I'd much rather be using the newest versions of things.
g++ -g -O2 -L -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_image.o zm_event.o zm_zone.o zm_camera.o zm_local_camera.o zm_remote_camera.o zm_monitor.o zm_user.o zm_mpeg.o zm_jpeg.o zm_regexp.o zm_buffer.o zm_debug.o -L/usr/lib/mysql -lmp3lame -lavcodec -lpcre -lcrypto -lmysqlclient -ldl -lz -ljpeg
zm_mpeg.o(.text+0x7): In function `VideoStream::Initialise()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:32: undefined reference to `av_register_all'
zm_mpeg.o(.text+0x31): In function `VideoStream::SetupFormat(char const*, char const*)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:42: undefined reference to `guess_format'
zm_mpeg.o(.text+0x71):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:46: undefined reference to `guess_format'
zm_mpeg.o(.text+0x155): In function `VideoStream::SetupCodec(int, int, int, int, int)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:72: undefined reference to `av_new_stream'
zm_mpeg.o(.text+0x1ef): In function `VideoStream::SetParameters()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:107: undefined reference to `av_set_parameters'
zm_mpeg.o(.text+0x2f9): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:175: undefined reference to `url_fopen'
zm_mpeg.o(.text+0x666): In function `VideoStream::~VideoStream [not-in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x69f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x6b5):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x736): In function `VideoStream::~VideoStream [in-charge]()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:232: undefined reference to `av_write_trailer'
zm_mpeg.o(.text+0x76f):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:243: undefined reference to `url_fclose'
zm_mpeg.o(.text+0x785):/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:237: undefined reference to `av_freep'
zm_mpeg.o(.text+0x91b): In function `VideoStream::EncodeFrame(unsigned char*, int, bool, unsigned)':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:314: undefined reference to `av_write_frame'
zm_mpeg.o(.text+0x28f): In function `VideoStream::OpenStream()':
/opt/Software/ZoneMinder/zm-1.20.1/src/zm_mpeg.cpp:199: undefined reference to `av_write_header'
collect2: ld returned 1 exit status
make[2]: *** [zmc] Error 1
make[2]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/Software/ZoneMinder/zm-1.20.1'
make: *** [all] Error 2
On another note, just playing around, I was able to get zm-1.19.0 to compile using ffmpeg 0.4.8. However, I'd much rather be using the newest versions of things.
Ben
You might want to check the ffmpeg site for clues. I don't run RH9 anymore due to lack of machines but I know there are a lot of changes in the cvs version and I think it requires gcc 3.2 as a minimum allong with several other requierments that you will need to make sure you meet. I'm not sure if this will require a rebuild of the tool chain or not but unless RH9 had all the updates you need before RH stopped supporting it, It might be a job.
OK, I will look into it. I also found that the change that causes the problem on my machine is in zm-1.19.1. From that version on the:
configure: WARNING: libavformat.a is required for MPEG streaming
comes up, but 1.19.0 compiles like a champ. I'll probably just give 1.19.0 a go and make sure this app is what I'm looking for before looking into a full system upgrade. This is also my MythTV box, so I'd rather not do any big system changes. I'm suprised there are no other Redhat9 users out there having this issue though
configure: WARNING: libavformat.a is required for MPEG streaming
comes up, but 1.19.0 compiles like a champ. I'll probably just give 1.19.0 a go and make sure this app is what I'm looking for before looking into a full system upgrade. This is also my MythTV box, so I'd rather not do any big system changes. I'm suprised there are no other Redhat9 users out there having this issue though
Ben
FFMPEg on RH9 should be set with prefix /usr insted of the /usr/share it defualts too so the it places its shared files in lib. you should also do an ldconfig after placing the files there and you can also do "make installlibs" (or maybe make installlib sorry it's been a while) from the ffmpeg build dir will install the shared files then do ldconfig.
OK, so I got 1.19.0 installed, but is there a way for me to point it at a different lib directory, or a way for me to just turn MPEG off alltogether? I get this:
root@myth:~# zmc -device 1
zmc: relocation error: /usr/local/lib/libavformat.so: undefined symbol: av_freep
root@myth:~#
and I assume it's because my lib files are the new version of ffmpeg files and not the version I compiled with. /dev/video1 works fine in MythTv (bttv card I just put in)
root@myth:~# zmc -device 1
zmc: relocation error: /usr/local/lib/libavformat.so: undefined symbol: av_freep
root@myth:~#
and I assume it's because my lib files are the new version of ffmpeg files and not the version I compiled with. /dev/video1 works fine in MythTv (bttv card I just put in)
Ben
You might be able to install the version you compiled with with a prefix=/usr/local then compile zm with --with-ffmpeg=/usr/local and leave the other newer version prefix=/usr or visa/versa. I don't know that it would work as I have never tried and is beyond my current knowledge.
As for turning it off in ZM I think you just don't add --with-ffmpeg in the configure script but Phil would know better than I.
As for turning it off in ZM I think you just don't add --with-ffmpeg in the configure script but Phil would know better than I.
Alrighty, got one step farther. "zmc -d 1" ran good, but did nothing. However, I was dumb and ran it as root instead of apache, so now I'm getting:
/var/log/messages
Mar 18 00:19:35 myth zms[6940]: ERR [Can't shmget: Permission denied]
/var/log/zm/zmwatch.log
Can't read from shared memory '2053971970/36241410': Permission denied
How do I reset these permissions for apache? The output of ipcs -m is:
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 0 root 600 655360 2
0x00000000 32769 root 777 1627792 2
0x7a6d2002 36241410 root 700 23040448 0
/var/log/messages
Mar 18 00:19:35 myth zms[6940]: ERR [Can't shmget: Permission denied]
/var/log/zm/zmwatch.log
Can't read from shared memory '2053971970/36241410': Permission denied
How do I reset these permissions for apache? The output of ipcs -m is:
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 0 root 600 655360 2
0x00000000 32769 root 777 1627792 2
0x7a6d2002 36241410 root 700 23040448 0
Ben
Success! I just rebooted the darn thing to free up the memory address. All works well now. I ended up biting the bullet and downgrading my system ffmpeg to 0.4.8, then going through some tests with mythtv to ensure that the downgrade didn't cause any problems.
So now I have mythtv running on /dev/video0 (ivtv card) and ZoneMinder running on /dev/video1 (bttv card).
So now I have mythtv running on /dev/video0 (ivtv card) and ZoneMinder running on /dev/video1 (bttv card).
Ben