Summary: | media-libs/mediastreamer-2.6.0 failed to compile with linux kernel 2.6.38 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Guillaume BINET <gbin> |
Component: | Current packages | Assignee: | Mounir Lamouri (volkmar) (RETIRED) <volkmar> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | pva, voip+disabled |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 359595 | ||
Attachments: |
/usr/portage-delta/media-libs/mediastreamer-2.7.3-r101.ebuild
/usr/portage-updates/media-libs/mediastreamer/files/mediastreamer-nov4l1.patch |
Description
Guillaume BINET
2011-03-29 12:54:19 UTC
So for now with 2.6.38 kernel, we have to compile it without video flag. USE="-video" emerge media-libs/mediastreamer I'm seeing a couple things here: 1) having media-libs/libv4l installed always makes mediastreamer think it should support v4l1 a: libv4l provides /usr/lib/pkgconfig/libv4l1.pc or /usr/lib64/pkgconfig/libv4l1.pc b: mediastreamer checks for libv4l1 using pkgconfig during configure if it finds it: checking for LIBV4L1... yes if it doesn't find it: checking for LIBV4L1... no verified that file is checked by moving libv4l.pc and rechecking configure 2) the autotools for media-libs/mediastreamer are bad and don't produce a correct src/Makefile a. config.log show v4l2 support is found and v4l1 is not: # grep libv4l ./config.log $ ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --htmldir=/usr/share/doc/mediastreamer-2.6.0/html --datadir=/usr/share/mediastreamer --libdir=/usr/lib64 --disable-strict --enable-external-ortp --disable-dependency-tracking --disable-artsc --enable-alsa --disable-pulseaudio --disable-macsnd --disable-macaqsnd --disable-debug --disable-gsm --disable-ipv6 --disable-jack --disable-oss --disable-portaudio --enable-speex --enable-theora --enable-libv4l --enable-video --enable-x11 configure:19235: $PKG_CONFIG --exists --print-errors "libv4l2" configure:19251: $PKG_CONFIG --exists --print-errors "libv4l2" configure:19310: $PKG_CONFIG --exists --print-errors "libv4l1" Package libv4l1 was not found in the pkg-config search path. Perhaps you should add the directory containing `libv4l1.pc' No package 'libv4l1' found configure:19326: $PKG_CONFIG --exists --print-errors "libv4l1" Package libv4l1 was not found in the pkg-config search path. Perhaps you should add the directory containing `libv4l1.pc' No package 'libv4l1' found No package 'libv4l1' found b. references to videodev.h are found in the correct files: mediastreamer-config.h is included many places, including src/Makefile.in configure scripts doing checks act properly and mediastreamer-config.h has: /* Define to 1 if you have the <linux/videodev.h> header file. */ /* #undef HAVE_LINUX_VIDEODEV_H */ /* Define to 1 if you have the <linux/videodev2.h> header file. */ #define HAVE_LINUX_VIDEODEV2_H 1 c. src/Makefile.am should be testing whether v4l1 and/or v4l2 is supported, but doesnt if BUILD_V4L libmediastreamer_la_SOURCES+=msv4l.c msv4l2.c endif should be if BUILD_V4L if <some test on a variable for v4l1 support> libmediastreamer_la_SOURCES+=msv4l.c endif if <some test on a variable for v4l2 support> libmediastreamer_la_SOURCES+=msv4l2.c endif endif similar tests should be run for other things so that the src/Makefile doesn't include filenames in the build that shouldn't be there: line 56: am__append_14 = msv4l.c msv4l2.c line 133: (as part of am__libmediastreamer_la_SOURCES_DIST) has msv4l.c line 152: am__objects_14 = msv4l.lo msv4l2.lo line 583: #include ./$(DEPDIR)/msv4l.Plo I successfully built media-libs/mediastreamer-2.6.0 by hacking around the problems: moving the libv4l1.pc file and editing /src/Makefile to remove the msv4l.* parts (leaving in the msv4l2.* ones) but it was just a workaround and not a proper patch/solution since ebuild compile did not work with it. Dug into some autotools manuals to try to create a better fix, but I'm not there yet. Attaching a working ebuild (and patch) for mediastreamer-2.7.3 that works with linux-headers-2.6.38. Emerges fine, not sure if it works though. Created attachment 269109 [details]
/usr/portage-delta/media-libs/mediastreamer-2.7.3-r101.ebuild
Created attachment 269111 [details, diff]
/usr/portage-updates/media-libs/mediastreamer/files/mediastreamer-nov4l1.patch
Fixed in 2.7.3. + 09 Apr 2011; Peter Volkov <pva@gentoo.org> mediastreamer-2.7.3.ebuild, + +files/mediastreamer-2.7.3-v4l-automagic.patch: + Finally fix v4l1 automagic and inability to be built with + linux-headers-2.6.38, bug 361107 thank Guillaume BINET for report and Ted + Rodgers, hirakendu and for help. Thanks Peter and hirakendu. Hi Peter and hirakendu, thanks for the patch, which worked for me. But it seems that the patch is still not included in the mediastreamer-2.7.3.ebuild. (In reply to comment #8) > But it seems that the patch is still not included in the > mediastreamer-2.7.3.ebuild. It is splitted in two parts: 1. v4l automagic patch which is included (mediastreamer-2.7.3-v4l-automagic.patch) 2. Don't build parts depend on linux/videodev.h. This is done in ebuild with the following: sed -i -e 's:msv4l.c::' src/Makefile.am || die |