Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 244584 - media-tv/ivtv-utils +linux-headers-2.6.27-r1 - ivtv-osd-dma-test.c:115: error: 'struct ivtvfb_dma_frame' has no member named 'source'
Summary: media-tv/ivtv-utils +linux-headers-2.6.27-r1 - ivtv-osd-dma-test.c:115: error...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High normal with 1 vote (vote)
Assignee: Television related Applications in Gentoo's Portage
URL:
Whiteboard:
Keywords:
: 253702 256263 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-27 04:29 UTC by Eric Bosch
Modified: 2009-01-28 20:53 UTC (History)
13 users (show)

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


Attachments
ivtv-utils-1.3.0.ebuild.patch (ivtv-utils-1.3.0.ebuild.patch,5.93 KB, patch)
2008-11-13 22:46 UTC, Harald van Dijk (RETIRED)
Details | Diff
ivtv-utils-1.3.0-r1.ebuild (ivtv-utils-1.3.0-r1.ebuild,3.38 KB, text/plain)
2009-01-05 18:38 UTC, Jiri Tyr
Details
files/ivtv-utils-1.3.0-2.6.27.patch (ivtv-utils-1.3.0-2.6.27.patch,746 bytes, patch)
2009-01-05 18:39 UTC, Jiri Tyr
Details | Diff
ivtv-utils-1.3.0.ebuild.patch (ivtv-utils-1.3.0.ebuild.patch,5.86 KB, patch)
2009-01-24 22:52 UTC, Harald van Dijk (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Bosch 2008-10-27 04:29:53 UTC
After upgrade of linux-headers-2.6.27-r1, ivtv-utils-1.3.0 fails to compile.  Initially, linux-headers-2.6.27-r1 failed to install due to file collision with ivtv-utils-1.3.0

Reproducible: Always

Steps to Reproduce:
1.Unmerge ivtv-utils if currently installed
2.Upgrade linux-headers-2.6.27-r1 (while running kernel gentoo-sources-2.6.27-r1.
3.Re-emerge ivtv-utils-1.3.0

BTW, if you can tell me what is wrong in my settings that the error displayed from emerge omits the desired information, I'd greatly appreciate it.

Actual Results:  
>>> Emerging (1 of 1) media-tv/ivtv-utils-1.3.0
 * ivtv-utils-1.3.0.tar.gz RMD160 SHA1 SHA256 size ;-) ...               [ ok ]
 * checking ebuild checksums ;-) ...                                     [ ok ]
 * checking auxfile checksums ;-) ...                                    [ ok ]
 * checking miscfile checksums ;-) ...                                   [ ok ]
 * Determining the location of the kernel source code
 * Found kernel source directory:
 * /usr/src/linux
 * Found kernel object directory:
 * /lib/modules/2.6.27-gentoo-r1/build
 * Found sources for kernel version:
 * 2.6.27-gentoo-r1
 * 
 * Make sure that your I2C and V4L kernel drivers are loaded as
 * modules, and not compiled into the kernel, or IVTV will not
 * work.
 * 
 * Determining the location of the kernel source code
 * Found kernel source directory:
 * /usr/src/linux
 * Found kernel object directory:
 * /lib/modules/2.6.27-gentoo-r1/build
 * Found sources for kernel version:
 * 2.6.27-gentoo-r1
 * Checking for suitable kernel configuration options...                  [ ok ]
