OpenCV Packages Difference

Hi, I searched for OpenCV on Yast and found 3 similar packages: libopencv2_4, opencv and opencv-devel. libopencv and opencv-devel first line of decription i the same (“Development files for using the OpenCV library”), but opencv-devel description says that it contains library and headers.
What is the difference between the three packages?

For many apps,

There is the main app
**
There can be a
library package**, often with “lib” somewhere in the name. A separate library package might exist for several reasons, permitting more easily managed updates, portability between systems, allowing use by other apps, more. These are usually already compiled applets compared to the source which is uncompiled.

There can be a “dev” or “devel” package for the app which is the source for the app. If the app needs to be modified at a low level which might involve re-compiling or various other reasons, this package is needed (plus likely the compile tools).

It’s impossible to state that only the main app or the library or source packages need to be installed for any app, but because of the nature of OpenCV, it’s likely that you need to install all three types, plus compile tools (The OpenCV website lists the required compile tools).

Possibly the more practical advice is that unless you’re a Developer, you only need to be concerned with the main app and whether to install the source (devel package). The main app will likely add the lib package automatically.

HTH,
TSU

No, that’s wrong.
The source is in the xxx.src.rpm.
The -devel package contains include files and linker libraries (and documentation sometimes) that you need when you want to compile some other application that uses this library.

It’s impossible to state that only the main app or the library or source packages need to be installed for any app, but because of the nature of OpenCV, it’s likely that you need to install all three types, plus compile tools (The OpenCV website lists the required compile tools).

Normally, only the libXXX package should be necessary.
Actually it should be installed automatically anyway if you install a package that needs it… :wink:

All true, but I don’t know that the raw source is ordinarily needed. The compiled libraries are ready to use and should be created from the raw source.
From a practical aspect, the advice to the OP is still the same.
Install the 2 (the main package and the devel package) minimally, the lib package and if necessary any src should be added automatically by the package manager.

TSU

Yes, you should not need the src package. I just mentioned it because this is what contains the source, not the devel package.

From a practical aspect, the advice to the OP is still the same.
Install the 2 (the main package and the devel package) minimally, the lib package and if necessary any src should be added automatically by the package manager.

But that’s actually a different advice now than before? Before you said, only the main package should be necessary to install… :wink:

I’d say all of the packages should be installed automatically if they are needed. The package manager should normally take care of all required (and also recommended) dependencies.
Unless you want to compile something yourself and need the devel package. This you would have to install manually then.

Of course this might not be true if you install 3rd party packages, those might not specify the requirements correctly (or at all).
But as I said before, normally you’d only need the libXXX package in this case. But that’s hard/impossible to say generally.
It all depends on the particular package and how it is split up.

One thing is for certain though: you only need the XXX-devel package for compiling or developing things yourself, not for running programs.
For running programs, you need the libXXX package (if it exists), the XXX package might or might not contain additional stuff that might or might not be necessary.

opencv depends on opencv-devel and there’s a separate documentation package at least in OpenCV case.
Thanks. :slight_smile:

No, it doesn’t:

# zypper info --requires opencv
Repository: openSUSE-13.2-Oss
Name: opencv
Version: 2.4.9-2.1.9
Arch: x86_64
Vendor: openSUSE
Installed: No
Status: not installed
Installed Size: 19.8 MiB
Summary: Collection of algorithms for computer vision
Description: 
  OpenCV means Intel® Open Source Computer Vision Library. It is a collection
  of C
  functions and a few C++ classes that implement some popular Image Processing
  and
  Computer Vision algorithms.
Requires:
  libc.so.6()(64bit)
  libc.so.6(GLIBC_2.2.5)(64bit)
  libc.so.6(GLIBC_2.4)(64bit)
  libc.so.6(GLIBC_2.14)(64bit)
  libc.so.6(GLIBC_2.3.4)(64bit)
  libstdc++.so.6()(64bit)
  libstdc++.so.6(GLIBCXX_3.4)(64bit)
  libstdc++.so.6(CXXABI_1.3)(64bit)
  libpthread.so.0(GLIBC_2.2.5)(64bit)
  libm.so.6()(64bit)
  libm.so.6(GLIBC_2.2.5)(64bit)
  libgcc_s.so.1()(64bit)
  libgcc_s.so.1(GCC_3.0)(64bit)
  libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
  libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
  libopencv_core.so.2.4()(64bit)
  libopencv_imgproc.so.2.4()(64bit)
  libopencv_objdetect.so.2.4()(64bit)
  libopencv_highgui.so.2.4()(64bit)
  libopencv_calib3d.so.2.4()(64bit)
  libopencv_ml.so.2.4()(64bit)
  rpmlib(CompressedFileNames) <= 3.0.4-1
  rpmlib(PayloadFilesHavePrefix) <= 4.0-1
  rpmlib(PayloadIsLzma) <= 4.4.6-1

As you can see, there’s no mention of opencv-devel… :wink:
And if I try to install opencv here, nothing else is pulled in.

The opencv-doc package recommends opencv-devel though, but as this is no requirement, you don’t have to install it even if you want to install opencv-doc.

Again, for running applications that use opencv, you do not need opencv-devel, and opencv-doc neither (not even opencv itself, at least I don’t have it installed here).
It all depends on what you want to do… That’s why the packages are split in the first place.