[SOLVED] Can not compile dvb drivers on kernel 2.6.32-358.0.1.el6.x86_64

General support questions
Post Reply
moucina
Posts: 26
Joined: 2011/02/14 23:00:48

[SOLVED] Can not compile dvb drivers on kernel 2.6.32-358.0.1.el6.x86_64

Post by moucina » 2013/03/11 02:16:06

Hello Guys,

Looking for a bit of guidance . I have just upgraded to Centos 6.4 on my MythTV machine, and now find my self unable to compile dvb drivers for my tuner cards . Everything worked perfectly under kernel-2.6.32-279.22.1.el6.x86_64 . Now I am using the same source files for the dvb drivers and getting this :

Created default (all yes) .config file
./scripts/make_myconfig.pl
make[1]: Leaving directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l'
make[1]: Entering directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l'
perl scripts/make_config_compat.pl /lib/modules/2.6.32-358.0.1.el6.x86_64/source ./.myconfig ./config-compat.h
creating symbolic links...
make -C firmware prep
make[2]: Entering directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l/firmware'
make[2]: Leaving directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l/firmware'
make -C firmware
make[2]: Entering directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l/firmware'
CC ihex2fw
Generating vicam/firmware.fw
Generating dabusb/firmware.fw
Generating dabusb/bitstream.bin
Generating ttusb-budget/dspbootcode.bin
Generating cpia2/stv0672_vp4.bin
Generating av7110/bootcode.bin
make[2]: Leaving directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l/firmware'
Kernel build directory is /lib/modules/2.6.32-358.0.1.el6.x86_64/build
make -C /lib/modules/2.6.32-358.0.1.el6.x86_64/build SUBDIRS=/usr/src/tbsdrivers/linux-tbs-drivers/v4l modules
make[2]: Entering directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64'
CC [M] /usr/src/tbsdrivers/linux-tbs-drivers/v4l/au0828-core.o
In file included from :0:
/usr/src/tbsdrivers/linux-tbs-drivers/v4l/compat.h:26: error: conflicting types for 'find_next_zero_bit'
include/linux/bitops.h:232: note: previous declaration of 'find_next_zero_bit' was here
/usr/src/tbsdrivers/linux-tbs-drivers/v4l/compat.h:32: error: conflicting types for 'find_next_bit'
include/linux/bitops.h:222: note: previous declaration of 'find_next_bit' was here
make[3]: *** [/usr/src/tbsdrivers/linux-tbs-drivers/v4l/au0828-core.o] Error 1
make[2]: *** [_module_/usr/src/tbsdrivers/linux-tbs-drivers/v4l] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l'
make: *** [all] Error 2


Has there been changes to the kernel that are so significant to prevent dvb source from compiling ? Have they removed major functionality out ? Any information on a solution/workaround greatly welcomed .

Best Regards

Milorad

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

[SOLVED] Can not compile dvb drivers on kernel 2.6.32-358.0.

Post by AlanBartlett » 2013/03/11 03:13:34

[quote]
make -C /lib/modules/2.6.32-358.0.1.el6.x86_64/build SUBDIRS=/usr/src/tbsdrivers/linux-tbs-drivers/v4l modules
make[2]: Entering directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64'
CC [M] /usr/src/tbsdrivers/linux-tbs-drivers/v4l/au0828-core.o
In file included from :0:
/usr/src/tbsdrivers/linux-tbs-drivers/v4l/compat.h:26: error: conflicting types for 'find_next_zero_bit'
include/linux/bitops.h:232: note: previous declaration of 'find_next_zero_bit' was here
/usr/src/tbsdrivers/linux-tbs-drivers/v4l/compat.h:32: error: conflicting types for 'find_next_bit'
include/linux/bitops.h:222: note: previous declaration of 'find_next_bit' was here
make[3]: *** [/usr/src/tbsdrivers/linux-tbs-drivers/v4l/au0828-core.o] Error 1
make[2]: *** [_module_/usr/src/tbsdrivers/linux-tbs-drivers/v4l] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.32-358.0.1.el6.x86_64'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/usr/src/tbsdrivers/linux-tbs-drivers/v4l'
make: *** [all] Error 2
[/quote]
Let us focus on the above block of output, in particular lines 5, 6, 7 & 8. You have two errors, lines 5 & 6 show the first, lines 7 & 8 show the second.

What has happened is that [b]Red Hat[/b] has now back-ported more 'advanced' code into its own kernels. So you are witnessing the conflict of having two declarations, in two separate places, for two parameters.

To resolve those errors you will need to edit the [b]/usr/src/tbsdrivers/linux-tbs-drivers/v4l/compat.h[/b] file and:

(1) comment out the declaration for 'find_next_zero_bit' which begins at line 26
(2) comment out the declaration for 'find_next_bit' which begins at line 32

Get that right and the compile [i]should[/i] be successful.

If you still have problems which prove to be insurmountable, then please consider using the [url=http://elrepo.org/tiki/kernel-lt]kernel-lt[/url] package from the [url=http://elrepo.org]ELRepo Project[/url].

moucina
Posts: 26
Joined: 2011/02/14 23:00:48

Re: Can not compile dvb drivers on kernel 2.6.32-358.0.1.el6.x86_64

Post by moucina » 2013/03/11 05:24:17

Thanks Alan,

After commenting those lines out , everything compiled correctly . Testing the drivers now , they seem to be working well . Much thanks for your help .

Best Regards

Milorad

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: Can not compile dvb drivers on kernel 2.6.32-358.0.1.el6.x86_64

Post by AlanBartlett » 2013/03/11 05:28:06

You are welcome. Please let us know the outcome when you have finished testing and we can then mark this thread, as appropriate.

moucina
Posts: 26
Joined: 2011/02/14 23:00:48

Re: Can not compile dvb drivers on kernel 2.6.32-358.0.1.el6.x86_64

Post by moucina » 2013/03/17 04:52:50

Hello Alan,

Definitely solved , drivers working ok , just implemented the drivers on the latest kernel 2.6.32-358.2.1 and all good . Here is my patch :

[code]
root@htpc /home/mythtv # cat /usr/src/tbs_patches/compat_patch
--- /usr/src/tbsdrivers/linux-tbs-drivers/v4l/compat.h 2011-08-23 04:05:17.000000000 +1000
+++ /home/mythtv/Downloads/compat.h 2013-03-11 16:06:21.002076702 +1100
@@ -23,17 +23,17 @@

#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
#include <asm/bitops.h>
-static inline unsigned long find_next_zero_bit_le(const void *addr,
- unsigned long size, unsigned long offset)
-{
- return find_next_zero_bit(addr, size, offset);
-}
-
-static inline unsigned long find_next_bit_le(const void *addr,
- unsigned long size, unsigned long offset)
-{
- return find_next_bit(addr, size, offset);
-}
+/* static inline unsigned long find_next_zero_bit_le(const void *addr,
+* unsigned long size, unsigned long offset)
+* {
+* return find_next_zero_bit(addr, size, offset);
+* }
+*
+* static inline unsigned long find_next_bit_le(const void *addr,
+* unsigned long size, unsigned long offset)
+* {
+* return find_next_bit(addr, size, offset);
+* } */
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 34)
[/code]

[Moderator edit: code tag added for readability]

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

Re: [SOLVED] Can not compile dvb drivers on kernel 2.6.32-358.0.1.el6.x86_64

Post by AlanBartlett » 2013/03/17 16:58:59

Thank you for reporting back with the good news.

Quickly looking through your patch, I see it is just perfect. :-)

For posterity and on your behalf, this thread is now marked [SOLVED].

Post Reply