>>> Unpacking source...
>>> Unpacking ivtv-utils-1.3.0.tar.gz to /var/tmp/portage/media-tv/ivtv-utils-1.3.0/work
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0 ...
make -C utils all
make[1]: Entering directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/utils'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
g++ -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o v4l2-ctl.o v4l2-ctl.cpp
v4l2-ctl.cpp:816: warning: 'char* pts_to_string(char*, long unsigned int)' defined but not used
g++ -lm -o v4l2-ctl v4l2-ctl.o
g++ -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o v4l2-dbg.o v4l2-dbg.cpp
g++ -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o v4l2-driverids.o v4l2-driverids.cpp
g++ -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o v4l2-chipids.o v4l2-chipids.cpp
g++ -lm -o v4l2-dbg v4l2-dbg.o v4l2-driverids.o v4l2-chipids.o
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o ivtv-ctl.o ivtv-ctl.c
ivtv-ctl.c: In function 'main':
ivtv-ctl.c:625: warning: cast to pointer from integer of different size
ivtv-ctl.c:630: warning: cast to pointer from integer of different size
ivtv-ctl.c:635: warning: cast to pointer from integer of different size
ivtv-ctl.c:640: warning: cast to pointer from integer of different size
cc -lm -o ivtv-ctl ivtv-ctl.o
cc -D_GNU_SOURCE -O2 -Wall -g -I.  -Wl,-O1  ivtv-radio.c   -o ivtv-radio
g++ -D_GNU_SOURCE -O2 -Wall -g -I. -lm -lpthread -o ivtvplay ivtvplay.cc
cc -D_GNU_SOURCE -O2 -Wall -g -I.  -Wl,-O1  ivtv-mpegindex.c   -o ivtv-mpegindex
make CFLAGS="-D_GNU_SOURCE -O2 -Wall -g -I." -C ivtv-tune
make[2]: Entering directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/utils/ivtv-tune'
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o ivtv-tune.o ivtv-tune.c
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o frequencies.o frequencies.c
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o xawtv_parseconfig.o xawtv_parseconfig.c
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o cmdline.o cmdline.c
cc -Wl,-O1  ivtv-tune.o frequencies.o xawtv_parseconfig.o cmdline.o   -o ivtv-tune
make[2]: Leaving directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/utils/ivtv-tune'
make CFLAGS="-D_GNU_SOURCE -O2 -Wall -g -I." -C cx25840ctl
make[2]: Entering directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/utils/cx25840ctl'
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o cx25840ctl.o cx25840ctl.c
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o cx25840-registers.o cx25840-registers.c
cc -D_GNU_SOURCE -O2 -Wall -g -I.   -c -o cmdline.o cmdline.c
cc -Wl,-O1  cx25840ctl.o cx25840-registers.o cmdline.o   -o cx25840ctl
make[2]: Leaving directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/utils/cx25840ctl'
make[1]: Leaving directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/utils'
make -C test all
make[1]: Entering directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/test'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  vbi.c   -o vbi
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  wss.c   -o wss
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  vbi-passthrough.c   -o vbi-passthrough
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  vbi-detect.c   -o vbi-detect
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  ivtv-pcm-tester.c   -o ivtv-pcm-tester
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  mpeg-read-test.c   -o mpeg-read-test
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  mpeg-freq-test.c   -o mpeg-freq-test
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  mpeg-read-sleep-test.c   -o mpeg-read-sleep-test
mpeg-read-sleep-test.c: In function 'main':
mpeg-read-sleep-test.c:48: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'long unsigned int'
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  mpeg-enc-stop-start-test.c   -o mpeg-enc-stop-start-test
mpeg-enc-stop-start-test.c: In function 'main':
mpeg-enc-stop-start-test.c:51: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'long unsigned int'
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  ivtv-yuv-dma-test.c   -o ivtv-yuv-dma-test
cc -I../utils -D_GNU_SOURCE -O2 -Wall  -lm  ivtv-osd-dma-test.c   -o ivtv-osd-dma-test
In file included from ivtv-osd-dma-test.c:9:
../utils/linux/ivtvfb.h:29: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
ivtv-osd-dma-test.c: In function 'main':
ivtv-osd-dma-test.c:115: error: 'struct ivtvfb_dma_frame' has no member named 'source'
ivtv-osd-dma-test.c:116: error: 'struct ivtvfb_dma_frame' has no member named 'dest_offset'
ivtv-osd-dma-test.c:117: error: 'struct ivtvfb_dma_frame' has no member named 'count'
make[1]: *** [ivtv-osd-dma-test] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-tv/ivtv-utils-1.3.0/work/ivtv-utils-1.3.0/test'
make: *** [all] Error 2
 * 
 * ERROR: media-tv/ivtv-utils-1.3.0 failed.
 * Call stack:
 * ebuild.sh, line   49:  Called src_compile
 * environment, line 3282:  Called die
 * The specific snippet of code:
 * emake || die "failed to build"
 * The die message:
 * failed to build
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/media-tv/ivtv-utils-1.3.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/media-tv/ivtv-utils-1.3.0/temp/environment'.


