# ivtv-0.1.9-r3 fails to build under kernel 2.6.7-rc2

## blackstar

Using gcc 3.3.3-r5, ivtv 0.1.9-r3 fails to build under kernel 2.6.7-rc2. I get:

[SNIP]

  CC [M]  /var/tmp/portage/ivtv-0.1.9-r3/work/ivtv/driver/ivtv-i2c.o

/var/tmp/portage/ivtv-0.1.9-r3/work/ivtv/driver/ivtv-i2c.c:59: error: `I2C_ADAP_CLASS_TV_ANALOG' undeclared here (not in a function)

/var/tmp/portage/ivtv-0.1.9-r3/work/ivtv/driver/ivtv-i2c.c:59: error: initializer element is not constant

/var/tmp/portage/ivtv-0.1.9-r3/work/ivtv/driver/ivtv-i2c.c:59: error: (near initialization for `ivtv_i2c_adapter_template.class')

make[2]: *** [/var/tmp/portage/ivtv-0.1.9-r3/work/ivtv/driver/ivtv-i2c.o] Error 1

make[1]: *** [_module_/var/tmp/portage/ivtv-0.1.9-r3/work/ivtv/driver] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.7-rc2'

make: *** [all] Error 2

!!! ERROR: media-tv/ivtv-0.1.9-r3 failed.

!!! Function src_compile, Line 41, Exitcode 2

!!! build of driver failed

As for kernel options and I2C, I have:

# I2C support

CONFIG_I2C=y

CONFIG_I2C_CHARDEV=m

# I2C Algorithms

CONFIG_I2C_ALGOBIT=y

# CONFIG_I2C_ALGOPCF is not set

# I2C Hardware Bus support

# CONFIG_I2C_ALI1535 is not set

# CONFIG_I2C_ALI1563 is not set

# CONFIG_I2C_ALI15X3 is not set

# CONFIG_I2C_AMD756 is not set

# CONFIG_I2C_AMD8111 is not set

# CONFIG_I2C_I801 is not set

# CONFIG_I2C_I810 is not set

CONFIG_I2C_ISA=m

# CONFIG_I2C_NFORCE2 is not set

# CONFIG_I2C_PARPORT_LIGHT is not set

# CONFIG_I2C_PIIX4 is not set

# CONFIG_I2C_PROSAVAGE is not set

# CONFIG_I2C_SAVAGE4 is not set

# CONFIG_I2C_SIS5595 is not set

# CONFIG_I2C_SIS630 is not set

# CONFIG_I2C_SIS96X is not set

CONFIG_I2C_VIA=y

CONFIG_I2C_VIAPRO=y

# CONFIG_I2C_VOODOO3 is not set

# CONFIG_I2C_SENSOR is not set

# Other I2C Chip support

# CONFIG_I2C_DEBUG_CORE is not set

# CONFIG_I2C_DEBUG_ALGO is not set

# CONFIG_I2C_DEBUG_BUS is not set

# CONFIG_I2C_DEBUG_CHIP is not set

CONFIG_FB_RADEON_I2C=y

Thanks in advance!

----------

## digitalb0y

I'm getting the smae  with the same kernel, walked trough many walk-throughs on this board, ivtv's site pvrforums, and have yet to fix issue.

Can any one help?

Is there an recomended Kernel to use gentoo-dev-sources , Vanilla?

I've seen people use 2.6.3 and 2.6.5  and others whats recomened

----------

## digitalb0y

Downgraded to 2.6.5-r1 dev gentoo sources

compiles now, Woohoo!   :Smile: 

Did'nt even need to patch it like the others.

----------

## blackstar

Actually, I went back to 2.6.6 and ivtv still compiles, but now that 2.6.7 proper is out, I'd like to update.

----------

## Paladine01

I can't get ivtv to work with 2.6.7 either.  I compiled it by just fixing the line (I think the new kernel headers just remove the ADAP).  When I modprobe for it, it immediately crashes.  It doesn't work right with the 2.6.7 kernel for some reason.  Hopefully someone with some knowledge of the driver will create a patch.

----------

## gcasillo

Yeah, same problem here. I just moved from 2.6.5-r1 to 2.6.7-r7. Kablooie! Back to 2.6.5-r1 I go.

----------

## cwall64

I had the same problem, there is a patch on bugs.gentoo.org #55084.

----------

## drescherjm

Being new to linux I have no clue how to use that patch. How does one use that? Do I download the source into my own directory and run the patch from there??

----------

## BarryMead

As the root user cd to the /root direcory

download the ivtv-0.1.9.tar.gz file from sourceforge at URL:

http://prdownloads.sourceforge.net/ivtv/ivtv-0.1.9.tar.gz?download

get the ivtv-0.1.9-r4.patch file from bug report 55084 (right click and save link as)

save it to the /root directory also

unzip the tar file:  tar -xzf ivtv-0.1.9.tar.gz

apply the patch:   patch -p0 <ivtv-0.1.9-r4.patch

change to the /root/ivtv/driver directory

cp Makefile2.6  Makefile

make

make install

cd ../utils

make

wget http://hauppauge.lightpath.net/software/pvr250/pvr250_17_21288.exe

Note:  on the line above the spaces between 250_17_21288 are really an underscores!

./ivtvfwextract.pl pvr250_17_21288.exe

cp ivtvfbctl ivtvplay mpegindex test_ioctl /usr/local/bin

edit a new file named ivtv in /etc/modules.d directory and add the following lines:

alias char-major-81 videodev

alias char-major-81-0 ivtv

alias char-major-61 lirc_i2c    #only if you use the infared cable provided with pvr-250/350

options ivtv ivtv-debut=0 mpg_buffers=90

optiions tuner type=2

options msp3400 once=1 simple=1 debug=0

add below ivtv msp3400 saa7115 tuner

add above ivtv lirc_dev lirc_i2c   #only if you use the infared cable provided with pvr-250/350

add the line:

ivtv

to the /etc/modules.autoload.d/kernel-2.6   file

modules-udate

go to the web page lirc.org and learn about downloading and setting up the lirc driver

Done!

----------

## cwall64

 *drescherjm wrote:*   

> Being new to linux I have no clue how to use that patch. How does one use that? Do I download the source into my own directory and run the patch from there??

 

The instruction in the bug are to:

1.  copy the patch into /usr/portage/distfiles/ivtv-0.1.9-r4.patch

2.  copy /usr/portage/media-tv/ivtv/ivtv-0.1.9-r3.ebuild to /usr/portage/media-tv/ivtv/ivtv-0.1.9-r4.ebuild and generate digests for this ebuild

3.  "ebuild /usr/portage/media-tv/ivtv/ivtv-0.1.9-r4.ebuild digest"

4.  "emerge ivtv"

All ran fine for me with this proceedure.

----------

## gcasillo

Can we bump ivtv-0.1.9 up to r4 with this?

----------

## drescherjm

Thanks for the info. In the mean time I downgraded to 2.6.4 and got everything running. However now I am experimenting with some new kernels and need the patch...

----------

## windexh8er

So what is the latest kernel I can use with IVTV right now?  And with that kernel should I emerge IVTV or compile from source?

----------

## gcasillo

ivtv-0.1.9-r4 is now in portage, and I have successfully installed it on four boxes running gentoo-dev-sources-2.6.7-r13. You can probably get it installed on a 2.6.8 kernel if I had to guess.

----------

