Motion - Support Question 2013x 01x 05x 124849

Motion 3.2.12 gmake failed with ffmpeg error

Question

Really appreciate if anyone has hint of why I encountered the error. Has been googling and looking around all documents that has no clue.

I tried to compile motion-3.2.12 on FreeBSD 9.0 and hit into the following error when I call the gmake command.

What else do I missed?

P.S: Reason why I perform the compilation is that I have 2 version of ffmpeg (ffmpeg-N-42368-gbf53863 and ffmpeg-1.0.1). I need to maintain ffmpeg-N-42368-gbf53863 to proper running serviio server. If I do a pkg_add, it will overwrite the ffmpeg-N-42368-gbf53863 and the serviio transcoding will failed.
<b><u>My FreeBSD Environment:</u></b>
autoconf-2.69
ffmpeg-1.0.1
motion-3.2.12
FreeBSD 9.0 release.

The following is the sequence of command that I had ran. configure command return no error. However, autoconf seems to generate a warning, included in this email. I had also attached the full gmake command output in the attached file.

autoconf
./configure --with-ffmpeg=/opt/ffmpeg-1.0.1 --prefix=/opt/motion-3.2.12
gmake

<u><b>Error from gmake:</b></u>

<i>ffmpeg.c:76: error: expected &#39;)&#39; before &#39;*&#39; token</i>
<i>ffmpeg.c:112: error: expected &#39;=&#39;, &#39;,&#39;, &#39;;&#39;, &#39;asm&#39; or &#39;__attribute__&#39; before &#39;mpeg1_file_protocol&#39;</i>
<i>ffmpeg.c:131: error: expected &#39;)&#39; before &#39;*&#39; token</i>
<i>ffmpeg.c:155: error: expected &#39;)&#39; before &#39;*&#39; token</i>
<i>ffmpeg.c:161: error: expected &#39;)&#39; before &#39;*&#39; token</i>
<i>ffmpeg.c:167: error: expected &#39;)&#39; before &#39;*&#39; token</i>
<i>ffmpeg.c:173: error: expected &#39;)&#39; before &#39;*&#39; token</i>
<i>ffmpeg.c:179: error: expected &#39;=&#39;, &#39;,&#39;, &#39;;&#39;, &#39;asm&#39; or &#39;__attribute__&#39; before &#39;file_protocol&#39;</i>
<i>ffmpeg.c: In function &#39;mpeg1_write_trailer&#39;:</i>
<i>ffmpeg.c:202: warning: implicit declaration of function &#39;put_buffer&#39;</i>
<i>ffmpeg.c:203: warning: implicit declaration of function &#39;put_flush_packet&#39;</i>
<i>ffmpeg.c: In function &#39;ffmpeg_init&#39;:</i>
<i>ffmpeg.c:225: error: &#39;mpeg1_file_protocol&#39; undeclared (first use in this function)</i>
<i>ffmpeg.c:225: error: (Each undeclared identifier is reported only once</i>
<i>ffmpeg.c:225: error: for each function it appears in.)</i>
<i>ffmpeg.c:225: error: &#39;file_protocol&#39; undeclared (first use in this function)</i>
<i>ffmpeg.c:235: warning: implicit declaration of function &#39;av_register_protocol2&#39;</i>
<i>ffmpeg.c: In function &#39;ffmpeg_close&#39;:</i>
<i>ffmpeg.c:639: warning: implicit declaration of function &#39;url_fclose&#39;</i>
<i>ffmpeg.c: In function &#39;ffmpeg_put_frame&#39;:</i>
<i>ffmpeg.c:703: warning: &#39;avcodec_encode_video&#39; is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4118)</i>
<i>gmake: *** [ffmpeg.o] Error 1</i>

<u><b>autoconfig warning:</b></u>
<i>
[root@universe /opt/motion-3.2.12/src]# autoconf</i>
<i>configure.in:429: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body</i>
<i>../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...</i>
<i>../../lib/autoconf/general.m4:2590: _AC_COMPILE_IFELSE is expanded from...</i>
<i>../../lib/autoconf/general.m4:2606: AC_COMPILE_IFELSE is expanded from...</i>
<i>configure.in:429: the top level</i>

<u><b>configure output:</b></u>

