Motion - Support Question 2014x 01x 16x 221918

Trying to build on CentOS 6.4 - compiler throwing errors

Question

These errors seem particularly nasty. I am wondering if I am missing something obvious or others have reported such problems.


gcc -g -O2 -D_REENTRANT -DHAVE_FFMPEG -I/usr/local/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include -DMOTION_V4L2 -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/usr/local/etc\"    -c -o ffmpeg.o ffmpeg.c
ffmpeg.c:26:10: warning: #warning **************************************************
ffmpeg.c:27:10: warning: #warning Your version of FFmpeg is newer than version 0.4.8
ffmpeg.c:28:10: warning: #warning Newer versions of ffmpeg do not support MPEG1 with
ffmpeg.c:29:10: warning: #warning non-standard framerate. MPEG1 will be disabled for
ffmpeg.c:30:10: warning: #warning normal video output. You can still use mpeg4 and
ffmpeg.c:31:10: warning: #warning and mpeg4ms which are both better in terms of size
ffmpeg.c:32:10: warning: #warning and quality. MPEG1 is always used for timelapse.
ffmpeg.c:33:10: warning: #warning Please read the Motion Guide for more information.
ffmpeg.c:34:10: warning: #warning Note that this is not an error message!
ffmpeg.c:35:10: warning: #warning **************************************************
ffmpeg.c:76: error: expected ‘)’ before ‘*’ token
ffmpeg.c:112: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘mpeg1_file_protocol’
ffmpeg.c:131: error: expected ‘)’ before ‘*’ token
ffmpeg.c:155: error: expected ‘)’ before ‘*’ token
ffmpeg.c:161: error: expected ‘)’ before ‘*’ token
ffmpeg.c:167: error: expected ‘)’ before ‘*’ token
ffmpeg.c:173: error: expected ‘)’ before ‘*’ token
ffmpeg.c:179: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘file_protocol’
ffmpeg.c: In function ‘mpeg1_write_trailer’:
ffmpeg.c:202: warning: implicit declaration of function ‘put_buffer’
ffmpeg.c:203: warning: implicit declaration of function ‘put_flush_packet’
ffmpeg.c: In function ‘ffmpeg_init’:
ffmpeg.c:225: error: ‘mpeg1_file_protocol’ undeclared (first use in this function)
ffmpeg.c:225: error: (Each undeclared identifier is reported only once
ffmpeg.c:225: error: for each function it appears in.)
ffmpeg.c:225: error: ‘file_protocol’ undeclared (first use in this function)
ffmpeg.c:232: warning: implicit declaration of function ‘av_register_protocol’
ffmpeg.c: In function ‘get_oformat’:
ffmpeg.c:261: warning: implicit declaration of function ‘guess_format’
ffmpeg.c:261: warning: assignment makes pointer from integer without a cast
ffmpeg.c:273: warning: assignment makes pointer from integer without a cast
ffmpeg.c:276: warning: assignment makes pointer from integer without a cast
ffmpeg.c:283: warning: assignment makes pointer from integer without a cast
ffmpeg.c:286: warning: assignment makes pointer from integer without a cast
ffmpeg.c:290: warning: assignment makes pointer from integer without a cast
ffmpeg.c:298: warning: assignment makes pointer from integer without a cast
ffmpeg.c: In function ‘ffmpeg_open’:
ffmpeg.c:365: warning: ‘av_new_stream’ is deprecated (declared at /usr/local/include/libavformat/avformat.h:1817)
ffmpeg.c:380: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
ffmpeg.c:420: warning: implicit declaration of function ‘av_set_parameters’
ffmpeg.c:446: warning: implicit declaration of function ‘avcodec_open’
ffmpeg.c:501: warning: implicit declaration of function ‘url_fopen’
ffmpeg.c:501: error: ‘URL_WRONLY’ undeclared (first use in this function)
ffmpeg.c:532: warning: implicit declaration of function ‘av_write_header’
ffmpeg.c: In function ‘ffmpeg_close’:
ffmpeg.c:599: warning: implicit declaration of function ‘url_fclose’
ffmpeg.c: In function ‘ffmpeg_put_frame’:
ffmpeg.c:649: error: ‘PKT_FLAG_KEY’ undeclared (first use in this function)
ffmpeg.c:659: warning: ‘avcodec_encode_video’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4260)
ffmpeg.c: In function ‘ffmpeg_deinterlace’:
ffmpeg.c:756: warning: ‘avpicture_deinterlace’ is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4505)
make: *** [ffmpeg.o] Error 1

Environment

Motion version: 3.2.12
ffmpeg version: 2.1.3
Libraries: ffmpeg, mysql, postgresql
Server OS: CentOS 6.4
-- KevinBuchs - 16 Jan 2014

Answer

Had the same issue and found a workaround to install motion with my custom ffmpeg(latest version):

rpm -ivh http://centos.alt.ru/repository/centos/6/x86_64/motion-3.2.12-8.el6.x86_64.rpm --nodeps

and

ln -sf /usr/lib64/mysql/libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.18 ( I don't need mysql anyway)

Hope it works for you

Regards,

Mike
Topic revision: r2 - 08 Feb 2014, MikePort
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.