Using RPM to customize an installed Yocto SDK - sdk

Is it possible to install a .rpm package into an SDK target sysroot after the SDK has been installed?
The 2.0 Yocto Project Application's Developer Guide Chapter 4 seems to indicate that this can be done, and even provides an example if using opkg for package management. I can't figure out how to customize my target sysroot when using RPM package management.

rpm -i --root /different/sysroot/ some-package.rpm
or even better
dnf install --installroot=/different/sysroot/ some-package.rpm

Related

What is the proper way of adding a local dependency (openCV) in Meson?

I am using OpenCV in one of my projects. Until now, I was using version 3 under Ubuntu 18.04, so in my meson.build I had:
... dependencies: [dependency('opencv')])
Now, I've compiled OpenCV 4 from source and installed to the default dir, /usr/local/, and changed my meson.build to:
... dependencies: [dependency('opencv4')])
Resulting in a not found error (despite this works with Ubuntu 20.04 and the package from the official repos, which is version 4.2). How should I specify the library's location so Meson can find it?
I've seen find_library, but that's deprecated according the docs.
The dependency function is using pkg-config or cmake if pkg-config fails, to find external dependency (installed library).
When you install OpenCV4, please check if there is pkg-config for opencv4. Here is my command:
pkg-config --list-all | grep "opencv4"
and output:
opencv4 OpenCV - Open Source Computer Vision Library
Also, check PKG_CONFIG_PATH environment variable. pkg-config will use that path to search for .pc files.
Edit:
be sure to use -D OPENCV_GENERATE_PKGCONFIG=YES when building opencv with cmake.

How to manage cross-platform binary package with conan?

I'm trying to develop a conan package for OpenCV pre-built binaries according to our specs. I need these to be available for Windows and Linux but am at a loss on best practices to structure the conan file.
How should I package both binaries? Should I instead create a package for each OS?
Packing OpenCV is not an easy task, there is an official recipe available and provided by Conan Community here
To install OpenCV:
conan install -r conan-center opencv/4.1.0#conan/stable
There are more versions available, you can list those version by:
conan search -r conan-center opencv
Also, there is a good blog post about OpenCV + Conan here
How should I package both binaries? Should I instead create a package for each OS?
Each recipe should be able to distribute the same project for ANY platform. You can create multiple methods, one per OS. For example, some projects are distributed with CMake and autotools, where CMake only works on Windows. Take a look in OpenCV Conan recipe, you can learn a lot.
If you are interested in packages where you need to download an installer, so mingw Conan recipe is a good example.
Regards!

Install libraries into MSYS2 from source

I have installed MSYS2 along with mingw64 on windows.
How do I install an application or library (in this case OpenCV) from the source code into mingw64 in the same way as pacman does, ideally using the CMAKE-GUI (due to a number of options to set)?
I have tried using
Use CMake-Gui to generate a mingw-makefile, with an additional DCMAKE_INSTALL_PREFIX:PATH entry.
Running mingw64 make installed
The code compiles fine but then installing into the CMAKe build directory4
MSYS pkg-manager can not see the library (opencv)
pacman for MSYS2 is an MSYS2 port of the ArchLinux package manager,
pacman.
To make an application or library installable "in the same way as pacman",
and so that pacman can see it, you need to make a pacman package
of it: here is the documentation

Use Android Studio 2.2 CMake support with command line SDK

We recently decided to use Android Studio's CMake support as a part of our development, and as far as compiling and building is concerned everything works fine for the development team.
As a part of our validation efforts we are also running Jenkins for continuous testing, and that's where the problems are starting. The machine running Jenkins does not have Android Studio installed, nor it has an UI. As such it only possesses the android NDK and SDK. However, when running tests, the following error occurs :
Failed to find CMake.
Install from Android Studio under File/Settings/Appearance & Behavior/System Settings/Android SDK/SDK Tools/CMake.
Expected CMake executable at /home/vagrant/android-sdk-linux/cmake/bin/cmake.
The problem now is that there is no way to install CMake like suggested ! The machine does not have any UI to run Android Studio, and the command line tools feature no option to install CMake. And creating sym-links isn't the solution either, as CMake isn't the only thing it's looking for.
How am I supposed to make my project work on the machine ? CMake is running perfectly (as it was already used as part of the tests) so the problem is only coming from Gradle looking only in the SDK directory for it...
The problem now is that there is no way to install CMake like suggested
Actually it is not! Instead of using android list sdk command for installing sdk packages you should use new command line tool: sdk-manager.
Ndk, cmake are available for installing through this new android sdk tool.
you need to install manually cmake on your system unix:
go to your android sdk directory ${ANDROID_HOME} and create new cmake folder with:
wget "https://dl.google.com/android/repository/cmake-3.6.3155560-linux-x86_64.zip"
unzip -q cmake-3.6.3155560-linux-x86_64.zip -d ${ANDROID_HOME}/cmake
add to PATH ENV ${PATH}:${ANDROID_HOME}/cmake/bin

Compiling OpenCV-contrib for IOS (especially the SFM-Module)

I've tried to install openCV_contrib for IOS, therefore I execute
python opencv/platforms/ios/build_framework.py "framework_dest"
on my Mac (I need Xcode for compiling openCV for IOS) but all the times, i got the message:
-- Checking SFM deps... FALSE
-- Module opencv_sfm disabled because the following dependencies are not found: Glog/Gflags
I need the SFM module, hence I tried installing Glog and Gflags at several ways: using
brew install glog gflags
and brew outputs, that those packages are successfully installed respective already installed.
Later I tried to compile both from GitHub on my own, but with no success, I'm still not able to compile SFM for IOS.
On Linux I could compile openCV including the SFM module, but I can't compile it for IOS, because Xcode is not available for Linux.
I don't know, what to do! Do some of you know how to install glog/gflags on Mac or do you know how to build the IOS-Framework of OpenCV on Linux or maybe how to build the IOS-Framework on my Mac using the binaries created with cmake .. && make in my Linux (because there SFM is compiled)?
There have to be some solution, because Mac is based on Linux, so if it works on Linux, why doesn't it work on my Mac?!
Thanks!

Resources