Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have kernel 2.6.11.8, and when I try to build ffmpeg, I get:
Code:
bash-3.00# make
make -C libavutil all
make[1]: Entering directory `/home/zax/main/ffmpeg/libavutil'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/zax/main/ffmpeg/libavutil'
make -C libavcodec all
make[1]: Entering directory `/home/zax/main/ffmpeg/libavcodec'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/zax/main/ffmpeg/libavcodec'
make -C libavformat all
make[1]: Entering directory `/home/zax/main/ffmpeg/libavformat'
gcc -O3 -g -Wall -Wno-switch -Wdeclaration-after-statement -I.. -I'/home/zax/main/ffmpeg' -I'/home/zax/main/ffmpeg'/libavutil -I'/home/zax/main/ffmpeg'/libavcodec -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o v4l2.o v4l2.c
v4l2.c:68: error: `V4L2_PIX_FMT_YUV420' undeclared here (not in a function)
v4l2.c:68: error: initializer element is not constant
v4l2.c:68: error: (near initialization for `fmt_conversion_table[0].v4l2_fmt')
v4l2.c:69: error: initializer element is not constant
v4l2.c:69: error: (near initialization for `fmt_conversion_table[0]')
v4l2.c:72: error: `V4L2_PIX_FMT_YUV422P' undeclared here (not in a function)
v4l2.c:72: error: initializer element is not constant
v4l2.c:72: error: (near initialization for `fmt_conversion_table[1].v4l2_fmt')
v4l2.c:73: error: initializer element is not constant
v4l2.c:73: error: (near initialization for `fmt_conversion_table[1]')
v4l2.c:76: error: `V4L2_PIX_FMT_YUYV' undeclared here (not in a function)
v4l2.c:76: error: initializer element is not constant
v4l2.c:76: error: (near initialization for `fmt_conversion_table[2].v4l2_fmt')
v4l2.c:77: error: initializer element is not constant
v4l2.c:77: error: (near initialization for `fmt_conversion_table[2]')
v4l2.c:80: error: `V4L2_PIX_FMT_UYVY' undeclared here (not in a function)
v4l2.c:80: error: initializer element is not constant
v4l2.c:80: error: (near initialization for `fmt_conversion_table[3].v4l2_fmt')
v4l2.c:81: error: initializer element is not constant
v4l2.c:81: error: (near initialization for `fmt_conversion_table[3]')
v4l2.c:84: error: `V4L2_PIX_FMT_YUV411P' undeclared here (not in a function)
v4l2.c:84: error: initializer element is not constant
v4l2.c:84: error: (near initialization for `fmt_conversion_table[4].v4l2_fmt')
v4l2.c:85: error: initializer element is not constant
v4l2.c:85: error: (near initialization for `fmt_conversion_table[4]')
v4l2.c:88: error: `V4L2_PIX_FMT_YUV410' undeclared here (not in a function)
v4l2.c:88: error: initializer element is not constant
v4l2.c:88: error: (near initialization for `fmt_conversion_table[5].v4l2_fmt')
v4l2.c:89: error: initializer element is not constant
v4l2.c:89: error: (near initialization for `fmt_conversion_table[5]')
v4l2.c:92: error: `V4L2_PIX_FMT_BGR24' undeclared here (not in a function)
v4l2.c:92: error: initializer element is not constant
v4l2.c:92: error: (near initialization for `fmt_conversion_table[6].v4l2_fmt')
v4l2.c:93: error: initializer element is not constant
v4l2.c:93: error: (near initialization for `fmt_conversion_table[6]')
v4l2.c:96: error: `V4L2_PIX_FMT_RGB24' undeclared here (not in a function)
v4l2.c:96: error: initializer element is not constant
v4l2.c:96: error: (near initialization for `fmt_conversion_table[7].v4l2_fmt')
v4l2.c:97: error: initializer element is not constant
v4l2.c:97: error: (near initialization for `fmt_conversion_table[7]')
v4l2.c:106: error: `V4L2_PIX_FMT_GREY' undeclared here (not in a function)
v4l2.c:106: error: initializer element is not constant
v4l2.c:106: error: (near initialization for `fmt_conversion_table[8].v4l2_fmt')
v4l2.c:107: error: initializer element is not constant
v4l2.c:107: error: (near initialization for `fmt_conversion_table[8]')
v4l2.c: In function `device_open':
v4l2.c:112: error: storage size of 'cap' isn't known
v4l2.c:124: error: `VIDIOC_QUERYCAP' undeclared (first use in this function)
v4l2.c:124: error: (Each undeclared identifier is reported only once
v4l2.c:124: error: for each function it appears in.)
v4l2.c:131: error: `V4L2_CAP_VIDEO_CAPTURE' undeclared (first use in this function)
v4l2.c:112: warning: unused variable `cap'
v4l2.c: In function `device_init':
v4l2.c:143: error: storage size of 'fmt' isn't known
v4l2.c:145: error: invalid application of `sizeof' to incomplete type `v4l2_format'
v4l2.c:146: error: `V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared (first use in this function)
v4l2.c:150: error: `V4L2_FIELD_INTERLACED' undeclared (first use in this function)
v4l2.c:151: error: `VIDIOC_S_FMT' undeclared (first use in this function)
v4l2.c:143: warning: unused variable `fmt'
v4l2.c: In function `first_field':
v4l2.c:157: error: `v4l2_std_id' undeclared (first use in this function)
v4l2.c:157: error: syntax error before "std"
v4l2.c:159: error: `VIDIOC_G_STD' undeclared (first use in this function)
v4l2.c:159: error: `std' undeclared (first use in this function)
v4l2.c:163: error: `V4L2_STD_NTSC' undeclared (first use in this function)
v4l2.c: In function `mmap_init':
v4l2.c:198: error: storage size of 'req' isn't known
v4l2.c:201: error: invalid application of `sizeof' to incomplete type `v4l2_requestbuffers'
v4l2.c:203: error: `V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared (first use in this function)
v4l2.c:204: error: `V4L2_MEMORY_MMAP' undeclared (first use in this function)
v4l2.c:205: error: `VIDIOC_REQBUFS' undeclared (first use in this function)
v4l2.c:237: error: storage size of 'buf' isn't known
v4l2.c:239: error: invalid application of `sizeof' to incomplete type `v4l2_buffer'
v4l2.c:243: error: `VIDIOC_QUERYBUF' undeclared (first use in this function)
v4l2.c:237: warning: unused variable `buf'
v4l2.c:198: warning: unused variable `req'
v4l2.c: In function `mmap_read_frame':
v4l2.c:275: error: storage size of 'buf' isn't known
v4l2.c:278: error: invalid application of `sizeof' to incomplete type `v4l2_buffer'
v4l2.c:279: error: `V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared (first use in this function)
v4l2.c:280: error: `V4L2_MEMORY_MMAP' undeclared (first use in this function)
v4l2.c:283: error: `VIDIOC_DQBUF' undeclared (first use in this function)
v4l2.c:296: error: `VIDIOC_QBUF' undeclared (first use in this function)
v4l2.c:275: warning: unused variable `buf'
v4l2.c: In function `mmap_start':
v4l2.c:313: error: storage size of 'type' isn't known
v4l2.c:317: error: storage size of 'buf' isn't known
v4l2.c:319: error: invalid application of `sizeof' to incomplete type `v4l2_buffer'
v4l2.c:320: error: `V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared (first use in this function)
v4l2.c:321: error: `V4L2_MEMORY_MMAP' undeclared (first use in this function)
v4l2.c:324: error: `VIDIOC_QBUF' undeclared (first use in this function)
v4l2.c:317: warning: unused variable `buf'
v4l2.c:333: error: `VIDIOC_STREAMON' undeclared (first use in this function)
v4l2.c:313: warning: unused variable `type'
v4l2.c: In function `mmap_close':
v4l2.c:345: error: storage size of 'type' isn't known
v4l2.c:348: error: `V4L2_BUF_TYPE_VIDEO_CAPTURE' undeclared (first use in this function)
v4l2.c:352: error: `VIDIOC_STREAMOFF' undeclared (first use in this function)
v4l2.c:345: warning: unused variable `type'
v4l2.c: In function `v4l2_read_header':
v4l2.c:439: error: `V4L2_CAP_STREAMING' undeclared (first use in this function)
make[1]: *** [v4l2.o] Error 1
make[1]: Leaving directory `/home/zax/main/ffmpeg/libavformat'
make: *** [lib] Error 2
my kernel has been compiled with support for v4l support, and yet I'm still getting these errors... even by "cheating" past the errors by:
Code:
make -i
I still can't build a working ffmpeg program (this carries over, disallowing me from building mplayer due to the libav libraries)
Anyone know what's going on?
**Also, if I use the configure option --disable-v4l, I still get this error message:
Code:
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/zax/main/ffmpeg/libavformat'
gcc -Wl,--warn-common -rdynamic -g -o ffmpeg_g ffmpeg.o cmdutils.o -L./libavformat -lavformat -L./libavcodec -lavcodec -L./libavutil -lavutil -lm -lmp3lame -logg -lvorbis -lvorbisenc -lfaad -lfaac -lxvidcore -lx264 -ldts -ldts -lz -ldl -lpthread
./libavcodec/libavcodec.so: undefined reference to `XSync'
./libavcodec/libavcodec.so: undefined reference to `XDrawPoint'
./libavcodec/libavcodec.so: undefined reference to `XMapWindow'
./libavcodec/libavcodec.so: undefined reference to `XCreateImage'
./libavcodec/libavcodec.so: undefined reference to `XSetForeground'
./libavcodec/libavcodec.so: undefined reference to `XAllocNamedColor'
./libavcodec/libavcodec.so: undefined reference to `XResizeWindow'
./libavcodec/libavcodec.so: undefined reference to `XAllocSizeHints'
./libavformat/libavformat.so: undefined reference to `v4l2_init'
./libavcodec/libavcodec.so: undefined reference to `XFree'
./libavcodec/libavcodec.so: undefined reference to `XCreateColormap'
./libavcodec/libavcodec.so: undefined reference to `XDrawLine'
./libavcodec/libavcodec.so: undefined reference to `XCreateWindow'
./libavcodec/libavcodec.so: undefined reference to `XNextEvent'
./libavcodec/libavcodec.so: undefined reference to `XDrawRectangle'
./libavcodec/libavcodec.so: undefined reference to `XSelectInput'
./libavcodec/libavcodec.so: undefined reference to `XSetStandardProperties'
./libavcodec/libavcodec.so: undefined reference to `XPutImage'
./libavcodec/libavcodec.so: undefined reference to `XOpenDisplay'
collect2: ld returned 1 exit status
make: *** [ffmpeg_g] Error 1
actually, the ifdef_KERNEL lines are already commented out for my kernel...
I think it's a problem with GCC if anything... as of late I've had a hard time compiling certain programs (especially if they rely heavily on GTK+), but I'm still working on it.
There is definitely something wrong with my compiler that I am unaware of... I tried updating my glibc, but got an "undefined resource" error as I always do.
OK this last thing and i realize also posted by OP is a linking error
nothing more than a bad Makefile or you could look at it as a bad gcc command
if you go to the directory the compiler was in when the link failed you can fix just copy past the gcc command back on the command line and add in xlib
something like this (not tested and you will have to play with it)
position is important so t might have to go further to the right -- i just put it to the right of the av stuff since that was the failure.
or you can go to the Makefile and alter it and add this stuff into a variable
try something like somewhere after the av stuff is added in.
EXTRALIBS+=-L/usr/X11R6/lib -lX11
(10:51pm:02/18/06)
(gary) /usr/X11R6/lib $ objdump -t libX11.so | grep XSync
00031c90 l F .text 0000002b _XSyncFunction
00031b90 g F .text 000000fc XSync
00031cc0 g F .text 0000009f XSynchronize
(10:51pm:02/18/06)
(gary) /usr/X11R6/lib $ objdump -t libX11.so | grep XDrawPoint
00017a00 g F .text 00000180 XDrawPoint
00017b80 g F .text 000003cb XDrawPoints
might be more x libs we need ? but you get the picture
Last edited by foo_bar_foo; 02-18-2006 at 09:58 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.