Expected Results:  
successful emerge ivtv-utils-1.3.0

saruman ~ # emerge --info
Portage 2.2_rc12 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r0, 2.6.27-gentoo-r1 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r1-x86_64-Intel-R-_Core-TM-2_CPU_6600_@_2.40GHz-with-glibc2.2.5
Timestamp of tree: Mon, 27 Oct 2008 02:02:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-apps/sandbox:    1.2.18.1-r3
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r1
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_GB"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
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="/usr/local/portage/layman/sunrise /usr/local/portage/layman/wschlich /usr/local/portage/layman/gcc-porting /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac aalib acl acpi alsa amarok amd64 amd64-multilib apache2 arts auth avi berkdb binfilter bitmap-fonts bluetooth bootsplash branding bzip2 cairo cdda cddb cdio cdparanoia cdr cgi clamav cli cpudetection cracklib crypt css ctype cups curl curlwrappers cvs dba dbus dga doc dpms dri dts dv dvb dvd dvdr dvdread eds emboss encode esd ethereal evo examples exif fam fame fbcondecor ffmpeg fftw firefox flac font-server fontconfig foomaticdb fortran galago gd gdbm gif gimp gimpprint git gnome gpm graphviz grub gstreamer gtk gvim gzip hal hash iconv icq ieee1394 imagemagick imlib ipod iptv irmc isdnlog ithreads ivtv jack java javascript jfs jpeg kde kdepim lame libg++ libnotify libvisual lirc live lm_sensors logrotate loop-aes lpr mad midi mikmod mjpeg mmx mmxext mono mp3 mp3lame mp4 mp4live mpeg mpeg2 mplayer mpm-worker mudflap multilib multislot mysql mythtv ncurses network nfs njb nls nptl nptlonly nsplugin nvidia oav odbc offensive ogg opengl openmp openntpd oss pam pan pcre pda pdf pdflib perl perlsuid php png posix povray ppds pppd profile pulseaudio python qt3 qt3support qt4 quicktime raw readline reflection rtc samba scanner sdk sdl seamonkey sensord server session slp smp snmp source spell spl sqlite sse sse2 ssl startup-notification subversion svg symlink sysfs sysvipc tcl tcpd tetex theora threads tiff tk tools truetype unicode usb utempter utils v4l v4l2 vim vim-syntax visualization vorbis webdav wma wmf wxwindows xcomposite xfs xine xinerama xml xmlreader xmlwriter xorg xprint xulrunner xv xvmc zlib" ALSA_CARDS="emu10k1" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_GB" LIRC_DEVICES="mceusb2 hauppauge" USERLAND="GNU" VIDEO_CARDS="nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Wormo (RETIRED) gentoo-dev 2008-10-27 06:08:54 UTC
Not sure what you mean by "the error displayed from emerge omits the desired information"; it looks to me as though you have posted a proper build log including compile error messages. 

Could you post one more key piece of info -- which header collided between ivtv-utils and linux-headers?
Comment 2 Joseph Yasi 2008-10-27 07:32:08 UTC
The colliding headers are:

/usr/include/linux/ivtvfb.h                          
/usr/include/linux/ivtv.h
Comment 3 Eric Bosch 2008-10-27 22:41:04 UTC
Sorry, I had a Locale issue, which is what caused my initial statement that the required info was missing.  I commented out my Locale variables, and recompiled, and forgot to edit my comments, and yes, it was /usr/include/ivtv.h and /usr/include/ivtvfb.h.  Thank you.
Comment 4 Eric Bosch 2008-10-27 22:51:12 UTC
Sorry, meant to say /usr/include/linux/ivtv.h, /usr/include/linux/ivtvfb.h
Comment 5 Nathan W. Labadie 2008-10-30 14:49:21 UTC
Hello,

