Motion - Support Question 2007x 01x 09x 180516

Make of 3.2.8 fails, undefined references to vid_*

Question

Here I am again...

As per my request for "how to install the v4l2 patch", I followed your instructions (am I right in thinking motion has been updated in the last few days?).

Anyway, configure completes OK, but make falls over at the linking stage. I'm adding a copy of the output.

Help - what do I do next ??

Thanks! Lee

[root@bob motion]# !./conf
./configure --without-mysql
checking for Darwin... no
checking for *BSD... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for pthread_create in -lpthread... yes
checking for libjpeg-mmx... skipping
checking for jpeg_set_defaults in -ljpeg... yes
checking for ffmpeg autodetecting... found
checking for ffmpeg headers... found
checking for MySQL... skipped
checking for PostgreSQL... Cannot find libpq-fe.h. Please specify the installation path of PostgreSQL
checking how to run the C preprocessor... gcc -E
checking for egrep... grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking for unistd.h... (cached) yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking time.h usability... yes
checking time.h presence... yes
checking for time.h... yes
checking signal.h usability... yes
checking signal.h presence... yes
checking for signal.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/mman.h usability... yes
checking sys/mman.h presence... yes
checking for sys/mman.h... yes
checking linux/videodev.h usability... yes
checking linux/videodev.h presence... yes
checking for linux/videodev.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for short int... yes
checking size of short int... 2
checking for int... yes
checking size of int... 4
checking for an ANSI C-conforming const... yes
Detected CPU: AMD Athlon(tm) 64 Processor 3500+
CPU optimization: 
checking for bswap instruction... yes
configure: creating ./config.status
config.status: creating motion.init-FreeBSD.sh
config.status: creating motion.init-Debian
config.status: creating motion.init-RH
config.status: creating motion.spec
config.status: creating Makefile

   ************************
   *   Configure status   *
   ************************

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

CFLAGS:  -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP   
LIBS: -lm  -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz
LDFLAGS:   -L/usr/local/lib

Install prefix:       /usr/local

[root@bob motion]# 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.8
Platform: Linux (if this is incorrect, please read README.FreeBSD)

Generating dependencies, please wait...

Compiling Motion object files...
--------------------------------------------------------------------------------
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o motion.o motion.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o conf.o conf.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o draw.o draw.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o video.o video.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o netcam.o netcam.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o netcam_ftp.o netcam_ftp.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o netcam_jpeg.o netcam_jpeg.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o netcam_wget.o netcam_wget.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o track.o track.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o alg.o alg.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o event.o event.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o picture.o picture.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o rotate.o rotate.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o webhttpd.o webhttpd.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o webcam.o webcam.c
gcc -g -O2 -DHAVE_FFMPEG -I/usr/local/include/ffmpeg -DTYPE_32BIT="int" -DHAVE_BSWAP    -Wall -DVERSION=\"3.2.8\" -D_REENTRANT -Dsysconfdir=\"/usr/local/etc\"   -c -o ffmpeg.o ffmpeg.c
ffmpeg.c:26:4: warning: #warning **************************************************
ffmpeg.c:27:4: warning: #warning Your version of FFmpeg is newer than version 0.4.8
ffmpeg.c:28:4: warning: #warning Newer versions of ffmpeg do not support MPEG1 with
ffmpeg.c:29:4: warning: #warning non-standard framerate. MPEG1 will be disabled for
ffmpeg.c:30:4: warning: #warning normal video output. You can still use mpeg4 and
ffmpeg.c:31:4: warning: #warning and mpeg4ms which are both better in terms of size
ffmpeg.c:32:4: warning: #warning and quality. MPEG1 is always used for timelapse.
ffmpeg.c:33:4: warning: #warning Please read the Motion Guide for more information.
ffmpeg.c:34:4: warning: #warning Note that this is not an error message!
ffmpeg.c:35:4: warning: #warning **************************************************
--------------------------------------------------------------------------------
Motion object files compiled.

Linking Motion...
--------------------------------------------------------------------------------
gcc -L/usr/local/lib -o motion motion.o conf.o draw.o video.o netcam.o netcam_ftp.o netcam_jpeg.o netcam_wget.o track.o alg.o event.o picture.o rotate.o webhttpd.o webcam.o ffmpeg.o -lm  -lpthread -ljpeg -L/usr/local/lib -lavformat -lavcodec -lm -lz 
motion.o: In function `motion_startup':
/opt/motion/motion.c:1766: undefined reference to `vid_init'
motion.o: In function `motion_shutdown':
/opt/motion/motion.c:1719: undefined reference to `vid_close'
motion.o: In function `motion_init':
/opt/motion/motion.c:436: undefined reference to `vid_start'
/opt/motion/motion.c:495: undefined reference to `vid_next'
motion.o: In function `motion_loop':
/opt/motion/motion.c:848: undefined reference to `vid_next'
/opt/motion/motion.c:822: undefined reference to `vid_start'
motion.o: In function `motion_shutdown':
/opt/motion/motion.c:1720: undefined reference to `vid_cleanup'
video.o: In function `v4l_picture_controls':
/opt/motion/video.c:69: undefined reference to `vid_do_autobright'
video.o: In function `v4l_next':
/opt/motion/video.c:307: undefined reference to `conv_yuv422to420p'
/opt/motion/video.c:303: undefined reference to `conv_rgb24toyuv420p'
collect2: ld returned 1 exit status
make: *** [motion] Error 1
[root@bob motion]# 

Environment

Motion version: 3.2.8
ffmpeg version:  
Libraries:  
Server OS: Fedora Core 6

-- LeeWild - 09 Jan 2007

Follow up

Seems that you didn't run autoconf before to run configure , anyway it's my fault to don't include in the patch the configure updated.

so please try :

  autoconf 
 ./configure  
  make

I've commit the latest v4l2 patch to svn version , but i noticed that it won't work in all systems for several reasons :

1-. Not all systems has linux/videodev2.h 2-. Some systems with kernels older than 2.6.x ( not sure what is the x value ) doesn't include <linux/videodev2.h> in <linux/videodev.h> 3-. Others that i'm missing at the moment.

So i'm trying to handle all these problems.

Please let me know if you have any problem after to update your configure ( running autoconf ).

-- AngelCarpintero - 10 Jan 2007

Answer

Update

OK that seems to work, I now have output images, woohoo !

Thanks. Now to figure out how to run it smile

-- LeeWild - 10 Jan 2007


No problem , thanks to update me .

-- AngelCarpintero - 10 Jan 2007
Topic revision: r4 - 10 Jan 2007, AngelCarpintero
Copyright © 1999-2024 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.