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="int" -DHAVE_BSWAP -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/etc\" -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="int" -DHAVE_BSWAP -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/etc\" -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 "make updateguide" 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="int" -DHAVE_BSWAP -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/etc\" -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="int" -DHAVE_BSWAP -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/etc\" -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="int" -DHAVE_BSWAP -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/etc\" -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="int" -DHAVE_BSWAP -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/etc\" -c -o video2.o video2.c
video2.c:87: error: 'V4L2_CID_BRIGHTNESS' undeclared here (not in a function)
video2.c:88: error: 'V4L2_CID_CONTRAST' undeclared here (not in a function)
video2.c:89: error: 'V4L2_CID_SATURATION' undeclared here (not in a function)
video2.c:90: error: 'V4L2_CID_HUE' undeclared here (not in a function)
video2.c:92: error: 'V4L2_CID_RED_BALANCE' undeclared here (not in a function)
video2.c:93: error: 'V4L2_CID_BLUE_BALANCE' undeclared here (not in a function)
video2.c:94: error: 'V4L2_CID_GAMMA' undeclared here (not in a function)
video2.c:95: error: 'V4L2_CID_EXPOSURE' undeclared here (not in a function)
video2.c:96: error: 'V4L2_CID_AUTOGAIN' undeclared here (not in a function)
video2.c:97: error: 'V4L2_CID_GAIN' undeclared here (not in a function)
video2.c:99: error: 'V4L2_CID_PRIVATE_BASE' 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="int" -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 "make updateguide" 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="int" -DHAVE_BSWAP -Wall -DVERSION=\"3.2.12\" -Dsysconfdir=\"/usr/local/etc\" -c -o video2.o video2.c
video2.c:87: error: 'V4L2_CID_BRIGHTNESS' undeclared here (not in a function)
video2.c:88: error: 'V4L2_CID_CONTRAST' undeclared here (not in a function)
video2.c:89: error: 'V4L2_CID_SATURATION' undeclared here (not in a function)
video2.c:90: error: 'V4L2_CID_HUE' undeclared here (not in a function)
video2.c:92: error: 'V4L2_CID_RED_BALANCE' undeclared here (not in a function)
video2.c:93: error: 'V4L2_CID_BLUE_BALANCE' undeclared here (not in a function)
video2.c:94: error: 'V4L2_CID_GAMMA' undeclared here (not in a function)
video2.c:95: error: 'V4L2_CID_EXPOSURE' undeclared here (not in a function)
video2.c:96: error: 'V4L2_CID_AUTOGAIN' undeclared here (not in a function)
video2.c:97: error: 'V4L2_CID_GAIN' undeclared here (not in a function)
video2.c:99: error: 'V4L2_CID_PRIVATE_BASE' 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