I am trying to upgrade my ZM 1.25.0 system running on CentOS 5.10
I got the latest tar, did the cmakecacheimport.sh and cmake.
Make returns
[ 1%] Building CXX object src/CMakeFiles/zm.dir/zm_box.cpp.o
/usr/include/bits/mathcalls.h:310: error: declaration of ‘double round(double) throw ()’ throws different exceptions
/root/other/ZoneMinder-1.26.4/src/zm.h:29: error: from previous declaration ‘double round(double)’
make[2]: *** [src/CMakeFiles/zm.dir/zm_box.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make: *** [all] Error 2
Any ideas?
Compile failure
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Re: Compile failure
Hi,
This is because zm includes its own version of round() for old systems that do not have the round() function.
It seems the detection fails to see you already have round() and a conflict arises.
You can work around it by adding -DHAVE_DECL_ROUND=1 to your cmake command line.
I will try to get this fixed in 1.26.5. Thank you for reporting.
This is because zm includes its own version of round() for old systems that do not have the round() function.
It seems the detection fails to see you already have round() and a conflict arises.
You can work around it by adding -DHAVE_DECL_ROUND=1 to your cmake command line.
I will try to get this fixed in 1.26.5. Thank you for reporting.
Kfir Itzhak.
-
- Posts: 3
- Joined: Thu Nov 14, 2013 8:28 pm
Re: Compile failure
Thanks! That change helped a bit. The make got further. Now at
[ 24%] Building CXX object src/CMakeFiles/zm.dir/zm_ffmpeg_camera.cpp.o
/root/other/ZoneMinder-1.26.4/src/zm_mem_utils.h: In function ‘void* zm_mallocaligned(unsigned int, size_t)’:
/root/other/ZoneMinder-1.26.4/src/zm_mem_utils.h:29: warning: dereferencing type-punned pointer will break strict-aliasing rules
/root/other/ZoneMinder-1.26.4/src/zm_buffer.h: In member function ‘void Buffer::tidy(bool)’:
/root/other/ZoneMinder-1.26.4/src/zm_buffer.h:156: warning: comparison between signed and unsigned integer expressions
/root/other/ZoneMinder-1.26.4/src/zm_ffmpeg_camera.cpp: In destructor ‘virtual FfmpegCamera::~FfmpegCamera()’:
/root/other/ZoneMinder-1.26.4/src/zm_ffmpeg_camera.cpp:85: error: ‘avformat_close_input’ was not declared in this scope
make[2]: *** [src/CMakeFiles/zm.dir/zm_ffmpeg_camera.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make: *** [all] Error 2
[ 24%] Building CXX object src/CMakeFiles/zm.dir/zm_ffmpeg_camera.cpp.o
/root/other/ZoneMinder-1.26.4/src/zm_mem_utils.h: In function ‘void* zm_mallocaligned(unsigned int, size_t)’:
/root/other/ZoneMinder-1.26.4/src/zm_mem_utils.h:29: warning: dereferencing type-punned pointer will break strict-aliasing rules
/root/other/ZoneMinder-1.26.4/src/zm_buffer.h: In member function ‘void Buffer::tidy(bool)’:
/root/other/ZoneMinder-1.26.4/src/zm_buffer.h:156: warning: comparison between signed and unsigned integer expressions
/root/other/ZoneMinder-1.26.4/src/zm_ffmpeg_camera.cpp: In destructor ‘virtual FfmpegCamera::~FfmpegCamera()’:
/root/other/ZoneMinder-1.26.4/src/zm_ffmpeg_camera.cpp:85: error: ‘avformat_close_input’ was not declared in this scope
make[2]: *** [src/CMakeFiles/zm.dir/zm_ffmpeg_camera.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/zm.dir/all] Error 2
make: *** [all] Error 2
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
-
- Posts: 3
- Joined: Thu Nov 14, 2013 8:28 pm
Re: Compile failure
In my previous install (1.25.0), I used
--with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=-D__STDC_CONSTANT_MACROS
Is there a way to set those parameters with cmake?
--with-ffmpeg=/usr/local/share/ffmpeg CPPFLAGS=-D__STDC_CONSTANT_MACROS
Is there a way to set those parameters with cmake?
-
- Posts: 678
- Joined: Wed Dec 16, 2009 4:32 pm
- Location: Israel
Re: Compile failure
Hi,
The parameter in the CPPFLAGS is not needed anymore, it's included internally.
For the ffmpeg prefix, you can use export CMAKE_PREFIX_PATH="/usr/local/share/ffmpeg" but sadly this is broken on v1.26.4, you need ZoneMinder from git for this to work:
https://github.com/ZoneMinder/ZoneMinder/tarball/master
Or you can install using autotools, just like you installed 1.25.0.
The parameter in the CPPFLAGS is not needed anymore, it's included internally.
For the ffmpeg prefix, you can use export CMAKE_PREFIX_PATH="/usr/local/share/ffmpeg" but sadly this is broken on v1.26.4, you need ZoneMinder from git for this to work:
https://github.com/ZoneMinder/ZoneMinder/tarball/master
Or you can install using autotools, just like you installed 1.25.0.
Kfir Itzhak.