I've got the exact same problem and same file conflicts.
Comment 6 Marcus Hähnel 2008-10-30 14:56:39 UTC
same problem here on a fresh install. (had no colissions because no ivtv-utils was previously installed)
Comment 7 Marcus Hähnel 2008-10-30 15:16:14 UTC
it seems to be that the include file in the ivtv-uitls package is wrong.

If you patch line 29 of utils/linux/ivtvfb.h so that the __USR thing is gone it works..

Comment 8 Marcus Hähnel 2008-11-06 15:12:25 UTC
well ... since nobody resposible resonded its me again.

The package uses own versions of /usr/include/linux/ivtv.h and ivtvfb.h

It should use the ones provided by the kernel (the linux-headers).
This prevents the syntax error in the includes in the packages as well as the file collision.
Comment 9 Harald van Dijk (RETIRED) gentoo-dev 2008-11-13 22:46:29 UTC
Created attachment 171662 [details, diff]
ivtv-utils-1.3.0.ebuild.patch

Right. This patch makes it do that, and ivtv-utils installs and runs correctly with 2.6.27 headers here. (The perl change is unrelated, but obvious.) This breaks the build for <2.6.27 headers, though, so it shouldn't be done exactly the way I have here, and simply conditionally applying the patch is not a solution either: it can't be fixed upstream like that, and it won't fix the file collision when upgrading linux-headers after installing ivtv-utils.
Comment 10 happyfool 2008-11-25 17:13:01 UTC
Seems to me that upstream should declare 2.6.27 headers a dependancy, and accept Harald's patch. Else gentoo should just depend on them in a new -r of the ebuild.

Sorry to pollute this bug, but could whoever commits a fix for this also remove the media-tv/ivtv dependancy from x11-drivers/xf86-video-ivtv? Or change it to "|| ( media-tv/ivtv media-tv/ivtv-utils )".
The problem may be unrelated, but the cause is (ivtv moving in-kernel) and it seems silly to file a seperate bug for such a small change.

Also, ivtv and ivtv-utils should probably block eachother..
Comment 11 Robert Schultz 2008-12-13 17:09:57 UTC
The patch works great:

Linux thornberry 2.6.28-rc6 #4 SMP Sat Dec 13 11:44:32 EST 2008 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ AuthenticAMD GNU/Linux

