Re: Compile error, undeclared V4L macro

7 views
Skip to first unread message

Ilya Kuznetsov

unread,
Nov 30, 2008, 12:06:18 PM11/30/08
to microdia
Oh, I am wrong in googling. I ought to search better, here already was
such question.

2008/11/30 worklez <wor...@gmail.com>:
> Hello,
> I was getting a compile error
> ...
> Now it compiles and works for me. Where am I wrong?

worklez

unread,
Nov 30, 2008, 11:53:46 AM11/30/08
to microdia
Hello,
I was getting a compile error
microdia-sysfs.c: In function ‘store_autoexposure’:
microdia-sysfs.c:733: error: ‘V4L2_EXPOSURE_AUTO’ undeclared (first
use in this function)
microdia-sysfs.c:733: error: (Each undeclared identifier is reported
only once
microdia-sysfs.c:733: error: for each function it appears in.)
microdia-sysfs.c:735: error: ‘V4L2_EXPOSURE_MANUAL’ undeclared (first
use in this function)

with today git-cloned microdia source and 2.6.23 linux kernel.
I discovered that there no such definitions in my linux/include/.
Then I created defs.h (and included it into microdia-dev.c, microdia-
sysfs.c, micron.c, omnivision.c).

defs.h:
#ifndef DEFS_H
#define DEFS_H

#define V4L2_CID_EXPOSURE_AUTO (V4L2_CID_CAMERA_CLASS_BASE+1)
enum v4l2_exposure_auto_type {
V4L2_EXPOSURE_AUTO = 0,
V4L2_EXPOSURE_MANUAL = 1,
V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
V4L2_EXPOSURE_APERTURE_PRIORITY = 3
};

#endif /* DEFS_H */
The contents are copypasted from google.

GWater

unread,
Dec 1, 2008, 3:31:56 AM12/1/08
to micr...@googlegroups.com
worklez schrieb:
> --~--~---------~--~----~------------~-------~--~----~
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia
> -~----------~----~----~----~------~----~------~--~---
>

You are right.

I thought I had fixed this but it seems I just did some blabla that
didn't fix anything.

I'll try to make a patch this evening.

GWater

signature.asc

GWater

unread,
Dec 1, 2008, 10:58:11 AM12/1/08
to micr...@googlegroups.com
worklez schrieb:
> --~--~---------~--~----~------------~-------~--~----~
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia
> -~----------~----~----~----~------~----~------~--~---
>

I pushed a commit that should finally fix the issue.

GWater

signature.asc

Malte

unread,
Jan 25, 2009, 4:54:20 AM1/25/09
to microdia
Good morning,
I still get the same error with a fresh git-clone an a 2.6.23.
(I need the 2.6.23 because of a realtime patch)

Thanks
Malte

GWater

unread,
Jan 25, 2009, 5:54:47 AM1/25/09
to micr...@googlegroups.com
Malte schrieb:
> --~--~---------~--~----~------------~-------~--~----~
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia
> -~----------~----~----~----~------~----~------~--~---
>

Please post the complete error output.

GWater

signature.asc

Malte

unread,
Jan 25, 2009, 6:02:13 AM1/25/09
to microdia
Hi
CC [M] /tmp/microdia/sn9c20x-sysfs.o
/tmp/microdia/sn9c20x-sysfs.c: In Funktion »store_autoexposure«:
/tmp/microdia/sn9c20x-sysfs.c:673: error: `V4L2_EXPOSURE_AUTO'
undeclared (first use in this function)
/tmp/microdia/sn9c20x-sysfs.c:673: error: (Each undeclared identifier
is reported only once
/tmp/microdia/sn9c20x-sysfs.c:673: error: for each function it appears
in.)
/tmp/microdia/sn9c20x-sysfs.c:675: error: `V4L2_EXPOSURE_MANUAL'
undeclared (first use in this function)


Malte

GWater

unread,
Jan 25, 2009, 6:10:47 AM1/25/09
to micr...@googlegroups.com
Malte schrieb:
> --~--~---------~--~----~------------~-------~--~----~
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia
> -~----------~----~----~----~------~----~------~--~---
>

The repo now contains a fixed version - just download it again and
compilation should work.

GWater

signature.asc

Malte

unread,
Jan 25, 2009, 8:00:34 AM1/25/09
to microdia
Hi,
well it compiles, but:

usb 1-6: new high speed USB device using ehci_hcd and address 4
usb 1-6: configuration #1 chosen from 1 choice
sn9c20x: Unknown symbol __ipipe_root_status_addr

I get this error message, and the module doesn't load.

Thanks
Malte

GWater

unread,
Jan 25, 2009, 8:27:13 AM1/25/09
to micr...@googlegroups.com
Malte schrieb:
> --~--~---------~--~----~------------~-------~--~----~
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia
> -~----------~----~----~----~------~----~------~--~---
>

You need to load videodev, too:
# modprobe videodev

GWater

signature.asc

Malte

unread,
Jan 25, 2009, 10:21:48 AM1/25/09
to microdia
Well,
the videodev is loaded:
lsmod:

video_buf 18436 0
lp 7492 0
capidrv 24948 0
isdn 79276 1 capidrv
capi 13248 0
capifs 3656 2 capi
parport 19072 1 lp
videodev 23872 0
v4l2_common 14400 1 videodev
v4l1_compat 11588 1 videodev
kernelcapi 32564 2 capidrv,capi

Malte

GWater

unread,
Jan 25, 2009, 12:35:39 PM1/25/09
to micr...@googlegroups.com
Malte schrieb:
> --~--~---------~--~----~------------~-------~--~----~
> Lets make microdia webcams plug'n play, (currently plug'n pray)
> To post to this group, send email to micr...@googlegroups.com
> Visit us online https://groups.google.com/group/microdia
> -~----------~----~----~----~------~----~------~--~---
>

The missing symbol is provided by:
kernel/ipipe/core.c

I assume you compiled your kernel yourself (with realtime patches,
etc.). Maybe this file got lost somehow.

GWater

signature.asc

Malte

unread,
Jan 26, 2009, 1:15:43 PM1/26/09
to microdia
Hi,
it works..
Because of a fault the gcc-3.3 compiler was the default gcc.

Greetings
Malte
Reply all
Reply to author
Forward
0 new messages