Compile/Make Error 1.26.4 on Fedora 19 64-bit ffmpeg headers
Posted: Wed Oct 09, 2013 8:17 pm
I am having trouble compiling Zoneminder 1.26.4 from source using the cmake method. It seems that the ffmpeg headers are not being found automatically by the cmake process. My system runs:
Linux pollux.gutierrez.com 3.11.3-201.fc19.i686.PAE #1 SMP Thu Oct 3 01:11:40 UTC 2013 i686 i686 i386 GNU/Linux
The ffmpeg version is:
ffmpeg-libs-1.2.3-1.fc19.i686
ffmpeg-1.2.3-1.fc19.i686
ffmpeg-devel-1.2.3-1.fc19.i686
The ffmpeg headers are installed in /usr/include/ffmpeg
The libraries are in /usr/lib
I am attempting to upgrade a Zoneminder 1.25.0 compiled from source into 1.26.4. I have done the following steps:
./cmakecacheimport.sh /usr/local/etc/zm.conf
cat zm_conf.cmake
# Generated by cmakecacheimport.sh
set(CMAKE_INSTALL_FULL_BINDIR "/usr/local/bin" CACHE PATH "Imported by cmakecacheimport.sh" FORCE)
set(ZM_WEBDIR "/var/www/docs/zm" CACHE PATH "Imported by cmakecacheimport.sh" FORCE)
set(ZM_CGIDIR "/var/www/cgi-bin" CACHE PATH "Imported by cmakecacheimport.sh" FORCE)
set(ZM_WEB_USER "apache" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_WEB_GROUP "apache" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_HOST "localhost" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_NAME "zm" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_USER "XXXXXXX" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_PASS "XXXXXXX" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
cmake -C zm_conf.cmake .
loading initial cache file zm_conf.cmake
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for ucontext.h
-- Looking for ucontext.h - found
-- Looking for sys/sendfile.h
-- Looking for sys/sendfile.h - found
-- Looking for sys/syscall.h
-- Looking for sys/syscall.h - found
-- Looking for syscall
-- Looking for syscall - found
-- Looking for sendfile
-- Looking for sendfile - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Checking prototype round for HAVE_DECL_ROUND - True
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of siginfo_t
-- Check size of siginfo_t - done
-- Check size of ucontext_t
-- Check size of ucontext_t - done
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.7")
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Found JPEG: /usr/lib/libjpeg.so
-- Looking for include files stdio.h, jpeglib.h
-- Looking for include files stdio.h, jpeglib.h - found
-- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so (found version "1.0.1e")
-- Looking for openssl/md5.h
-- Looking for openssl/md5.h - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pcre.h
-- Looking for pcre.h - found
-- Looking for gcrypt.h
-- Looking for gcrypt.h - found
-- Looking for gnutls/openssl.h
-- Looking for gnutls/openssl.h - not found
-- Looking for gnutls/gnutls.h
-- Looking for gnutls/gnutls.h - found
-- Looking for mysql/mysql.h
-- Looking for mysql/mysql.h - found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for libavcodec/avcodec.h
-- Looking for libavcodec/avcodec.h - not found
-- Looking for libavdevice/avdevice.h
-- Looking for libavdevice/avdevice.h - not found
-- Looking for libavutil/avutil.h
-- Looking for libavutil/avutil.h - not found
-- Looking for libavutil/mathematics.h
-- Looking for libavutil/mathematics.h - not found
-- Looking for libswscale/swscale.h
-- Looking for libswscale/swscale.h - not found
-- Checking prototype MD5 for HAVE_MD5_OPENSSL - True
-- Checking prototype gnutls_fingerprint for HAVE_DECL_GNUTLS_FINGERPRINT - True
-- Found Perl: /usr/local/bin/perl (found version "5.16.3")
-- Checking for perl module Sys::Syslog
-- Checking for perl module Sys::Syslog - found at /usr/lib/perl5/vendor_perl/Sys/Syslog.pm
-- Checking for perl module DBI
-- Checking for perl module DBI - found at /usr/lib/perl5/vendor_perl/DBI.pm
-- Checking for perl module DBD::mysql
-- Checking for perl module DBD::mysql - found at /usr/lib/perl5/vendor_perl/DBD/mysql.pm
-- Checking for perl module Getopt::Long
-- Checking for perl module Getopt::Long - found at /usr/share/perl5/Getopt/Long.pm
-- Checking for perl module Time::HiRes
-- Checking for perl module Time::HiRes - found at /usr/lib/perl5/Time/HiRes.pm
-- Checking for perl module Date::Manip
-- Checking for perl module Date::Manip - found at /usr/share/perl5/vendor_perl/Date/Manip.pm
-- Checking for perl module LWP::UserAgent
-- Checking for perl module LWP::UserAgent - found at /usr/share/perl5/LWP/UserAgent.pm
-- Checking for perl module ExtUtils::MakeMaker
-- Checking for perl module ExtUtils::MakeMaker - found at /usr/share/perl5/vendor_perl/ExtUtils/MakeMaker.pm
-- Checking for perl module Sys::Mmap
-- Checking for perl module Sys::Mmap - found at /usr/lib/perl5/vendor_perl/Sys/Mmap.pm
-- Found PerlModules: TRUE
-- Using web user: apache
-- Using web group: apache
-- Using mootools core file: mootools-core-1.3.2-yc.js
-- Using mootools more file: mootools-more-1.3.2.1-yc.js
-- Running ZoneMinder configuration generator
Generating 'src/zm_config_defines.h'
Updating 'db/zm_create.sql'
-- ZoneMinder configuration generator completed successfully
-- Configuring done
-- Generating done
-- Build files have been written to: /home/carlos/ZoneMinder-1.26.4
make
Scanning dependencies of target zm
[ 1%] Building CXX object src/CMakeFiles/zm.dir/zm_box.cpp.o
[ 3%] Building CXX object src/CMakeFiles/zm.dir/zm_buffer.cpp.o
In file included from /home/carlos/ZoneMinder-1.26.4/src/zm_buffer.cpp:23:0:
/home/carlos/ZoneMinder-1.26.4/src/zm_buffer.h: In member function ‘void Buffer::tidy(bool)’:
/home/carlos/ZoneMinder-1.26.4/src/zm_buffer.h:156:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( (mHead-mStorage) > mSize )
^
[ 5%] Building CXX object src/CMakeFiles/zm.dir/zm_camera.cpp.o
[ 7%] Building CXX object src/CMakeFiles/zm.dir/zm_comms.cpp.o
[ 9%] Building CXX object src/CMakeFiles/zm.dir/zm_config.cpp.o
[ 11%] Building CXX object src/CMakeFiles/zm.dir/zm_coord.cpp.o
[ 13%] Building CXX object src/CMakeFiles/zm.dir/zm.cpp.o
[ 15%] Building CXX object src/CMakeFiles/zm.dir/zm_db.cpp.o
[ 16%] Building CXX object src/CMakeFiles/zm.dir/zm_logger.cpp.o
[ 18%] Building CXX object src/CMakeFiles/zm.dir/zm_event.cpp.o
In file included from /home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:23:0,
from /home/carlos/ZoneMinder-1.26.4/src/zm_event.cpp:34:
/home/carlos/ZoneMinder-1.26.4/src/zm_ffmpeg.h:65:45: error: missing binary operator before token "("
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 4, 0)
^
In file included from /home/carlos/ZoneMinder-1.26.4/src/zm_event.cpp:34:0:
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:43:7: error: use of enum ‘PixelFormat’ without previous declaration
enum PixelFormat pf;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:44:2: error: ‘AVOutputFormat’ does not name a type
AVOutputFormat *of;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:45:2: error: ‘AVFormatContext’ does not name a type
AVFormatContext *ofc;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:46:2: error: ‘AVStream’ does not name a type
AVStream *ost;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:47:2: error: ‘AVFrame’ does not name a type
AVFrame *opicture;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:48:2: error: ‘AVFrame’ does not name a type
AVFrame *tmp_opicture;
^
make[2]: *** [src/CMakeFiles/zm.dir/zm_event.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make: *** [all] Error 2
I am new to using cmake, Does anybody know the proper steps to get the ffmpeg headers recognized and found?
I tried doing
cmake -C zm_conf.cmake -DCMAKE_INCLUDE_PATH="/usr/include/ffmpeg" .
but that did not seem to work:
loading initial cache file zm_conf.cmake
-- Using web user: apache
-- Using web group: apache
-- Using mootools core file: mootools-core-1.3.2-yc.js
-- Using mootools more file: mootools-more-1.3.2.1-yc.js
-- Running ZoneMinder configuration generator
Generating 'src/zm_config_defines.h'
Updating 'db/zm_create.sql'
-- ZoneMinder configuration generator completed successfully
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INCLUDE_PATH
-- Build files have been written to: /home/carlos/ZoneMinder-1.26.4
Please help!
Linux pollux.gutierrez.com 3.11.3-201.fc19.i686.PAE #1 SMP Thu Oct 3 01:11:40 UTC 2013 i686 i686 i386 GNU/Linux
The ffmpeg version is:
ffmpeg-libs-1.2.3-1.fc19.i686
ffmpeg-1.2.3-1.fc19.i686
ffmpeg-devel-1.2.3-1.fc19.i686
The ffmpeg headers are installed in /usr/include/ffmpeg
The libraries are in /usr/lib
I am attempting to upgrade a Zoneminder 1.25.0 compiled from source into 1.26.4. I have done the following steps:
./cmakecacheimport.sh /usr/local/etc/zm.conf
cat zm_conf.cmake
# Generated by cmakecacheimport.sh
set(CMAKE_INSTALL_FULL_BINDIR "/usr/local/bin" CACHE PATH "Imported by cmakecacheimport.sh" FORCE)
set(ZM_WEBDIR "/var/www/docs/zm" CACHE PATH "Imported by cmakecacheimport.sh" FORCE)
set(ZM_CGIDIR "/var/www/cgi-bin" CACHE PATH "Imported by cmakecacheimport.sh" FORCE)
set(ZM_WEB_USER "apache" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_WEB_GROUP "apache" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_HOST "localhost" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_NAME "zm" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_USER "XXXXXXX" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
set(ZM_DB_PASS "XXXXXXX" CACHE STRING "Imported by cmakecacheimport.sh" FORCE)
cmake -C zm_conf.cmake .
loading initial cache file zm_conf.cmake
-- The C compiler identification is GNU 4.8.1
-- The CXX compiler identification is GNU 4.8.1
-- Check for working C compiler: /usr/lib/ccache/cc
-- Check for working C compiler: /usr/lib/ccache/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/lib/ccache/c++
-- Check for working CXX compiler: /usr/lib/ccache/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - found
-- Looking for execinfo.h
-- Looking for execinfo.h - found
-- Looking for ucontext.h
-- Looking for ucontext.h - found
-- Looking for sys/sendfile.h
-- Looking for sys/sendfile.h - found
-- Looking for sys/syscall.h
-- Looking for sys/syscall.h - found
-- Looking for syscall
-- Looking for syscall - found
-- Looking for sendfile
-- Looking for sendfile - found
-- Looking for backtrace
-- Looking for backtrace - found
-- Looking for backtrace_symbols
-- Looking for backtrace_symbols - found
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Checking prototype round for HAVE_DECL_ROUND - True
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of siginfo_t
-- Check size of siginfo_t - done
-- Check size of ucontext_t
-- Check size of ucontext_t - done
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.7")
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Found JPEG: /usr/lib/libjpeg.so
-- Looking for include files stdio.h, jpeglib.h
-- Looking for include files stdio.h, jpeglib.h - found
-- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so (found version "1.0.1e")
-- Looking for openssl/md5.h
-- Looking for openssl/md5.h - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pcre.h
-- Looking for pcre.h - found
-- Looking for gcrypt.h
-- Looking for gcrypt.h - found
-- Looking for gnutls/openssl.h
-- Looking for gnutls/openssl.h - not found
-- Looking for gnutls/gnutls.h
-- Looking for gnutls/gnutls.h - found
-- Looking for mysql/mysql.h
-- Looking for mysql/mysql.h - found
-- Looking for libavformat/avformat.h
-- Looking for libavformat/avformat.h - not found
-- Looking for libavcodec/avcodec.h
-- Looking for libavcodec/avcodec.h - not found
-- Looking for libavdevice/avdevice.h
-- Looking for libavdevice/avdevice.h - not found
-- Looking for libavutil/avutil.h
-- Looking for libavutil/avutil.h - not found
-- Looking for libavutil/mathematics.h
-- Looking for libavutil/mathematics.h - not found
-- Looking for libswscale/swscale.h
-- Looking for libswscale/swscale.h - not found
-- Checking prototype MD5 for HAVE_MD5_OPENSSL - True
-- Checking prototype gnutls_fingerprint for HAVE_DECL_GNUTLS_FINGERPRINT - True
-- Found Perl: /usr/local/bin/perl (found version "5.16.3")
-- Checking for perl module Sys::Syslog
-- Checking for perl module Sys::Syslog - found at /usr/lib/perl5/vendor_perl/Sys/Syslog.pm
-- Checking for perl module DBI
-- Checking for perl module DBI - found at /usr/lib/perl5/vendor_perl/DBI.pm
-- Checking for perl module DBD::mysql
-- Checking for perl module DBD::mysql - found at /usr/lib/perl5/vendor_perl/DBD/mysql.pm
-- Checking for perl module Getopt::Long
-- Checking for perl module Getopt::Long - found at /usr/share/perl5/Getopt/Long.pm
-- Checking for perl module Time::HiRes
-- Checking for perl module Time::HiRes - found at /usr/lib/perl5/Time/HiRes.pm
-- Checking for perl module Date::Manip
-- Checking for perl module Date::Manip - found at /usr/share/perl5/vendor_perl/Date/Manip.pm
-- Checking for perl module LWP::UserAgent
-- Checking for perl module LWP::UserAgent - found at /usr/share/perl5/LWP/UserAgent.pm
-- Checking for perl module ExtUtils::MakeMaker
-- Checking for perl module ExtUtils::MakeMaker - found at /usr/share/perl5/vendor_perl/ExtUtils/MakeMaker.pm
-- Checking for perl module Sys::Mmap
-- Checking for perl module Sys::Mmap - found at /usr/lib/perl5/vendor_perl/Sys/Mmap.pm
-- Found PerlModules: TRUE
-- Using web user: apache
-- Using web group: apache
-- Using mootools core file: mootools-core-1.3.2-yc.js
-- Using mootools more file: mootools-more-1.3.2.1-yc.js
-- Running ZoneMinder configuration generator
Generating 'src/zm_config_defines.h'
Updating 'db/zm_create.sql'
-- ZoneMinder configuration generator completed successfully
-- Configuring done
-- Generating done
-- Build files have been written to: /home/carlos/ZoneMinder-1.26.4
make
Scanning dependencies of target zm
[ 1%] Building CXX object src/CMakeFiles/zm.dir/zm_box.cpp.o
[ 3%] Building CXX object src/CMakeFiles/zm.dir/zm_buffer.cpp.o
In file included from /home/carlos/ZoneMinder-1.26.4/src/zm_buffer.cpp:23:0:
/home/carlos/ZoneMinder-1.26.4/src/zm_buffer.h: In member function ‘void Buffer::tidy(bool)’:
/home/carlos/ZoneMinder-1.26.4/src/zm_buffer.h:156:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if ( (mHead-mStorage) > mSize )
^
[ 5%] Building CXX object src/CMakeFiles/zm.dir/zm_camera.cpp.o
[ 7%] Building CXX object src/CMakeFiles/zm.dir/zm_comms.cpp.o
[ 9%] Building CXX object src/CMakeFiles/zm.dir/zm_config.cpp.o
[ 11%] Building CXX object src/CMakeFiles/zm.dir/zm_coord.cpp.o
[ 13%] Building CXX object src/CMakeFiles/zm.dir/zm.cpp.o
[ 15%] Building CXX object src/CMakeFiles/zm.dir/zm_db.cpp.o
[ 16%] Building CXX object src/CMakeFiles/zm.dir/zm_logger.cpp.o
[ 18%] Building CXX object src/CMakeFiles/zm.dir/zm_event.cpp.o
In file included from /home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:23:0,
from /home/carlos/ZoneMinder-1.26.4/src/zm_event.cpp:34:
/home/carlos/ZoneMinder-1.26.4/src/zm_ffmpeg.h:65:45: error: missing binary operator before token "("
#if LIBAVFORMAT_VERSION_INT < AV_VERSION_INT(53, 4, 0)
^
In file included from /home/carlos/ZoneMinder-1.26.4/src/zm_event.cpp:34:0:
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:43:7: error: use of enum ‘PixelFormat’ without previous declaration
enum PixelFormat pf;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:44:2: error: ‘AVOutputFormat’ does not name a type
AVOutputFormat *of;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:45:2: error: ‘AVFormatContext’ does not name a type
AVFormatContext *ofc;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:46:2: error: ‘AVStream’ does not name a type
AVStream *ost;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:47:2: error: ‘AVFrame’ does not name a type
AVFrame *opicture;
^
/home/carlos/ZoneMinder-1.26.4/src/zm_mpeg.h:48:2: error: ‘AVFrame’ does not name a type
AVFrame *tmp_opicture;
^
make[2]: *** [src/CMakeFiles/zm.dir/zm_event.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make: *** [all] Error 2
I am new to using cmake, Does anybody know the proper steps to get the ffmpeg headers recognized and found?
I tried doing
cmake -C zm_conf.cmake -DCMAKE_INCLUDE_PATH="/usr/include/ffmpeg" .
but that did not seem to work:
loading initial cache file zm_conf.cmake
-- Using web user: apache
-- Using web group: apache
-- Using mootools core file: mootools-core-1.3.2-yc.js
-- Using mootools more file: mootools-more-1.3.2.1-yc.js
-- Running ZoneMinder configuration generator
Generating 'src/zm_config_defines.h'
Updating 'db/zm_create.sql'
-- ZoneMinder configuration generator completed successfully
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
CMAKE_INCLUDE_PATH
-- Build files have been written to: /home/carlos/ZoneMinder-1.26.4
Please help!