Im Running ClearOS 6.2 Beta 3 and im running into a problem running make.
I get the following...
[root@yamen ZoneMinder-1.25.0]# make
make all-recursive
make[1]: Entering directory `/root/ZoneMinder-1.25.0'
Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.25.0/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
mv -f .deps/zmc.Tpo .deps/zmc.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_box.o -MD -MP -MF .deps/zm_box.Tpo -c -o zm_box.o zm_box.cpp
mv -f .deps/zm_box.Tpo .deps/zm_box.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_buffer.o -MD -MP -MF .deps/zm_buffer.Tpo -c -o zm_buffer.o zm_buffer.cpp
mv -f .deps/zm_buffer.Tpo .deps/zm_buffer.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_camera.o -MD -MP -MF .deps/zm_camera.Tpo -c -o zm_camera.o zm_camera.cpp
mv -f .deps/zm_camera.Tpo .deps/zm_camera.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_comms.o -MD -MP -MF .deps/zm_comms.Tpo -c -o zm_comms.o zm_comms.cpp
mv -f .deps/zm_comms.Tpo .deps/zm_comms.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_config.o -MD -MP -MF .deps/zm_config.Tpo -c -o zm_config.o zm_config.cpp
mv -f .deps/zm_config.Tpo .deps/zm_config.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_coord.o -MD -MP -MF .deps/zm_coord.Tpo -c -o zm_coord.o zm_coord.cpp
mv -f .deps/zm_coord.Tpo .deps/zm_coord.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm.o -MD -MP -MF .deps/zm.Tpo -c -o zm.o zm.cpp
mv -f .deps/zm.Tpo .deps/zm.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_db.o -MD -MP -MF .deps/zm_db.Tpo -c -o zm_db.o zm_db.cpp
mv -f .deps/zm_db.Tpo .deps/zm_db.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_logger.o -MD -MP -MF .deps/zm_logger.Tpo -c -o zm_logger.o zm_logger.cpp
zm_logger.cpp:43: warning: âvoid subtractTime(timeval*, timeval*)â defined but not used
mv -f .deps/zm_logger.Tpo .deps/zm_logger.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_event.o -MD -MP -MF .deps/zm_event.Tpo -c -o zm_event.o zm_event.cpp
mv -f .deps/zm_event.Tpo .deps/zm_event.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_exception.o -MD -MP -MF .deps/zm_exception.Tpo -c -o zm_exception.o zm_exception.cpp
mv -f .deps/zm_exception.Tpo .deps/zm_exception.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_file_camera.o -MD -MP -MF .deps/zm_file_camera.Tpo -c -o zm_file_camera.o zm_file_camera.cpp
mv -f .deps/zm_file_camera.Tpo .deps/zm_file_camera.Po
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/include -Wall -Wno-sign-compare -fno-inline -I/usr/include -march=native -O2 -pipe -D__STDC_CONSTANT_MACROS -march=native -O2 -pipe -MT zm_ffmpeg_camera.o -MD -MP -MF .deps/zm_ffmpeg_camera.Tpo -c -o zm_ffmpeg_camera.o zm_ffmpeg_camera.cpp
zm_ffmpeg_camera.cpp:105:44: error: missing binary operator before token "("
In file included from zm_ffmpeg_camera.cpp:24:
zm_ffmpeg_camera.h:39: error: ISO C++ forbids declaration of âAVFormatContextâ with no type
zm_ffmpeg_camera.h:39: error: expected â;â before â*â token
zm_ffmpeg_camera.h:41: error: ISO C++ forbids declaration of âAVCodecContextâ with no type
zm_ffmpeg_camera.h:41: error: expected â;â before â*â token
zm_ffmpeg_camera.h:42: error: ISO C++ forbids declaration of âAVCodecâ with no type
zm_ffmpeg_camera.h:42: error: expected â;â before â*â token
zm_ffmpeg_camera.h:44: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_ffmpeg_camera.h:44: error: expected â;â before â*â token
zm_ffmpeg_camera.h:45: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_ffmpeg_camera.h:45: error: expected â;â before â*â token
zm_ffmpeg_camera.cpp: In constructor âFfmpegCamera::FfmpegCamera(int, const std::string&, int, int, int, int, int, int, int, bool)â:
zm_ffmpeg_camera.cpp:35: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:37: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:38: error: âmCodecâ was not declared in this scope
zm_ffmpeg_camera.cpp:40: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:41: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp: In destructor âvirtual FfmpegCamera::~FfmpegCamera()â:
zm_ffmpeg_camera.cpp:46: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:46: error: âav_freepâ was not declared in this scope
zm_ffmpeg_camera.cpp:47: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:51: error: âsws_freeContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:54: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:56: error: âavcodec_closeâ was not declared in this scope
zm_ffmpeg_camera.cpp:59: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:61: error: âav_close_input_fileâ was not declared in this scope
zm_ffmpeg_camera.cpp: In member function âvoid FfmpegCamera::Initialise()â:
zm_ffmpeg_camera.cpp:78: error: âAV_LOG_DEBUGâ was not declared in this scope
zm_ffmpeg_camera.cpp:78: error: âav_log_set_levelâ was not declared in this scope
zm_ffmpeg_camera.cpp:80: error: âAV_LOG_QUIETâ was not declared in this scope
zm_ffmpeg_camera.cpp:80: error: âav_log_set_levelâ was not declared in this scope
zm_ffmpeg_camera.cpp:82: error: âav_register_allâ was not declared in this scope
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::PrimeCapture()â:
zm_ffmpeg_camera.cpp:94: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:94: error: âav_open_input_fileâ was not declared in this scope
zm_ffmpeg_camera.cpp:95: error: âerrnoâ was not declared in this scope
zm_ffmpeg_camera.cpp:98: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:98: error: âav_find_stream_infoâ was not declared in this scope
zm_ffmpeg_camera.cpp:99: error: âerrnoâ was not declared in this scope
zm_ffmpeg_camera.cpp:103: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:108: error: âCODEC_TYPE_VIDEOâ was not declared in this scope
zm_ffmpeg_camera.cpp:118: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:118: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:121: error: âmCodecâ was not declared in this scope
zm_ffmpeg_camera.cpp:121: error: âavcodec_find_decoderâ was not declared in this scope
zm_ffmpeg_camera.cpp:125: error: âmCodecâ was not declared in this scope
zm_ffmpeg_camera.cpp:125: error: âavcodec_openâ was not declared in this scope
zm_ffmpeg_camera.cpp:129: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:129: error: âavcodec_alloc_frameâ was not declared in this scope
zm_ffmpeg_camera.cpp:132: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:135: error: âPIX_FMT_RGB24â was not declared in this scope
zm_ffmpeg_camera.cpp:135: error: âavpicture_get_sizeâ was not declared in this scope
zm_ffmpeg_camera.cpp:138: error: âAVPictureâ was not declared in this scope
zm_ffmpeg_camera.cpp:138: error: expected primary-expression before â)â token
zm_ffmpeg_camera.cpp:138: error: âavpicture_fillâ was not declared in this scope
zm_ffmpeg_camera.cpp:141: error: âSWS_BICUBICâ was not declared in this scope
zm_ffmpeg_camera.cpp:141: error: âsws_getCachedContextâ was not declared in this scope
zm_ffmpeg_camera.cpp: In member function âvirtual int FfmpegCamera::Capture(Image&)â:
zm_ffmpeg_camera.cpp:159: error: âAVPacketâ was not declared in this scope
zm_ffmpeg_camera.cpp:159: error: expected â;â before âpacketâ
zm_ffmpeg_camera.cpp:163: error: âmFormatContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:163: error: âpacketâ was not declared in this scope
zm_ffmpeg_camera.cpp:163: error: âav_read_frameâ was not declared in this scope
zm_ffmpeg_camera.cpp:172: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:172: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:172: error: âavcodec_decode_video2â was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âmRawFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:182: error: âsws_scaleâ was not declared in this scope
zm_ffmpeg_camera.cpp:188: error: âmCodecContextâ was not declared in this scope
zm_ffmpeg_camera.cpp:188: error: âmFrameâ was not declared in this scope
zm_ffmpeg_camera.cpp:193: error: âav_free_packetâ was not declared in this scope
make[2]: *** [zm_ffmpeg_camera.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.25.0'
make: *** [all] Error 2
[root@yamen ZoneMinder-1.25.0]#
Im hopping someone might see what im missing here?
Problem compling Zoneminder with ClearOS
Re: Problem compling Zoneminder with ClearOS
It looks like I am missing a dev package..
I installed ffmpeg-devel and it looks like I got a bit further but still with problems...
[root@yamen ZoneMinder-1.25.0]# make
make all-recursive
make[1]: Entering directory `/root/ZoneMinder-1.25.0'
Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.25.0/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/share/ffmpeg/include -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_stream.h:27,
from zm_event.h:39,
from zm_zone.h:27,
from zm_monitor.h:26,
from zmc.cpp:28:
zm_mpeg.h:43: error: use of enum âPixelFormatâ without previous declaration
zm_mpeg.h:44: error: ISO C++ forbids declaration of âAVOutputFormatâ with no type
zm_mpeg.h:44: error: expected â;â before â*â token
zm_mpeg.h:45: error: ISO C++ forbids declaration of âAVFormatContextâ with no type
zm_mpeg.h:45: error: expected â;â before â*â token
zm_mpeg.h:46: error: ISO C++ forbids declaration of âAVStreamâ with no type
zm_mpeg.h:46: error: expected â;â before â*â token
zm_mpeg.h:47: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:47: error: expected â;â before â*â token
zm_mpeg.h:48: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:48: error: expected â;â before â*â token
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.25.0'
make: *** [all] Error 2
[root@yamen ZoneMinder-1.25.0]#
I installed ffmpeg-devel and it looks like I got a bit further but still with problems...
[root@yamen ZoneMinder-1.25.0]# make
make all-recursive
make[1]: Entering directory `/root/ZoneMinder-1.25.0'
Making all in src
make[2]: Entering directory `/root/ZoneMinder-1.25.0/src'
g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include -I/usr/local/share/ffmpeg/include -Wall -Wno-sign-compare -fno-inline -I/usr/local/share/ffmpeg/include -g -O2 -MT zmc.o -MD -MP -MF .deps/zmc.Tpo -c -o zmc.o zmc.cpp
In file included from zm_stream.h:27,
from zm_event.h:39,
from zm_zone.h:27,
from zm_monitor.h:26,
from zmc.cpp:28:
zm_mpeg.h:43: error: use of enum âPixelFormatâ without previous declaration
zm_mpeg.h:44: error: ISO C++ forbids declaration of âAVOutputFormatâ with no type
zm_mpeg.h:44: error: expected â;â before â*â token
zm_mpeg.h:45: error: ISO C++ forbids declaration of âAVFormatContextâ with no type
zm_mpeg.h:45: error: expected â;â before â*â token
zm_mpeg.h:46: error: ISO C++ forbids declaration of âAVStreamâ with no type
zm_mpeg.h:46: error: expected â;â before â*â token
zm_mpeg.h:47: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:47: error: expected â;â before â*â token
zm_mpeg.h:48: error: ISO C++ forbids declaration of âAVFrameâ with no type
zm_mpeg.h:48: error: expected â;â before â*â token
make[2]: *** [zmc.o] Error 1
make[2]: Leaving directory `/root/ZoneMinder-1.25.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/ZoneMinder-1.25.0'
make: *** [all] Error 2
[root@yamen ZoneMinder-1.25.0]#
Re: Problem compling Zoneminder with ClearOS
Found the problem...
This command
export CFLAGS="-march=native -O2 -pipe" && \
export CXXFLAGS="${CFLAGS}" && \
export CPPFLAGS="${CFLAGS} -D__STDC_CONSTANT_MACROS"
Did not work as one complete command, I had to enter it one line at a time as follows...
export CFLAGS="-march=native -O2 -pipe"
export CXXFLAGS="${CFLAGS}"
export CPPFLAGS="${CFLAGS} -D__STDC_CONSTANT_MACROS"
Hopefully this helps people in the future.
This command
export CFLAGS="-march=native -O2 -pipe" && \
export CXXFLAGS="${CFLAGS}" && \
export CPPFLAGS="${CFLAGS} -D__STDC_CONSTANT_MACROS"
Did not work as one complete command, I had to enter it one line at a time as follows...
export CFLAGS="-march=native -O2 -pipe"
export CXXFLAGS="${CFLAGS}"
export CPPFLAGS="${CFLAGS} -D__STDC_CONSTANT_MACROS"
Hopefully this helps people in the future.