×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

Compile error from the last github src

  • Posts: 95
  • Thank you received: 14
Hi Eric...

I will post it when I get home tonight...

Phil
7 years 2 months ago #13503

Please Log in or Create an account to join the conversation.

  • Posts: 150
  • Thank you received: 15
hi,

i just tryed to compile after an update from git repository on my raspbian. I've always the error compilation on v4l2_base.cpp.
[ 11%] Building CXX object CMakeFiles/indidriver.dir/libs/webcam/v4l2_base.cpp.o
In file included from /home/pi/Projects/indi/libindi/libs/webcam/v4l2_base.cpp:41:0:
/home/pi/Projects/indi/libindi/libs/webcam/v4l2_base.h: In member function ‘bool V4L2_Base::is_compressed() const’:
/home/pi/Projects/indi/libindi/libs/webcam/v4l2_base.h:174:51: error: ‘const struct v4l2_pix_format’ has no member named ‘flags’
   bool is_compressed() const { return fmt.fmt.pix.flags & V4L2_FMT_FLAG_COMPRESSED; };
                                                   ^
CMakeFiles/indidriver.dir/build.make:606: recipe for target 'CMakeFiles/indidriver.dir/libs/webcam/v4l2_base.cpp.o' failed
make[2]: *** [CMakeFiles/indidriver.dir/libs/webcam/v4l2_base.cpp.o] Error 1
CMakeFiles/Makefile2:1851: recipe for target 'CMakeFiles/indidriver.dir/all' failed
make[1]: *** [CMakeFiles/indidriver.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

Thank you for a quick fix.

good sky
Christian
Last edit: 7 years 2 months ago by Picard.
7 years 2 months ago #13513

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 14

If you mean version.h in /usr/include/linux :
#define LINUX_VERSION_CODE 200711
#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))

or,

apt-cache show linux-headers-3.6-trunk-rpi
Package: linux-headers-3.6-trunk-rpi
Source: linux-3.6
Version: 3.6.9-1~experimental.1+rpi7
Architecture: armhf
Maintainer: Debian Kernel Team <debian-kernel@lists.debian.org>
Installed-Size: 4844
Depends: linux-headers-3.6-trunk-common (= 3.6.9-1~experimental.1+rpi7), linux-k              build-3.6, gcc-4.6
Provides: linux-headers
Last edit: 7 years 2 months ago by Phil Shepherd.
7 years 2 months ago #13515

Please Log in or Create an account to join the conversation.

I fixed it in GIT, but ended up disabling a couple of functions under Raspbian. Please update and test.
7 years 2 months ago #13531

Please Log in or Create an account to join the conversation.

  • Posts: 472
  • Thank you received: 165
3.6 kernel is quite old, my Raspberry is running 4.4.38 and does have those flags defined in /usr/include/linux/videodev2.h. Have you run rpi-update lately?
7 years 2 months ago #13533

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 14
I will check when I get home... I certainly have done an update on 1 of the 3 SD cards I am using... :blush:

As you say, the current Kernel version is 4.4 so I am not sure what happened... I only obtained the Pi 3 weeks ago... & all the software was downloaded after that...

Phil
7 years 2 months ago #13535

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
I pushed #138 , which should fix the compile issues as far as kernel 3.6.
However, given the amount of changes and fixes in the V4L2 kernel impementation since then, I'd strongly recommend upgrading your kernels to 4.x.
Although this is only typedef management, I wasn't able to live test the changes, 93% humidity in Rennes ;)
So please feedback as much as possible!
-Eric
The following user(s) said Thank You: Jasem Mutlaq
7 years 2 months ago #13548

Please Log in or Create an account to join the conversation.

  • Posts: 150
  • Thank you received: 15
Hi,

since the last update, i compile all on my rpi3 and my desktop.

Thank you for your quick fix.

Have a good night.

Christian
7 years 2 months ago #13552

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 14
As pointed out by jpaana, my kernel headers are old....

The kernel I am running is 4.4.38-v7+... I looked elsewhere & found out that the headers are not always available for the version running on Pi ???

so, I will obtain them for this kernel, but thanks for sorting the current issue.... the real fix I suppose is to get the up-to-date linux headers.... Other Linux distros have always done this.... now I know for Raspbian...

Phil

p.s.
I can also confirm that the fix now allows indi compile using 3.6 linux headers... Nice 1.

p.p.s.
FYI... If I did
apt-get install linux-headers

This is returned :
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package linux-headers is a virtual package provided by:
  raspberrypi-kernel-headers 1.20161215-1
  linux-headers-3.6-trunk-rpi 3.6.9-1~experimental.1+rpi7
  linux-headers-3.10-3-rpi 3.10.11-1+rpi7
You should explicitly select one to install.
Last edit: 7 years 2 months ago by Phil Shepherd.
7 years 2 months ago #13553

Please Log in or Create an account to join the conversation.

  • Posts: 1029
  • Thank you received: 301
A quick search showed that the package may indeed be "raspberrypi-kernel-headers", but I'm no expert there.

In any case, this package is generated from the kernel sources themselves: if you installed the kernel sources for your current kernel (I don't know if raspbian builds its own kernel or provides it as a binary), you should have symlink "/usr/src/linux" pointing at the current kernel sources. In that folder, you can issue "make headers_install" as root, and generate sanitized headers in "/usr/src/linux/usr/include". Those headers are the ones to be put in "/usr/include/linux". You can either bind-mount that folder over "/usr/include/linux" or overwrite the files.

Or you can find the correct package with the expected version :)
-Eric
Last edit: 7 years 2 months ago by Eric.
7 years 2 months ago #13557

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 14
Hi Eric..

Just checked... (I'm no expert at this either...) raspberrypi-kernel-headers indeed pulls down linux-headers-4.4.38-v7+

- genius... :woohoo:

I will try to get all cleaned up & report back....

Phil
7 years 2 months ago #13558

Please Log in or Create an account to join the conversation.

  • Posts: 95
  • Thank you received: 14
Eric,
I completed the install of the latest kernel headers (raspberrypi-kernel-headers) & build of the /usr/include as you indicated..... my older indi src copy successfully built...

Thank you for your help B)

Phil
The following user(s) said Thank You: Eric
7 years 2 months ago #13563

Please Log in or Create an account to join the conversation.

Time to create page: 0.884 seconds