Compilation of libv4l2_plugin_la-video.lo fails

*nix specific usage questions
andreas84
New Cone
New Cone
Posts: 5
Joined: 07 Oct 2011 10:35

Compilation of libv4l2_plugin_la-video.lo fails

Postby andreas84 » 07 Oct 2011 10:49

Hi everyone,

I'm trying to compile the VLC sources from the GIT repository, and the compilation fails each time with this error message:

Code: Select all

CC libv4l2_plugin_la-video.lo In file included from v4l2/video.c:40: v4l2/v4l2.h:33:3: warning: #warning Please update Video4Linux2 headers! v4l2/video.c:170: error: ‘V4L2_COLORFX_NEGATIVE’ undeclared here (not in a function) v4l2/video.c:171: error: ‘V4L2_COLORFX_EMBOSS’ undeclared here (not in a function) v4l2/video.c:171: error: ‘V4L2_COLORFX_SKETCH’ undeclared here (not in a function) v4l2/video.c:171: error: ‘V4L2_COLORFX_SKY_BLUE’ undeclared here (not in a function) v4l2/video.c:172: error: ‘V4L2_COLORFX_GRASS_GREEN’ undeclared here (not in a function) v4l2/video.c:172: error: ‘V4L2_COLORFX_SKIN_WHITEN’ undeclared here (not in a function) v4l2/video.c:172: error: ‘V4L2_COLORFX_VIVID’ undeclared here (not in a function) v4l2/video.c: In function ‘InitVideo’: v4l2/video.c:932: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 5 has type ‘v4l2_std_id’ v4l2/video.c:935: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 5 has type ‘v4l2_std_id’ make[5]: *** [libv4l2_plugin_la-video.lo] Error 1
The option --disable-libv4l2 does not prevent this. I edited the file modules/access/Modules.am and commented this line:

Code: Select all

libvlc_LTLIBRARIES += libv4l2_plugin.la
Shouldn't the disabling of libv4l2 prevent this ?

Thanks again for this great software !

Steps to reproduce the problem:
1) git pull (October 7, 2011)
2) ./configure --disable-xcb --disable-libgcrypt --disable-libv4l2
3) make

Workaround: in modules/access/Modules.am, comment the line

Code: Select all

libvlc_LTLIBRARIES += libv4l2_plugin.la
System information:
Ubuntu 10.04 x86_64
Kernel 2.6.35-25-generic
gcc 4.4.3
GNU Make 3.81

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby Rémi Denis-Courmont » 07 Oct 2011 10:58

--disable-libv4l2 disables libv4l2, not v4l2.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andreas84
New Cone
New Cone
Posts: 5
Joined: 07 Oct 2011 10:35

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby andreas84 » 07 Oct 2011 11:01

Hi Rémi,

Thanks for your answer. So is there another option I can use to prevent the error ?

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby Rémi Denis-Courmont » 07 Oct 2011 12:08

Update kernel headers to 2.6.32 or later, I suppose.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andreas84
New Cone
New Cone
Posts: 5
Joined: 07 Oct 2011 10:35

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby andreas84 » 07 Oct 2011 12:48

But I already do:

$: uname -r
2.6.35-25-generic

and the headers are installed.

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby Rémi Denis-Courmont » 07 Oct 2011 14:27

I wrote Linux kernel headers, not kernel image:

Code: Select all

dpkg -l linux-libc-dev
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andreas84
New Cone
New Cone
Posts: 5
Joined: 07 Oct 2011 10:35

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby andreas84 » 07 Oct 2011 14:38

Yes I know, the kernel image is 2.6.35-25 and the headers are installed as well:

$: apt-cache policy linux-headers-2.6.35-25

Code: Select all

linux-headers-2.6.35-25: Installed: 2.6.35-25.44~lucid1 Candidate: 2.6.35-25.44~lucid1 Version table: *** 2.6.35-25.44~lucid1 0 500 http://archive.ubuntu.com/ubuntu/ lucid-updates/main Packages 500 http://archive.ubuntu.com/ubuntu/ lucid-security/main Packages 100 /var/lib/dpkg/status

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby Rémi Denis-Courmont » 07 Oct 2011 15:12

Thing is, the missing definitions were added in Linux 2.6.32. And do note that, confusingly enough, linux-libc-dev and linux-headers are different packages. I guess the first one is used for userspace and the last one for external kernel modules.

Another solution would be to manually define the missing stuff in modules/access/v4l2/v4l2.h.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

andreas84
New Cone
New Cone
Posts: 5
Joined: 07 Oct 2011 10:35

Re: Compilation of libv4l2_plugin_la-video.lo fails

Postby andreas84 » 07 Oct 2011 17:47

Hi Rémi, my linux-libc-dev is also > 2.6.32, so I do not understand why it does not work.

Code: Select all

$: dpkg -l linux-libc-dev Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ ii linux-libc-dev 2.6.32-34.77 Linux Kernel Headers for development
I tried to write a patch to manually define the problematic values:

Code: Select all

--- v4l2.h.old 2011-10-07 21:50:27.634333170 +0800 +++ v4l2.h 2011-10-07 21:57:34.820791847 +0800 @@ -50,6 +50,27 @@ # define V4L2_CID_BG_COLOR (V4L2_CID_BASE+35) # define V4L2_CID_ROTATE (V4L2_CID_BASE+34) #endif +#ifndef V4L2_COLORFX_NEGATIVE +# define V4L2_COLORFX_NEGATIVE 3 +#endif +#ifndef V4L2_COLORFX_EMBOSS +# define V4L2_COLORFX_EMBOSS 4 +#endif +#ifndef V4L2_COLORFX_SKETCH +# define V4L2_COLORFX_SKETCH 5 +#endif +#ifndef V4L2_COLORFX_SKY_BLUE +# define V4L2_COLORFX_SKY_BLUE 6 +#endif +#ifndef V4L2_COLORFX_GRASS_GREEN +# define V4L2_COLORFX_GRASS_GREEN 7 +#endif +#ifndef V4L2_COLORFX_SKIN_WHITEN +# define V4L2_COLORFX_SKIN_WHITEN 8 +#endif +#ifndef V4L2_COLORFX_VIVID +# define V4L2_COLORFX_VIVID 9 +#endif #ifdef HAVE_LIBV4L2
And I tested it with my webcam by using:

Code: Select all

$: vlc v4l2:///dev/video0
It worked, but I do not know what other tests I can do. Is there some testing you want me to try ? And would you be interested if I submit the patch ?

Cheers

Andreas


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 17 guests