[libcamera-devel] [PATCH 0/5] Support loading IPAs from the build tree

Nicolas Dufresne nicolas at ndufresne.ca
Wed Feb 5 19:49:11 CET 2020


Le mercredi 05 février 2020 à 14:12 +0000, Kieran Bingham a écrit :
> Hi Nicolas,
> 
> On 05/02/2020 14:03, Nicolas Dufresne wrote:
> > 
> > Le mer. 5 févr. 2020 08 h 04, Kieran Bingham
> > <kieran.bingham at ideasonboard.com
> > <mailto:kieran.bingham at ideasonboard.com>> a écrit :
> > 
> >     When developing and testing libcamera, the usual development model is to
> >     compile and run one of the test or utility applications.
> > 
> > 
> > I like it. Be aware that it won't work for me. It only work if the build
> > path matches run path, which isn't the case when cross compiling and
> > exporting over NFS. Any suggestion ?
> 
> Interesting (and painful) point.
> 
> Ideally it would be a relative path, but the binary path
>  (/proc/self/exe) doesn't always have to stay relative to the library
> path ...
> 
> I wonder if I can get the library path at runtime... Time to dig into
> what else is in the _DYNAMIC table perhaps.
> 
> Otherwise, I'm certainly open to suggestions from the list here ;-)

Note that meanwhile I can just set the env really, I'm a bit use to that anyway.
GStreamer, GLib and Mesa (which are the kind of stuff I cross compile) all
requires few envs already.

> 
> --
> Kieran
> 
> 
> 
> >     IPA modules are loaded by the IPAManager, from a system path, or by
> >     parsing an
> >     environment variable.
> > 
> >     Provide the build path to the library through a temporary storage in the
> >     runpath of the ELF library strings table.  This entry is stripped at
> >     install
> >     time, but allows us to identify the location of the recently
> >     compiled IPA
> >     modules without the user having to manually declare paths to the
> >     build system.
> > 
> >     Previously to this series the IPA tests would only be able to be run
> >     from the
> >     root of the build tree, due to the hardcoded path relative to that
> >     point. Now
> >     that the IPAs can be found from their build location, we no longer
> >     need to
> >     provide this hardcoded path through the LIBCAMERA_IPA_MODULE_PATH
> >     for tests,
> >     and as a further consequence they can be run directly without
> >     requiring the
> >     launch to be run from the top level of the build tree.
> > 
> >     Kieran Bingham (5):
> >       libcamera: utils: Provide helper to get dynamic library runpath
> >       libcamera: ipa_manager: Split path handling
> >       libcamera: ipa_manager: Allow recursive parsing
> >       libcamera: ipa_manager: Search the runpath for IPA libraries
> >       tests: Remove IPA_MODULE_PATH environment variable
> > 
> >      src/libcamera/include/ipa_manager.h |   5 +-
> >      src/libcamera/include/utils.h       |   1 +
> >      src/libcamera/ipa_manager.cpp       | 111 ++++++++++++++++++++++------
> >      src/libcamera/meson.build           |   1 +
> >      src/libcamera/utils.cpp             |  26 +++++++
> >      src/meson.build                     |   7 ++
> >      test/libtest/test.cpp               |   4 -
> >      7 files changed, 126 insertions(+), 29 deletions(-)
> > 
> >     -- 
> >     2.20.1
> > 
> >     _______________________________________________
> >     libcamera-devel mailing list
> >     libcamera-devel at lists.libcamera.org
> >     <mailto:libcamera-devel at lists.libcamera.org>
> >     https://lists.libcamera.org/listinfo/libcamera-devel
> > 



More information about the libcamera-devel mailing list