Bug 156028

Summary: Missing symbol V4L2_PIX_FMT_RGB444 leads to compilation error
Product: kopete Reporter: Sabourin Gilles <sabourin.gilles>
Component: generalAssignee: Kopete Developers <kopete-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: ifdef the missing V4L2_PIX_FMT_RGB444 if it's not defined.

Description Sabourin Gilles 2008-01-17 19:52:26 UTC
Version:           kopete svn #762710 (using KDE 3.5.8)
Installed from:    SuSE RPMs
Compiler:          gcc version 4.1.2 20061115 (prerelease) (SUSE Linux) 
OS:                Linux

From svn #762710, videodevice.cpp does not compile on openSUSE 10.2, because of V4L2_PIX_FMT_RGB444 missing symbol. Similar problem has been encountered in videolan team about vlc developments : V4L2_PIX_FMT_RGB444 symbol is only defined with latest kernels. As I am still working on openSUSE 10.2 with 2.6.18 kernel, kopete's code evolution does not work with older distro.

I haven't encountered this problem on openSUSE 10.3 (kernel 2.6.22).

videodevice.cpp:1866: warning: comparison between signed and unsigned integer expressions
videodevice.cpp: In member function 'Kopete::AV::pixel_format Kopete::AV::VideoDevice::pixelFormatForPalette(int)':
videodevice.cpp:1888: error: 'V4L2_PIX_FMT_RGB444' was not declared in this scope
videodevice.cpp: In member function 'int Kopete::AV::VideoDevice::pixelFormatCode(Kopete::AV::pixel_format)':
videodevice.cpp:1964: error: 'V4L2_PIX_FMT_RGB444' was not declared in this scope
videodevice.cpp: In member function 'QString Kopete::AV::VideoDevice::pixelFormatName(int)':
videodevice.cpp:2166: error: 'V4L2_PIX_FMT_RGB444' was not declared in this scope
make[4]: *** [videodevice.lo] Erreur 1
make[4]: quittant le répertoire « /home/gilles/kdenetwork/kopete/libkopete/avdevice »
make[3]: *** [all-recursive] Erreur 1
make[3]: quittant le répertoire « /home/gilles/kdenetwork/kopete/libkopete »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /home/gilles/kdenetwork/kopete »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/gilles/kdenetwork »
make: *** [all] Erreur 2
Comment 1 Charles Connell 2008-01-17 20:11:28 UTC
I can confirm this problem. Solution is to upgrade your kernel headers.
Comment 2 Sabourin Gilles 2008-01-17 20:38:51 UTC
Then this is not a solution : kernel headers, source and binary have to be upgraded at the same time to keep them consistent.

You set it in RESOLVED INVALID state because you don't want to handle both old crafted code and new one in kopete's source with an ugly hack.
Comment 3 Charles Connell 2008-01-17 20:47:10 UTC
That is correct. I myself had to upgrade to SUSE 10.3 in order to continue developing. Any distro containing KDE 4 will have a new enough kernel, and if it doesn't, then that's their fault. It is not our responsibility to support old kernels when we could make use of good features in newer ones. We're trying to move forward here.
Comment 4 Sabourin Gilles 2008-01-17 21:17:00 UTC
As a software engineer myself, I totally agree with you: retro compatibility is very costly.
Comment 5 Charles Connell 2008-01-17 21:19:49 UTC
So to be more technically correct I will say: Solution is to upgrade your kernel and all related paraphernalia.
Comment 6 Cláudio da Silveira Pinheiro 2008-01-23 04:56:18 UTC
In fact if it wasn't for gspca suporting a bazzillion of webcameras, I would simply remove the already deprecated V4L code and stick with V4L2 (I'm the Kopete video device developer). Mr. Xhaard of gspca's fame, although a hero for a lot of users, is a Freddy Krueger -type vilain for developers, as its gspca driver is V4L-only, and it's a nightmare to develop and maintain two backends for such distinct interfaces using the same devices and having to maintain an already-years-ago-deprecated API because there are too many users to ignore, and Mr. Xhaard is simply unwilling or even unable (based on his coding style) to impelement a saner, newer API in his drivers.
Comment 7 Andreas Amann 2008-02-12 11:55:31 UTC
Please reopen this bug for the 3.5 branch, since it is a clear regression and breaks compilation for many people!

The solution "upgrade your kernel and all related paraphernalia" is not a valid one for people, like me, who just want to do a minor upgrade of their 3.5 installation and appreciate the stability of the kde-3.5 branch. For them it simply breaks compilation of kdenetwork, which should not happen in a minor upgrade. 

Especially for people who want to follow the mature 3.5 branch, there can be a number of good reasons for not upgrading the kernel (which in many cases is not regression free).  In my case, I do not even have root access at work, so upgrading the kernel is not an option for me. Even without root, installing kde-3.5 has never been a problem in the past.

Comment 8 Ryan Nickell 2008-02-13 19:51:37 UTC
Created attachment 23562 [details]
ifdef the missing V4L2_PIX_FMT_RGB444 if it's not defined.

Older versions of V4L2 do not have V4L2_PIX_FMT_RGB444 defined.  Specifically
this is encountered on OpenSUSE 10.2.  This ifdef in 3 places allows
compilation to complete successfully for kdenetwork.  This patch is against
TRUNK, so it may need applied in the appropriate place for the 3.5.x branch.