#6729 closed defect (fixed)
Compile error with v4l2 in ffmpeg git master
Reported by: | bermond | Owned by: | |
---|---|---|---|
Priority: | important | Component: | build system |
Version: | git-master | Keywords: | v4l2 regression |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | yes |
Description
I'm getting the following compile error with v4l2:
LD ffplay_g LD ffmpeg_g LD ffprobe_g LD ffserver_g libavdevice/libavdevice.a(v4l2.o): In function `device_open': /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_close' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_open' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_dup' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_ioctl' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_read' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_mmap' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_munmap' libavdevice/libavdevice.a(v4l2.o): In function `v4l2_read_header': /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:840: undefined reference to `v4l2_log_file' collect2: error: ld returned 1 exit status make: *** [Makefile:107: ffplay_g] Error 1 make: *** Waiting for unfinished jobs.... libavdevice/libavdevice.a(v4l2.o): In function `device_open': /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_close' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_open' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_dup' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_ioctl' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_read' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_mmap' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_munmap' libavdevice/libavdevice.a(v4l2.o): In function `v4l2_read_header': /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:840: undefined reference to `v4l2_log_file' collect2: error: ld returned 1 exit status make: *** [Makefile:107: ffprobe_g] Error 1 libavdevice/libavdevice.a(v4l2.o): In function `device_open': /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_close' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_open' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_dup' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_ioctl' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_read' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_mmap' /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:129: undefined reference to `v4l2_munmap' libavdevice/libavdevice.a(v4l2.o): In function `v4l2_read_header': /home/user/abs/ffmpeg-full-git/src/ffmpeg-full-git/libavdevice/v4l2.c:840: undefined reference to `v4l2_log_file' collect2: error: ld returned 1 exit status make: *** [Makefile:107: ffmpeg_g] Error 1
A git bisect shows that this is being caused by commit 6dfcbd80ad446ff163b47f2bf432bbf706436ea8.
I can confirm that it was compiling fine until commit e4d5310a507d82656d670437c3a5f3b42b3fe060. This was the commit that I used in the git bisect good
command.
How to reproduce:
$ git clone git://source.ffmpeg.org/ffmpeg.git $ cd ffmpeg $ ./configure --enable-libv4l2 $ make -j8
System information:
OS: Arch Linux x86_64
Compiler: gcc 7.2.0
glibc: 2.26
FFmpeg: git master
v4l2: 2.0.2
Relevant system-wide environmet variables:
CPPFLAGS="-D_FORTIFY_SOURCE=2"
CFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt"
CXXFLAGS="-march=native -O2 -pipe -fstack-protector-strong -fno-plt"
LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now"
Change History (5)
comment:1 by , 7 years ago
Component: | undetermined → avdevice |
---|---|
Keywords: | v4l2 regression added |
Priority: | normal → important |
follow-up: 3 comment:2 by , 7 years ago
comment:3 by , 7 years ago
Replying to jamrial:
Can you test if the following change fixes it?
diff --git a/configure b/configure index dfbc251bb2..9f95d58c6e 100755 --- a/configure +++ b/configure @@ -3116,7 +3116,7 @@ kmsgrab_indev_deps="libdrm" lavfi_indev_deps="avfilter" libcdio_indev_deps="libcdio" libdc1394_indev_deps="libdc1394" -libv4l2_indev_deps="libv4l2" +v4l2_indev_deps="libv4l2" openal_indev_deps="openal" opengl_outdev_deps="opengl" oss_indev_deps_any="soundcard_h sys_soundcard_h"
Hi. Thank you for the reply.
It compiles fine by applying this patch.
I can also confirm that my webcam input device is working as expected with -f video4linux2 -i /dev/video0
.
follow-up: 5 comment:4 by , 7 years ago
Analyzed by developer: | set |
---|---|
Component: | avdevice → build system |
Resolution: | → fixed |
Status: | new → closed |
Should be fixed in 734ed38931103c523c42333633a315a0ce1b5eb2. Thanks for the report and testing!
comment:5 by , 7 years ago
Replying to jamrial:
Should be fixed in 734ed38931103c523c42333633a315a0ce1b5eb2. Thanks for the report and testing!
I can confirm that this is fixed in the latest ffmpeg git master.
Thank for the reply and suppport. And also for the quick fix! :)
Can you test if the following change fixes it?