I am trying to build a package to be installed on Ubuntu 20.04 and I am getting this error:
dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libopencv_objdetect.so.407 (used by debian/face-detection-module/usr/lib/x86_64-linux-gnu/libkmsfacedetectionmoduleimpl.so.0.0.1~20.g0bc1900)
Hint: check if the library actually comes from a package.
From this answer I am trying to add my lib, libopencv_objdetect.so.407
, under Build-Depends:
in the debian/control
file.
Under part b of the answer they say this:
Then you would just need to add a Build-Depends: on libsnmp-dev (>= whatever) to your package, and build against that (instead of a manually-installed .so file in /usr/local).
In my case it sounds like I need to add a Build-Depends on libopencv-dev (>= whatever) to my package, and build against that.
And here is where I am lost.
This phrase "build against", what does that mean?
And my second question is how do I know what that I need
libopencv-dev
and not some other package that could havelibopencv_objdetect.so.407
in it?
I know there is a command that lists shared library dependancies, ldd
, but that only provides more .os files and not something like libopencv-dev
I will provide more context that may or may not be useful here
I am creating a module/plugin for a kurento-media-server version 7.0.0. I am using generated code from kurento-media-server-dev to help with the build process.
The module is suppose to use OpenCV's DNN (Deep Neural Network) for detecting faces.
Kurento uses CMake to help build files. The autogenerated code contains this Debian/control file:
1 Source: face-detection-module
2 Maintainer: Maintainer Name <maintainer.name@example.com>
3 Priority: optional
4 Build-Depends:
5 cmake,
6 debhelper-compat (= 13),
7 kurento-cmake-utils,
8 kurento-module-core-dev,
9 kurento-module-elements-dev,
10 kurento-module-filters-dev,
11 libgstreamer1.0-dev,
12 libopencv-dev,
13 pkg-config,
14 Standards-Version: 4.5.1
15 Homepage: https://www.example.com/
16 #Vcs-Browser: https://git.example.com/face-detection-module
17 #Vcs-Git: https://git.example.com/face-detection-module.git
18 Rules-Requires-Root: no
19
20 Package: face-detection-module
21 Architecture: any
22 Section: libs
23 Depends:
24 ${misc:Depends},
25 ${shlibs:Depends},
26 Description: <Up to 60 chars single line summary>
27 <Long description over several lines, indented with space>.
28
29 Package: face-detection-module-dev
30 Architecture: any
31 Section: libdevel
32 Depends:
33 ${misc:Depends},
34 face-detection-module (= ${binary:Version}),
35 kurento-module-core-dev,
36 kurento-module-elements-dev,
37 kurento-module-filters-dev,
38 Description: <Up to 60 chars single line summary> (development files)
39 <Long description over several lines, indented with space>.
I tried changing line 12 from libopencv-dev
to libopencv-dev (< 5.0.0)
and running their package builder I get this:
sudo ~/kurento/ci-scripts/kurento-buildpackage.sh
[kurento-buildpackage.sh] ==================== BEGIN ====================
++ id -u
+ [[ 0 -eq 0 ]]
+ CFG_INSTALL_KURENTO=false
+ CFG_INSTALL_KURENTO_VERSION=
+ CFG_INSTALL_FILES=false
+ CFG_INSTALL_FILES_DIR=/home/mdominguez/github/kurento-face-detection
+ CFG_DSTDIR=/home/mdominguez/github/kurento-face-detection
+ CFG_ALLOW_DIRTY=false
+ CFG_RELEASE=false
++ date --utc +%Y%m%d%H%M%S
+ CFG_TIMESTAMP=20230420204823
+ CFG_APT_ADD_REPO=false
+ CFG_APT_PROXY_URL=
+ [[ 0 -gt 0 ]]
+ [[ -d /home/mdominguez/github/kurento-face-detection ]]
+ [[ -d /home/mdominguez/github/kurento-face-detection ]]
+ [[ false == \t\r\u\e ]]
+ CFG_APT_ADD_REPO=false
[kurento-buildpackage.sh] CFG_INSTALL_KURENTO=false
[kurento-buildpackage.sh] CFG_INSTALL_KURENTO_VERSION=
[kurento-buildpackage.sh] CFG_INSTALL_FILES=false
[kurento-buildpackage.sh] CFG_INSTALL_FILES_DIR=/home/mdominguez/github/kurento-face-detection
[kurento-buildpackage.sh] CFG_DSTDIR=/home/mdominguez/github/kurento-face-detection
[kurento-buildpackage.sh] CFG_ALLOW_DIRTY=false
[kurento-buildpackage.sh] CFG_RELEASE=false
[kurento-buildpackage.sh] CFG_TIMESTAMP=20230420204823
[kurento-buildpackage.sh] CFG_APT_ADD_REPO=false
[kurento-buildpackage.sh] CFG_APT_PROXY_URL=
+ source /etc/lsb-release
++ DISTRIB_ID=Ubuntu
++ DISTRIB_RELEASE=20.04
++ DISTRIB_CODENAME=focal
++ DISTRIB_DESCRIPTION='Ubuntu 20.04.6 LTS'
+ APT_ARGS=()
+ [[ -n '' ]]
+ [[ false == \t\r\u\e ]]
+ [[ false == \t\r\u\e ]]
[kurento-buildpackage.sh] Install build dependencies
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
+ apt-get update
Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://ubuntu.openvidu.io/7.0.0 focal InRelease
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Reading package lists... Done
E: Release file for http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (invalid for another 15h 39min 3s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 17h 24min 39s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease is not valid yet (invalid for another 15h 42min 10s). Updates for this repository will not be applied.
+ on_exit
[kurento-buildpackage.sh] ERROR (100)
[kurento-buildpackage.sh] ==================== END ====================