Just wanted to confirm that it works great, and thanks :)
Comment 12 Mathew Alexander 2008-12-22 15:10:46 UTC
how does one apply this patch?
Comment 13 Harald van Dijk (RETIRED) gentoo-dev 2008-12-29 20:39:39 UTC
(In reply to comment #12)
> how does one apply this patch?

The patch doesn't apply anymore, because the ebuild has changed slightly. If you run
  patch -d /usr/portage -p4 </path/to/patch/file
you should now get one error ("Hunk #1 FAILED at 12.") which you need to fix manually by adding >=sys-kernel/linux-headers-2.6.27 to the ebuild's DEPEND. Or you can wait for me (or someone else) to update the patch.
Comment 14 Harald van Dijk (RETIRED) gentoo-dev 2009-01-04 20:44:43 UTC
*** Bug 253702 has been marked as a duplicate of this bug. ***
Comment 15 Jean-Marc Hengen 2009-01-05 09:56:07 UTC
sys-kernel/linux-headers-2.6.27-r2 has gone stable and has the same collision with media-tv/ivtv.
Comment 16 Jiri Tyr 2009-01-05 18:38:33 UTC
Created attachment 177490 [details]
ivtv-utils-1.3.0-r1.ebuild

Modified ebuild for ivtv-utils working with >=sys-kernel/linux-headers-2.6.27.
Comment 17 Jiri Tyr 2009-01-05 18:39:51 UTC
Created attachment 177491 [details, diff]
files/ivtv-utils-1.3.0-2.6.27.patch

Patch necessary for ivtv-utils-1.3.0 to be working with >=sys-kernel/linux-headers-2.6.27.
Comment 18 Myk Taylor 2009-01-06 07:21:15 UTC
(In reply to comment #17)
1.3.0-r1 ebuild with associated patch successfully tested on amd64 (with =sys-kernel/linux-headers-2.6.27-r2 installed)
Comment 19 Harald van Dijk (RETIRED) gentoo-dev 2009-01-06 18:32:52 UTC
(In reply to comment #16)
You patch the included headers so that they're identical to the system headers, then compile using the included headers and install them, only to remove them afterwards? That can be a good idea when it's too much work to get rid of the headers right from the start, but in this case I already posted a patch that fixes this more completely. If you have an issue with my suggestion, if you think I took a wrong approach, I'd appreciate it if you would share your reasoning. (Note that your patch might have had the benefit of not requiring updated headers, except you depend on them anyway.)
Comment 20 simon 2009-01-09 22:21:05 UTC
Thanks for your work, the new ebuild and the patch work for me. It would be nice if someone could put it into the portage tree soon.
Comment 21 Miroslav Rovis 2009-01-21 17:21:44 UTC
(In reply to comment #20)
> Thanks for your work, the new ebuild and the patch work for me. It would be
> nice if someone could put it into the portage tree soon.
> 
Esp. for those that can't figure how to use it... like me, but I'll try some more... :)
Comment 22 Jesse Adelman 2009-01-21 22:12:31 UTC
* Messages for package sys-kernel/linux-headers-2.6.27-r2:

 * This package will overwrite one or more files that may belong to other
 * packages (see list below). You can use a command such as `portageq
 * owners / <filename>` to identify the installed package that owns a
 * file. If portageq reports that only one package owns a file then do
 * NOT file a bug report. A bug report is only useful if it identifies at
 * least two or more packages that are known to install the same file(s).
 * If a collision occurs and you can not explain where the file came from
 * then you should simply ignore the collision since there is not enough
 * information to determine if a real problem exists. Please do NOT file
 * a bug report at http://bugs.gentoo.org unless you report exactly which
 * two packages install the same file(s). Once again, please do NOT file
 * a bug report unless you have completely understood the above message.
 * 
 * Detected file collision(s):
 * 
 *      /usr/include/linux/ivtv.h
 *      /usr/include/linux/ivtvfb.h
 * 
 * Searching all installed packages for file collisions...
 * 
 * Press Ctrl-C to Stop
 * 
 * media-tv/ivtv-utils-1.3.0
 *      /usr/include/linux/ivtv.h
 *      /usr/include/linux/ivtvfb.h
 * 
 * Package 'sys-kernel/linux-headers-2.6.27-r2' NOT merged due to file
 * collisions. If necessary, refer to your elog messages for the whole
 * content of the above message.

Sure looking forward to a fix for this to arrive in Portage. Thanks.
Comment 23 Robert Bradbury 2009-01-24 15:53:32 UTC
Could someone reading this please explain what I need or do not need with the Linux 2.6.28-gentoo and ivtv with a Hauppauge PVR-150?

Because when I tried to install linux-headers-2.6.27-r2 with ivtv-1.2.0-r1 the install failed with "file collision(s) on:

 * 	/usr/include/linux/ivtv.h
 * 	/usr/include/linux/ivtvfb.h

So I uninstalled ivtv, installed linux-headers-2.6.27-r2 with success, but when I tried to reinstall ivtv-1.2.0 it failed with
die "This only works on 2.6.25 kernels"

I have only a limited understanding of the ebuilds and really don't want to learn them.  But it sounds like there is a consistency problem between
a) What is enabled in /etc/portage/package.keywords (I currently have media-tv/ivtv enabled).
b) linux-headers (why isn't there a linux-headers-2.6.28???)
c) whether or not ivtv is installed or deinstalled (if for some reason I decide to fall back to 2.6.25 because something worked better there, do I have to reinstall ivtv to get that feature back?  That is sort of a pain to remember.

(I've seen cases where falling back was necessary because some new kernals broke my ability to use mplayer to watch the normal video on the Hauppauge.)

Comment 24 Robert Bradbury 2009-01-24 16:09:08 UTC
Part of the confusion may result from the extremely poor "Description:" lines that result from an "emerge -s ivtv".

1) The description lines for ivtv and ivtv-utils are the SAME!  How is a person that knows he has a PVR-150 supposed to know which of thse packages to install?
2) I've got ivtv-firmware installed.  Do I still need that?
3) Does it make sense for me to have ivtvplayer installed?
4) And what does xf86-video-ivtv buy me if anything?   I've seen combinations of drivers, the Linux kernal and X where using mplayer to watch TV will consume 80% of the CPU and cases where it conumes less than 20%.

