Dronecode / camera-manager

Camera Manager for interfacing cameras with the Dronecode platform
https://camera-manager.dronecode.org/en/
Apache License 2.0
63 stars 51 forks source link

DCM won't build from Yocto recipe #196

Open dmillard-TD opened 5 years ago

dmillard-TD commented 5 years ago

I'm having an issue with building Dronecode camera manager, maybe someone here will know how to help. I've built it natively in the past on nVidia TX1 and never had any problems. Lately, I'm trying to build it for another platform inside a Yocto build. I've created a suitable yocto recipe, and during the compile phase, it gets this error:

`In file included from ../git/plugins/V4l2Camera/CameraDeviceV4l2.cpp:22:0: ../git/plugins/V4l2Camera/CameraDeviceV4l2.h:22:26: fatal error: CameraDevice.h: No such file or directory

include "CameraDevice.h"

                      ^

compilation terminated.`

I'm using the same procedure I used to build it natively on the TX1, but the Yocto build is a cross-compile operation. For some reason, it doesn't know where to find CameraDevice.h when building the plugins. Is there some parameter I can pass in while running configure that might give it a hint? I'd be happy to supply my Yocto recipe if that would help.

dmillard-TD commented 5 years ago

As near as I can tell, this error might be caused by the fact that Yocto sets the build directory outside of the source directory, and uses autotools to generate the Makefile in that build directory. I suspect the plugins are not configured correctly during autotools configure to find the header files in this case.

dmillard-TD commented 5 years ago

I solved it. Looks like the camera manager build is broken when the build files are put in a separate directory from the source. For this case, Yocto has a special build class called "inherit autotools-brokensep" for builds that are broken when source and build are separate.

This looks like a legitimate issue for the camera manager autobuild process. It should either be fixed, or converted to cmake.