Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 361107 - media-libs/mediastreamer-2.6.0 failed to compile with linux kernel 2.6.38
Summary: media-libs/mediastreamer-2.6.0 failed to compile with linux kernel 2.6.38
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mounir Lamouri (volkmar) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: linux-headers-2.6.38
  Show dependency tree
 
Reported: 2011-03-29 12:54 UTC by Guillaume BINET
Modified: 2011-04-09 14:07 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
/usr/portage-delta/media-libs/mediastreamer-2.7.3-r101.ebuild (mediastreamer-2.7.3-r101.ebuild,4.09 KB, text/plain)
2011-04-09 05:54 UTC, hirakendu
Details
/usr/portage-updates/media-libs/mediastreamer/files/mediastreamer-nov4l1.patch (mediastreamer-nov4l1.patch,2.36 KB, patch)
2011-04-09 05:56 UTC, hirakendu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume BINET 2011-03-29 12:54:19 UTC
2 -pipe  -Wall   -pthread -D_REENTRANT  -c -o msv4l2.lo msv4l2.c
  CC     theora.lo
/bin/sh ../libtool --silent --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include/   -I.. -D_REENTRANT       -DVIDEO_ENABLED -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL   -DHAVE_SDL -DORTP_INET6 -march=native -msse4 -mcx16 -msahf -O2 -pipe  -Wall   -pthread -D_REENTRANT  -c -o theora.lo theora.c
  CC     videoenc.lo
/bin/sh ../libtool --silent --tag=CC   --mode=compile x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I.. -I../include/   -I.. -D_REENTRANT       -DVIDEO_ENABLED -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL   -DHAVE_SDL -DORTP_INET6 -march=native -msse4 -mcx16 -msahf -O2 -pipe  -Wall   -pthread -D_REENTRANT  -c -o videoenc.lo videoenc.c
msv4l.c:33:28: fatal error: linux/videodev.h: No such file or directory

Apparently this file has been removed from the linux kernel.


Reproducible: Always

Steps to Reproduce:
1. upgrade to 2.6.38 headers
2. try to emerge media-libs/mediastreamer-2.6.0 
3.
Actual Results:  
msv4l.c:33:28: fatal error: linux/videodev.h: No such file or directory

Expected Results:  
should install

root@hal:~# locate videodev.h
/usr/include/libv4l1-videodev.h
/usr/lib64/metasploit3/external/source/meterpreter/source/bionic/libc/kernel/common/linux/videodev.h
/usr/portage/distfiles/svn-src/metasploit/trunk/external/source/meterpreter/source/bionic/libc/kernel/common/linux/videodev.h
/usr/src/linux-2.6.37-gentoo-r1/include/linux/videodev.h
/usr/src/linux-2.6.38-gentoo/drivers/staging/se401/videodev.h
/usr/src/linux-2.6.38-gentoo/drivers/staging/usbvideo/videodev.h
/usr/src/linux-2.6.38-gentoo-r1/drivers/staging/se401/videodev.h
/usr/src/linux-2.6.38-gentoo-r1/drivers/staging/usbvideo/videodev.h
root@hal:~# emerge --info
Portage 2.1.9.45 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r2, 2.6.38-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.38-gentoo-r1-x86_64-Intel-R-_Core-TM-_i7_CPU_950_@_3.07GHz-with-gentoo-2.0.2
Timestamp of tree: Tue, 29 Mar 2011 05:15:01 +0000
app-shells/bash:     4.2_p8
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.6.6-r2, 2.7.2_pre20110327::python, 3.1.4_pre20110327::python
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.0::pentoo
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
virtual/os-headers:  2.6.38 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -msse4 -mcx16 -msahf -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -msse4 -mcx16 -msahf -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs collision-protect distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.ovh.net/gentoo-distfiles/"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en fr ja en_US fr_FR"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/kde /var/lib/layman/pentoo /var/lib/layman/python /var/lib/layman/matsuu /usr/local/portage/gbin"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib acl acpi alsa amd64 aotuv ares asf avahi bash-completion berkdb bindist bluetooth branding bzip2 cairo cdaudio cdr cjk cli consolekit cracklib crypt cups cxx dbus directfb divx4linux dri dts dv dvd dvdr dvdread emboss emul-linux-x86 encode esd exif fam fbsplash ffmpeg firefox flac fortran gcj gd gdbm gdu geoip gif glitz gpm gtk gtk2 htmlhandbook http i8x0 iconv idn ieee1394 imagemagick jack java java6 javascript jfs joystick jpeg jpeg2k kde kdexdeltas kipi lcms libcaca libnotify lm_sensors lzma mad midi mikmod mmap mmx mng modplug modules mp3 mp4 mpeg mplayer mudflap multilib musepack musicbrainz ncurses nls nptl nptlonly nsplugin ntfs obex ogg oggvorbis openexr opengl openmp pam pango pch pcmcia pcre pdf perl png policykit postgres ppds pppd python qt3 qt3support qt4 rdesktop readline reiserfs samba sasl scanner sdl semantic-desktop session socks5 speex spell sse sse2 sse3 ssl startup-notification svg sysfs tcpd theora threads tiff truetype udev unicode usb usepackagedmakefiles v4l v4l2 vcd vdpau vhosts vorbis wavpack wifi wmf x264 xcb xcomposite xine xinerama xorg xpm xulrunner xv xvid xvmc zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en fr ja en_US fr_FR" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Damian Kołkowski 2011-03-30 08:30:13 UTC
So for now with 2.6.38 kernel, we have to compile it without video flag.

USE="-video" emerge media-libs/mediastreamer
Comment 2 Someone Else Who Won't Be Here 2011-04-07 13:38:52 UTC
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.
Comment 3 hirakendu 2011-04-09 05:52:56 UTC
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.
Comment 4 hirakendu 2011-04-09 05:54:45 UTC
Created attachment 269109 [details]
/usr/portage-delta/media-libs/mediastreamer-2.7.3-r101.ebuild
Comment 5 hirakendu 2011-04-09 05:56:28 UTC
Created attachment 269111 [details, diff]
/usr/portage-updates/media-libs/mediastreamer/files/mediastreamer-nov4l1.patch
Comment 6 Peter Volkov (RETIRED) gentoo-dev 2011-04-09 09:38:42 UTC
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.
Comment 7 Ted Rodgers 2011-04-09 09:50:26 UTC
Thanks Peter and hirakendu.
Comment 8 Juergen Rose 2011-04-09 11:17:22 UTC
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.
Comment 9 Peter Volkov (RETIRED) gentoo-dev 2011-04-09 14:07:13 UTC
(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