It feels like I'm playing Russian roulette here with the various packages -- keep pulling the trigger and if your really lucky you may not kill yourself.

The openrc package cost me 3+ days of downtime after I upgraded it in December.  The system wouldn't boot and I had to install a recent Ubuntu release on a completely different root partition to get a runnable linux which enabled me to reconstruct a bootable Gentoo.
Comment 25 Richard Freeman gentoo-dev 2009-01-24 17:01:23 UTC
With a recent kernel (>= 2.6.26) you need to use ivtv-utils, and compile the ivtv drivers into your kernel.  

A little history - ivtv used to be a separate package, and then it was integrated into the mainline kernel.

I agree that this could be better documented - it might not hurt to distinguish between these packages in their description.

Installing either ivtv or ivtv-utils will pull in ivtv-firmware.  It isn't required to build ivtv, but it is required to actually use it.

It looks like the next step is to put the fixed ebuild in portage so that it can become stable.  Beandog and Cardoe are the package maintainers.
Comment 26 Miroslav Rovis 2009-01-24 22:40:18 UTC
(In reply to comment #25)
> Installing either ivtv or ivtv-utils will pull in ivtv-firmware.  It isn't
> required to build ivtv, but it is required to actually use it.
> 
Upon installing ivtv and friends, I looked for solutions, which arose to waterboard me, here:
http://www.linuxtv.org/pipermail/linux-dvb/2009-January/031630.html
(pls. refer to what I wrote in that post).
Could it be that I'm having terribly coppy video, and heavily stuttering audio on satellite, beacuse I followed this guide:
http://linuxtv.org/wiki/index.php/Hauppauge_WinTV-HVR-4000#Firmware_v1.23.86.1
and installed manually:
firmware v1.23.86.1
That conflicted with ivtv-firmware (cx88 not sometimes loading and sometimes not at all), so I "emerge --unmerge ivtv-firmware".
does anyone knows if there, with the firmware and gentoo packaging of it (18 months old package:
#  emerge -s ivtv-firmware
Searching...
*  media-tv/ivtv-firmware
      Latest version available: 20070217
or the latest firmware v1.23.86.1, sure I would thought the latter was to be used...
But, is it now that the rest of the ivtv packaging is not matched with the firmware?
Thanks if anyone helps with the matter...
Comment 27 Miroslav Rovis 2009-01-24 22:50:36 UTC
(In reply to comment #23)
> Linux 2.6.28-gentoo and ivtv with a Hauppauge PVR-150?
I have 2.6.28-gentoo as well, but Hauppauge HVR-3000. 
I can reply only to this:
> ... failed with "file collision(s) on:
>  *      /usr/include/linux/ivtv.h
>  *      /usr/include/linux/ivtvfb.h
...
> I tried to reinstall ivtv-1.2.0 it failed with
...
> I have only a limited understanding of the ebuilds and really don't want to
> learn them.  
Neither did I. But managed to intall manually the files in:
/var/tmp/portage/media-tv/ivtv-utils-1.3.0/image/
You can just diff or md5 the *.h in the
/var/tmp/portage/media-tv/ivtv-utils-1.3.0/image/usr/include/linux/
with the same name files in /usr/include/linux/ which they conflict with. They're identical. Just leave them out.
grep, find man's and things... It's linux...
Comment 28 Harald van Dijk (RETIRED) gentoo-dev 2009-01-24 22:52:51 UTC
Created attachment 179609 [details, diff]
ivtv-utils-1.3.0.ebuild.patch

@media-tv: linux-headers-2.6.27 is getting marked stable now, so there's less of a point in remaining compatible with older versions. Any objections if I (or you) just fix this by forcing 2.6.27? This is the same patch as before, just recreated because the ebuild changed slightly.
Comment 29 Miroslav Rovis 2009-01-24 22:57:12 UTC
(In reply to comment #23)
> Linux 2.6.28-gentoo and ivtv with a Hauppauge PVR-150?
I have 2.6.28-gentoo as well, but Hauppauge HVR-3000. 
I can reply only to this:
> ... failed with "file collision(s) on:
>  *      /usr/include/linux/ivtv.h
>  *      /usr/include/linux/ivtvfb.h
...
> I tried to reinstall ivtv-1.2.0 it failed with
...
> I have only a limited understanding of the ebuilds and really don't want to
> learn them.  
Neither did I. But managed to intall manually the files in:
/var/tmp/portage/media-tv/ivtv-utils-1.3.0/image/
You can just diff or md5 the *.h in the
/var/tmp/portage/media-tv/ivtv-utils-1.3.0/image/usr/include/linux/
with the same name files in /usr/include/linux/ which they conflict with. They're identical. Just leave them out.
grep, find man's and things... It's linux...
Comment 30 Richard Freeman gentoo-dev 2009-01-24 23:13:51 UTC
(In reply to comment #28)
> @media-tv: linux-headers-2.6.27 is getting marked stable now, so there's less
> of a point in remaining compatible with older versions. Any objections if I (or
> you) just fix this by forcing 2.6.27? 

That would seem to make sense to me.  It will be nice to be able to unmask linux-headers-2.6.27 so that it doesn't keep complaining about the file collisions...  :)
Comment 31 Robert Bradbury 2009-01-24 23:22:55 UTC
Richard and/or Jiri, I second the motion to get the .ebuild patch applied as
soon as possible!

I tried to apply it myself but ran into problems. Using:
  ebuild /usr/portage/media-tv/ivtv-utils manifest
and the error I got was:
  Appending /usr to PORTDIR_OVERLAY...
  !!! portage/ivt does not follow correct package syntax.
(I have *no clue* as to what portage/ivt is).

I know that I figured out how to apply a .ebuild patch successfully before. 
But can't figure it out today.  Either portage/ebuild have become more
complicated or I am missing something.  I spent several hours today googling
for the solution unsuccessfully.  If one cannot easily apply an ebuild patch
(or OVERLAY the distributed system) then they are essentially worthless.  

And could someone please fix Section 4.10 in the Portage Introduction [1] that
says one should not use the ebuild manifest option on a package as well as the
ebuild man page so they instead document the precise steps that one should take
to install a patch and rebuild the Manifest and whatever other files are
necessary.  Its *my* computer and I'm going to be tempted to switch to another
Linux distribution which doesn't make it so difficult to install upgrades due
to the lack of documentation.  There is a class of users that does not want to
learn "all about portage and ebuild and patches" -- but who demand that they
can find instructions on how to apply patches when it is absolutely necessary
so that they don't have to wait weeks to months for the core Gentoo developers
to fix the problem.

1. http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
Comment 32 Harald van Dijk (RETIRED) gentoo-dev 2009-01-24 23:33:03 UTC
(In reply to comment #31)
> I tried to apply it myself but ran into problems. Using:
>   ebuild /usr/portage/media-tv/ivtv-utils manifest
> and the error I got was:
>   Appending /usr to PORTDIR_OVERLAY...
>   !!! portage/ivt does not follow correct package syntax.
> (I have *no clue* as to what portage/ivt is).

ebuild wants the path to an ebuild file, not the path to its parent directory.

  ebuild /usr/portage/media-tv/ivtv-utils/ivtv-utils-1.3.0 manifest

Alternatively:

  cd /usr/portage/media-tv/ivtv-utils
  repoman manifest

> And could someone please fix Section 4.10 in the Portage Introduction [1] that
> says one should not use the ebuild manifest option on a package as well as the
> ebuild man page so they instead document the precise steps that one should take
> to install a patch and rebuild the Manifest and whatever other files are
> necessary.

The portage introduction is just that, an introduction. If you're not familiar with portage, you probably aren't modifying ebuilds. If you're not modifying ebuilds, you shouldn't use ebuild manifest, because you cannot (there are always exceptions) know whether it's the manifest that's broken, or the other files.
Comment 33 Harald van Dijk (RETIRED) gentoo-dev 2009-01-24 23:37:53 UTC
(In reply to comment #32)
> ebuild wants the path to an ebuild file, not the path to its parent directory.
> 
>   ebuild /usr/portage/media-tv/ivtv-utils/ivtv-utils-1.3.0 manifest

That should of course be

  ebuild /usr/portage/media-tv/ivtv-utils/ivtv-utils-1.3.0.ebuild manifest
Comment 34 Robert Bradbury 2009-01-25 06:42:08 UTC
Yes Harald, thank you for pointing this out.  In rereading the ebuild man page more slowly I see that that is documented in the first few paragraphs.  However in rereading the "manifest" command subsection it looks like it is dealing with a number of other files in the package directory and perhaps even sub-directories.  If so, why would one not specify the package directory rather than a specific ebuild-file?  It sounds like a confusing design to me.

In any case, after rebuilding the Manifest, ivtv-utils will still not compile.  Apparently due to an undefined EPATCH_SOURCE.

Witness:
 * Cannot find $EPATCH_SOURCE!  Value for $EPATCH_SOURCE is:
 *
 *   /usr/portage/media-tv/ivtv-utils/files/ivtv-utils-1.3.0-2.6.27.patch
 *   ( ivtv-utils-1.3.0-2.6.27.patch )

Comment 35 Harald van Dijk (RETIRED) gentoo-dev 2009-01-25 12:12:56 UTC
(In reply to comment #34)
> In any case, after rebuilding the Manifest, ivtv-utils will still not compile. 
> Apparently due to an undefined EPATCH_SOURCE.

Then something went wrong in applying the patch. Did you use the form from comment #13, or something else? And this is no longer about a problem in ivtv-utils, but about how to use patch and ebuild, so if you still have problems, please let's move it somewhere else, for example e-mail or the forums. I'll be happy to help there, but there's no point in sending it to everyone CC'd on this bug anymore. :)
Comment 36 Harald van Dijk (RETIRED) gentoo-dev 2009-01-25 12:13:05 UTC
*** Bug 256263 has been marked as a duplicate of this bug. ***
Comment 37 Drake Donahue 2009-01-25 20:41:16 UTC
This is definitely an upstream problem. Downloading and attempting to compile ivtv-utils 1.3.0 from www.ivtv.org produced the exact same set of errors.

However downloading, compiling, and installing the bleeding edge driver from http://ivtvdriver.org/index.php/Download#Bleeding_Edge_driver proceeds without error and has mythtv working once again for me. Apparently upstream has a solution but has not declared it stable as yet. As I did not do this the portage way, I expect future pain.

I recommend anyone wanting mythtv on ivtv now go to ivtvdriver.org and download and install the bleeding edge driver while waiting for emerge ivtv-utils to work.
 
For info I am on ~amd64 for sys-kernel/linux-headers-2.6.28-r1 and  sys-kernel/gentoo-sources-2.6.28-r1. I never saw the file collision errors.
Comment 38 Harald van Dijk (RETIRED) gentoo-dev 2009-01-28 20:53:19 UTC
Fixed now.