<i>[root@universe /opt/motion-3.2.12/src]# ./configure --with-ffmpeg=/opt/ffmpeg-1.0.1 --prefix=/opt/motion-3.2.12</i>
<i>checking for Darwin... no</i>
<i>checking for *BSD... yes</i>
<i>checking Linuxthreads... skipping</i>
<i>Build with PWCBSD support no</i>
<i>checking for gcc... gcc</i>
<i>checking whether the C compiler works... yes</i>
<i>checking for C compiler default output file name... a.out</i>
<i>checking for suffix of executables...</i>
<i>checking whether we are cross compiling... no</i>
<i>checking for suffix of object files... o</i>
<i>checking whether we are using the GNU C compiler... yes</i>
<i>checking whether gcc accepts -g... yes</i>
<i>checking for gcc option to accept ISO C89... none needed</i>
<i>checking bktr headers in /usr/include/dev/bktr... yes</i>
<i>checking threads... yes</i>
<i>checking for libjpeg-mmx... skipping</i>
<i>checking for libjpeg...</i>
<i>checking for jpeg_set_defaults in -ljpeg... yes</i>
<i>checking for ffmpeg in -&#62; /opt/ffmpeg-1.0.1 &#60;-... found</i>
<i>checking for ffmpeg headers in /opt/ffmpeg-1.0.1... found /opt/ffmpeg-1.0.1/include/libavformat/avformat.h</i>
<i>checking file_protocol is defined in ffmpeg ?... no</i>
<i>checking for mysql support... testing</i>
<i>checking autodect mysql headers... yes</i>
<i>checking autodect mysql libs... /usr/local/lib/mysql</i>
<i>checking for mysql_init in -lmysqlclient... yes</i>
<i>checking for PostgreSQL... testing</i>
<i>checking autodect pgsql headers... not found</i>
<i>Invalid PostgreSQL directory - unable to find libpq-fe.h.</i>
<i>checking how to run the C preprocessor... gcc -E</i>
<i>checking for grep that handles long lines and -e... /usr/bin/grep</i>
<i>checking for egrep... /usr/bin/grep -E</i>
<i>checking for ANSI C header files... yes</i>
<i>checking for sys/types.h... yes</i>
<i>checking for sys/stat.h... yes</i>
<i>checking for stdlib.h... yes</i>
<i>checking for string.h... yes</i>
<i>checking for memory.h... yes</i>
<i>checking for strings.h... yes</i>
<i>checking for inttypes.h... yes</i>
<i>checking for stdint.h... yes</i>
<i>checking for unistd.h... yes</i>
<i>checking stdio.h usability... yes</i>
<i>checking stdio.h presence... yes</i>
<i>checking for stdio.h... yes</i>
<i>checking for unistd.h... (cached) yes</i>
<i>checking for stdint.h... (cached) yes</i>
<i>checking fcntl.h usability... yes</i>
<i>checking fcntl.h presence... yes</i>
<i>checking for fcntl.h... yes</i>
<i>checking time.h usability... yes</i>
<i>checking time.h presence... yes</i>
<i>checking for time.h... yes</i>
<i>checking signal.h usability... yes</i>
<i>checking signal.h presence... yes</i>
<i>checking for signal.h... yes</i>
<i>checking sys/ioctl.h usability... yes</i>
<i>checking sys/ioctl.h presence... yes</i>
<i>checking for sys/ioctl.h... yes</i>
<i>checking sys/mman.h usability... yes</i>
<i>checking sys/mman.h presence... yes</i>
<i>checking for sys/mman.h... yes</i>
<i>checking linux/videodev.h usability... no</i>
<i>checking linux/videodev.h presence... no</i>
<i>checking for linux/videodev.h... no</i>
<i>checking linux/videodev2.h usability... no</i>
<i>checking linux/videodev2.h presence... no</i>
<i>checking for linux/videodev2.h... no</i>
<i>checking sys/param.h usability... yes</i>
<i>checking sys/param.h presence... yes</i>
<i>checking for sys/param.h... yes</i>
<i>checking for sys/types.h... (cached) yes</i>
<i>checking for get_current_dir_name... no</i>
<i>checking for struct v4l2_buffer... no</i>
<i>checking for V42L support... no</i>
<i>checking for V42L *old* support... testing</i>
<i>checking for linux/videodev2.h... (cached) no</i>
<i>checking size of short... 2</i>
<i>checking size of int... 4</i>
<i>checking size of long int... 4</i>
<i>checking size of long long... 8</i>
<i>checking size of int *... 4</i>
<i>checking size of void *... 4</i>
<i>checking for an ANSI C-conforming const... yes</i>
<i>checking for bswap instruction... yes</i>
<i>configure: creating ./config.status</i>
<i>config.status: creating thread1.conf</i>
<i>config.status: creating thread2.conf</i>
<i>config.status: creating thread3.conf</i>
<i>config.status: creating thread4.conf</i>
<i>config.status: creating motion-dist.conf</i>
<i>config.status: creating motion.init-FreeBSD.sh</i>
<i>config.status: creating motion.init-Debian</i>
<i>config.status: creating motion.init-Fedora</i>
<i>config.status: creating motion.spec</i>
<i>config.status: creating Makefile</i>
<i>config.status: creating config.h</i>

