Motion - Bug Report 2012x 07x 04x 221206

BUG: Gento emerge motoin fail, video2.c undeclared function

emerge motion fails compilation stage for video2.c
Resolved, video2.c 
 i had to comment out the #ifdef MOTION_V4L2_OLD to force inclusion of the files

//#ifdef MOTION_V4L2_OLD
// Seems that is needed for some system
#include <linux/time.h>
#include <linux/videodev2.h>
//#endif

 
 
Welcome to the setup procedure for Motion, the motion detection daemon! If you get
x86_64-pc-linux-gnu-gcc -march=nocona -O2 -pipe -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/etc\&#34;    -c -o motion.o motion.c
x86_64-pc-linux-gnu-gcc -march=nocona -O2 -pipe -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/etc\&#34;    -c -o conf.o conf.c
Generating dependencies, please wait...
error messages during this procedure, please report them to the mailing list. The
Compiling Motion object files...
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.
x86_64-pc-linux-gnu-gcc -march=nocona -O2 -pipe -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/etc\&#34;    -c -o draw.o draw.c

Version: 3.2.12
Platform: Linux (if this is incorrect, please read README.FreeBSD)

x86_64-pc-linux-gnu-gcc -march=nocona -O2 -pipe -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/etc\&#34;    -c -o jpegutils.o jpegutils.c
x86_64-pc-linux-gnu-gcc -march=nocona -O2 -pipe -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/etc\&#34;    -c -o video.o video.c
x86_64-pc-linux-gnu-gcc -march=nocona -O2 -pipe -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/etc\&#34;    -c -o video2.o video2.c

video2.c:87: error: &#39;V4L2_CID_BRIGHTNESS&#39; undeclared here (not in a function)
video2.c:88: error: &#39;V4L2_CID_CONTRAST&#39; undeclared here (not in a function)
video2.c:89: error: &#39;V4L2_CID_SATURATION&#39; undeclared here (not in a function)
video2.c:90: error: &#39;V4L2_CID_HUE&#39; undeclared here (not in a function)
video2.c:92: error: &#39;V4L2_CID_RED_BALANCE&#39; undeclared here (not in a function)
video2.c:93: error: &#39;V4L2_CID_BLUE_BALANCE&#39; undeclared here (not in a function)
video2.c:94: error: &#39;V4L2_CID_GAMMA&#39; undeclared here (not in a function)
video2.c:95: error: &#39;V4L2_CID_EXPOSURE&#39; undeclared here (not in a function)
video2.c:96: error: &#39;V4L2_CID_AUTOGAIN&#39; undeclared here (not in a function)
video2.c:97: error: &#39;V4L2_CID_GAIN&#39; undeclared here (not in a function)
video2.c:99: error: &#39;V4L2_CID_PRIVATE_BASE&#39; undeclared here (not in a function)
....
then very many similar errors, resulting in compilation failure

not using portage, 
# ./configure
 *******************************
      Configure status    
      motion 3.2.12
   *******************************

OS             :     Linux
pthread Support:     Yes
jpeg Support:        Yes
V4L included:        Yes
V4L2 supported:      Yes
FFmpeg Support:      Yes
MYSQL Support:       Yes
PostgreSQL Support:  No

CFLAGS:  -g -O2 -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP   
LIBS: -lm  -lpthread -ljpeg -L/usr/lib64 -lavformat -lavcodec -lavutil -lm -lz -L/usr/lib64 -lmysqlclient -lz
LDFLAGS:   -L/usr/lib64

Install prefix:       /usr/local




# make
make
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: Linux (if this is incorrect, please read README.FreeBSD)

Compiling Motion object files...
--------------------------------------------------------------------------------
gcc -g -O2 -D_REENTRANT -DHAVE_FFMPEG -I/usr/include -DFFMPEG_NEW_INCLUDES -DHAVE_FFMPEG_NEW -I/usr/include/mysql -DMOTION_V4L2 -DTYPE_32BIT=&#34;int&#34; -DHAVE_BSWAP    -Wall -DVERSION=\&#34;3.2.12\&#34; -Dsysconfdir=\&#34;/usr/local/etc\&#34;    -c -o video2.o video2.c
video2.c:87: error: &#39;V4L2_CID_BRIGHTNESS&#39; undeclared here (not in a function)
video2.c:88: error: &#39;V4L2_CID_CONTRAST&#39; undeclared here (not in a function)
video2.c:89: error: &#39;V4L2_CID_SATURATION&#39; undeclared here (not in a function)
video2.c:90: error: &#39;V4L2_CID_HUE&#39; undeclared here (not in a function)
video2.c:92: error: &#39;V4L2_CID_RED_BALANCE&#39; undeclared here (not in a function)
video2.c:93: error: &#39;V4L2_CID_BLUE_BALANCE&#39; undeclared here (not in a function)
video2.c:94: error: &#39;V4L2_CID_GAMMA&#39; undeclared here (not in a function)
video2.c:95: error: &#39;V4L2_CID_EXPOSURE&#39; undeclared here (not in a function)
video2.c:96: error: &#39;V4L2_CID_AUTOGAIN&#39; undeclared here (not in a function)
video2.c:97: error: &#39;V4L2_CID_GAIN&#39; undeclared here (not in a function)
video2.c:99: error: &#39;V4L2_CID_PRIVATE_BASE&#39; undeclared here (not in a function)
etc...
make: *** [video2.o] Error 1

Environment

Motion version: 3.2.12
ffmpeg version: 0.10.3
Shared libraries: ffmpeg, mysql, curl
Server OS: Gentoo 2.6.34 r1 x86_64, GCC 4.3.4
-- JoeKane - 04 Jul 2012

Follow up

This is fixed in svn/git version.

Cheers,

-- AngelCarpintero - 07 Jul 2012

Fix record

BugReportForm edit

TopicTitle Gentoo emerge motion fails, video2.c undeclared
BugStatus Resolved
AssignedBugTo
SubmittedBy JoeKane
Topic revision: r2 - 07 Jul 2012, AngelCarpintero
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.