LINUX.ORG.RU

ZoneMinder ошибка при компиляции в zm_ffmpeg_camera.cpp


0

1

В общем пытаюсь я его скомпилировать на CentOS 6.2

uname -a:

Linux localhost.localdomain 2.6.32-220.7.1.el6.i686

А оно мне сурово ругается:

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   -D__STDC_CONSTANT_MACROS -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

Подскажите что с ним делать?



Последнее исправление: liquidpredator (всего исправлений: 1)

и да, сборка из под рута - не айс

Turbid ★★★★★
()
Ответ на: комментарий от liquidpredator

Кхм... Ставить ffmpeg из git как-то экстремально для данного конкретного случая. Попробуй перебирать релизы в сторону уменьшения версий. Хотя, вполне может быть, что ты при сборке по faq где-нибудь что-то не так сделал.
Ну а искать виноватого как обычно желательно по первой строчке выхлопа:
zm_ffmpeg_camera.cpp:105:44: error: missing binary operator before token "("

imul ★★★★★
()
Ответ на: комментарий от liquidpredator

попробовал поставить по этому мануалу, встало, но на шаге добавления initial SQL data

 mysql -u root -p zm > /usr/local/src/ZoneMinder-1.25.0/db/zm_create.sql 

Дает ошибку

 [2] 9346 bash: gt: command not found

[1]+ Stopped mysql -u root -p zm bash: /usr/local/src/ZoneMinder-1.25.0/db/zm_create.sql: Permission denied 

Опять застрял...

liquidpredator
() автор топика
Ответ на: комментарий от liquidpredator

Блин, дошло уже после того как запостил на ЛОР и ушел с работы... там &gt не о том... Дома попробую...

liquidpredator
() автор топика
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.