pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [Linux] graphics/libv4l compilation error
Hi,
the error message says it is looking for "linux/videodev.h", while the
Makefile created just "videodev.h" (if not provided by the base system).
Can you try with the attached patch? This adds just the missing "linux/"
directory component.
Matthias
On Mon, Jul 13, 2015 at 08:22:10PM +0530, Mayuresh wrote:
> On Mon, Jul 13, 2015 at 08:02:30PM +0530, Mayuresh wrote:
> > log.c:28:28: fatal error: linux/videodev.h: No such file or directory
> > #include <linux/videodev.h>
>
> A web page suggests hacking this file by creating a soft link, such as this link
> http://askubuntu.com/questions/203630/easy-install-pygame-not-working-due-to-linux-videodev-h-no-such-file-or-direct
>
> Isn't that quite unclean?
>
> Anyway, that leads to host of other errors:
>
> log.c:66:6: error: 'VIDIOCKEY' undeclared here (not in a function)
> [_IOC_NR(VIDIOCKEY)] = "VIDIOCKEY",
> ^
> log.c:66:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCKEY)] = "VIDIOCKEY",
> ^
> log.c:66:2: error: (near initialization for 'v4l1_ioctls')
> log.c:74:6: error: 'VIDIOCGUNIT' undeclared here (not in a function)
> [_IOC_NR(VIDIOCGUNIT)] = "VIDIOCGUNIT",
> ^
> log.c:74:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCGUNIT)] = "VIDIOCGUNIT",
> ^
> log.c:74:2: error: (near initialization for 'v4l1_ioctls')
> log.c:75:6: error: 'VIDIOCGCAPTURE' undeclared here (not in a function)
> [_IOC_NR(VIDIOCGCAPTURE)] = "VIDIOCGCAPTURE",
> ^
> log.c:75:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCGCAPTURE)] = "VIDIOCGCAPTURE",
> ^
> log.c:75:2: error: (near initialization for 'v4l1_ioctls')
> log.c:76:6: error: 'VIDIOCSCAPTURE' undeclared here (not in a function)
> [_IOC_NR(VIDIOCSCAPTURE)] = "VIDIOCSCAPTURE",
> ^
> log.c:76:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCSCAPTURE)] = "VIDIOCSCAPTURE",
> ^
> log.c:76:2: error: (near initialization for 'v4l1_ioctls')
> log.c:77:6: error: 'VIDIOCSPLAYMODE' undeclared here (not in a function)
> [_IOC_NR(VIDIOCSPLAYMODE)] = "VIDIOCSPLAYMODE",
> ^
> log.c:77:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCSPLAYMODE)] = "VIDIOCSPLAYMODE",
> ^
> log.c:77:2: error: (near initialization for 'v4l1_ioctls')
> log.c:78:6: error: 'VIDIOCSWRITEMODE' undeclared here (not in a function)
> [_IOC_NR(VIDIOCSWRITEMODE)] = "VIDIOCSWRITEMODE",
> ^
> log.c:78:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCSWRITEMODE)] = "VIDIOCSWRITEMODE",
> ^
> log.c:78:2: error: (near initialization for 'v4l1_ioctls')
> log.c:79:6: error: 'VIDIOCGPLAYINFO' undeclared here (not in a function)
> [_IOC_NR(VIDIOCGPLAYINFO)] = "VIDIOCGPLAYINFO",
> ^
> log.c:79:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCGPLAYINFO)] = "VIDIOCGPLAYINFO",
> ^
> log.c:79:2: error: (near initialization for 'v4l1_ioctls')
> log.c:80:6: error: 'VIDIOCSMICROCODE' undeclared here (not in a function)
> [_IOC_NR(VIDIOCSMICROCODE)] = "VIDIOCSMICROCODE",
> ^
> log.c:80:2: error: array index in initializer not of integer type
> [_IOC_NR(VIDIOCSMICROCODE)] = "VIDIOCSMICROCODE",
> ^
> log.c:80:2: error: (near initialization for 'v4l1_ioctls')
> make[1]: *** [log.o] Error 1
> make: *** [all] Error 2
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/graphics/libv4l/Makefile,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile
--- Makefile 17 Mar 2015 13:55:40 -0000 1.10
+++ Makefile 13 Jul 2015 15:16:02 -0000
@@ -29,8 +29,8 @@ post-install:
${INSTALL_DATA} ${FILESDIR}/videoio.h ${DESTDIR}${PREFIX}/include/sys
.elif !exists(/usr/include/linux/videodev.h)
pre-configure:
- ${MKDIR} ${BUILDLINK_DIR}/include
- cp ${FILESDIR}/videodev.h ${BUILDLINK_DIR}/include/videodev.h
+ ${MKDIR} ${BUILDLINK_DIR}/include/linux
+ cp ${FILESDIR}/videodev.h ${BUILDLINK_DIR}/include/linux/videodev.h
.endif
PLIST_VARS= needs_videoio
Home |
Main Index |
Thread Index |
Old Index