How to manage cross-platform binary package with conan? - opencv

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!

Related

mingw : Giving reference to opencv libraries in simpler way

Successfully installed opencv 4.5.4 in windows under mingw evironment. I was able to compile opencv applications. But is there any easy way to give reference to libraries instead of typing long list of opencv libraries (i.e. something like pkg-config in windows)
For a simple opencv program I need to give reference to 4 libraries.
g++ rotate.cpp -lopencv_core454 -lopencv_highgui454 -lopencv_imgproc454 -lopencv_imgcodecs454
instead do we have some option to give list of libraries through some flags in windows environment.
Thanks
You can actually use pkg-config in Windows. If you use MSYS2 shell is is usually available or it can be installed via pacman.

How to use Bazel to crate a wheel file for a package that build with cmake

I have a made a python package. The package is currently build using cmake. I want to prebuild this package on my laptop and create a .whl file, such that I can install it on other platform without worrying about building.
I know that bazel could do it. Can someone help me with an example or is there any other tools to prebuild a package that build with Cmake into wheel file?

How to generate .deb from catkin workspace in ROS

I can compile and install ROS package in the catkin workspace in ROS. How can I export the package in catkin workspace to a .deb file so I can install and use it on the other machines?
My ROS version is ROS Indigo and OS version is Ubuntu 14.04
Here is a step-by-step guide of doing it using ROS bloom:
Navigate to your package path
cd /path/to/package
Use ROS bloom to create the .deb file
bloom-generate rosdebian --os-name ubuntu --ros-distro kinetic fakeroot debian/rules binary
* If your ROS distribution is different from Kinetic, replace kinetic with your distribution
Copy the .deb file to the other machine, and in its folder type
sudo dpkg -i packagename.deb
this will install the package on that machine, and you are now able to use it like any other ROS package
1 - I think the ROS build farm would be a good starting point and solution for that. You cannot create a .deb as you said but, you can create a source closed ROS packages
The ROS build farm is also designed to enable deploying a custom build farm. This can be useful to release closed-source packages, build for platforms and architectures not provided by the official ROS build farm, and/or customize any part of the process to specific needs.
Take a look here for a better overview.
2 - Another approach would be using a CMake install. Although this will require the same architecture and ROS Distro between both your platforms and a location that can be the same for both machines.
Define a CMAKE_INSTALL_PREFIX for some location like: /opt/your_ros_install.
Run sudo make install to allow installing there.
Copy the install directory from machine A to machine B, using scp or tar or some other technique.
To run your installed ROS packages on either machine: source /opt/your_ros_install/setup.bash.
Take a look at this post: Generate .deb from ROS package
Use the following commands:
path-of-your-package$ bloom-generate rosdebian --os-name ubuntu --ros-distro kinetic
$fakeroot debian/rules binary

OpenCV on Yocto Linux

How do I install openCV on Yocto Project? I am trying to use Intel Atom Board for Image Processing Project. What's the alternative if openCV is not compatible, openCL? Please help!
Just add opencv in your image recipe or in your local.conf
`IMAGE_INSTALL += "opencv"`
openCV creates dynamic package names for each library so unfortunately
CORE_IMAGE_EXTRA_INSTALL += "opencv"
will not install any libraries. Instead install specific libraries, example below. Note that you still need to install opencv in case you build an SDK
CORE_IMAGE_EXTRA_INSTALL += "opencv libopencv-core libopencv-imgproc"

Linux Version of Z3: Dependency On Old libgmp.so.3

Z3's dependency on libgmp.so.3 is unresolved in the linux package, leaving the user to provide this library. However, this library is very old and is not readily available.
Does anyone know a method for getting around this issue? I am currently running x86_64 and cannot get around this missing dependency without a great deal of hassle.
Is it possible the linux packages could be fixed such they include the expected library in the distribution?
You can get GMP3 by executing sudo apt install libgmp3-dev.
I'm not a Linux expert, but this is the command I used to install GMP before I compiled Z3.
When I installed the virtual machine for running Linux 64, I think I didn't find a package for the more recent versions of GMP.
I will try again. If it doesn't work, I will download the most recent GMP tar ball and build it from scratch.
BTW, the Z3 for Linux 32 comes with two .so files. One of them has GMP statically linked.
The trick I used for building this .so file didn't work for the 64 bit version.
As I said, I'm not a Linux expert, any suggestions on how to build a better Z3 library for Linux x86_64 users are welcome.

Resources