<i>   *******************************</i>
<i>      Configure status</i>
<i>      motion 3.2.12</i>
<i>   *******************************</i>

<i>OS             :     *BSD</i>
<i>pthread Support:     Yes</i>
<i>jpeg Support:        Yes</i>
<i>BKTR included:       Yes</i>
<i>PWCBSD include:      No</i>
<i>FFmpeg Support:      Yes</i>
<i>MYSQL Support:       Yes</i>
<i>PostgreSQL Support:  No</i>

<i>CFLAGS:  -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP</i>
<i>LIBS: -lm -L/usr/local/lib -pthread -ljpeg -L/opt/ffmpeg-1.0.1/lib -lavformat -lavcodec -lavutil -lm -lz -L/usr/local/lib/mysql -lmysqlclient -lz</i>
<i>LDFLAGS:  -L/usr/local/lib  -L/opt/ffmpeg-1.0.1/lib</i>

<i>Install prefix:       /opt/motion-3.2.12</i>

<u><b>Complete gmake output</b>:</u>

[root@universe /opt/motion-3.2.12/src]# gmake
Welcome to the setup procedure for Motion, the motion detection daemon! If you get
error messages during this procedure, please report them to the mailing list. The
Motion Guide contains all information you should need to get Motion up and running.
Run &#34;make updateguide&#34; to download the latest version of the Motion Guide.

Version: 3.2.12
Platform: FreeBSD

Generating dependencies, please wait...

Compiling Motion object files...
--------------------------------------------------------------------------------
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o motion.o motion.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o conf.o conf.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o draw.o draw.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o jpegutils.o jpegutils.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o video_freebsd.o video_freebsd.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o netcam.o netcam.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o netcam_ftp.o netcam_ftp.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o netcam_jpeg.o netcam_jpeg.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o netcam_wget.o netcam_wget.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o track.o track.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o alg.o alg.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o event.o event.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o picture.o picture.c
picture.c:121:2: warning: #warning using JPEG_LIB_VERSION &#62;= 70
picture.c:240:2: warning: #warning using JPEG_LIB_VERSION &#62;= 70
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o rotate.o rotate.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o webhttpd.o webhttpd.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -c -o webcam.o webcam.c
gcc -I/usr/local/include -g -O2 -D_REENTRANT -D_THREAD_SAFE -DHAVE_FFMPEG -I/opt/ffmpeg-1.0.1/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/local/include/mysql -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/opt/motion-3.2.12/etc\&#34;    -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 &#39;)&#39; before &#39;*&#39; token
ffmpeg.c:112: error: expected &#39;=&#39;, &#39;,&#39;, &#39;;&#39;, &#39;asm&#39; or &#39;__attribute__&#39; before &#39;mpeg1_file_protocol&#39;
ffmpeg.c:131: error: expected &#39;)&#39; before &#39;*&#39; token
ffmpeg.c:155: error: expected &#39;)&#39; before &#39;*&#39; token
ffmpeg.c:161: error: expected &#39;)&#39; before &#39;*&#39; token
ffmpeg.c:167: error: expected &#39;)&#39; before &#39;*&#39; token
ffmpeg.c:173: error: expected &#39;)&#39; before &#39;*&#39; token
ffmpeg.c:179: error: expected &#39;=&#39;, &#39;,&#39;, &#39;;&#39;, &#39;asm&#39; or &#39;__attribute__&#39; before &#39;file_protocol&#39;
ffmpeg.c: In function &#39;mpeg1_write_trailer&#39;:
ffmpeg.c:202: warning: implicit declaration of function &#39;put_buffer&#39;
ffmpeg.c:203: warning: implicit declaration of function &#39;put_flush_packet&#39;
ffmpeg.c: In function &#39;ffmpeg_init&#39;:
ffmpeg.c:225: error: &#39;mpeg1_file_protocol&#39; 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: &#39;file_protocol&#39; undeclared (first use in this function)
ffmpeg.c:235: warning: implicit declaration of function &#39;av_register_protocol2&#39;
ffmpeg.c: In function &#39;ffmpeg_close&#39;:
ffmpeg.c:639: warning: implicit declaration of function &#39;url_fclose&#39;
ffmpeg.c: In function &#39;ffmpeg_put_frame&#39;:
ffmpeg.c:703: warning: &#39;avcodec_encode_video&#39; is deprecated (declared at /usr/local/include/libavcodec/avcodec.h:4118)
gmake: *** [ffmpeg.o] Error 1

Environment

Motion version: 3.2.12
ffmpeg version: 1.0.1
Libraries: ffmpeg, mysql
Server OS: FreeBSD 9.0
-- ChengGan - 05 Jan 2013

Answer

Topic revision: r1 - 05 Jan 2013, ChengGan
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.