Unable to locate development package (boost library) in Docker image

Some time ago I already asked a question about the integration of the Boost library. At that time I did not fully understand the concept. Afterwards I was able to integrate the library under Visual Studio.

Since Visual Studio Code is more “pushed” by Toradex, I wanted to take a look at it under VSC. Unfortunately, the package libboost is not found.

I followed the instructions below: How to do C/C++ Development on Torizon
What I did:

  1. Create “Single-file C++ sample” project
  2. Selected ‘debian arm64v8 bullseye’ (also tested arm32v7)
  3. added “libboost1.67-dev:#%platform.debian-arch%#” to the devpackages

The package should be in the universe as arm64 and : Debian Packages

Full output:

[04-01 06:46:44.385] Initializing Torizon Extension
[04-01 06:46:44.388] Checking Moses ...
[04-01 06:46:44.400] Port 5001 already in use.
[04-01 06:46:44.402] Backend container instance will run on port 5002
[04-01 06:46:48.201] Torizon Backend version 1.0 API version: 1.0
[04-01 06:46:48.201] Checking Docker ...
[04-01 06:46:48.226] Docker version 20.10.5 build 363e9a8
[04-01 06:46:48.256] Trying connect to Toradex Apalis iMX8QM/QP on Apalis Evaluation Board(064.....)
[04-01 06:46:48.955] No active configuration found, selecting first valid one.
[04-01 06:46:48.955] Active configuration has been selected (8caaf08b-43e9-4e1a-918a-83fc0d368496), updating it.
[04-01 06:46:49.444] Initializing Torizon C/C++ application.
[04-01 06:46:49.489] SDK-related features are enabled for this project.
[04-01 06:47:01.062] Toradex Apalis iMX8QM/QP on Apalis Evaluation Board(0649....) connected
[04-01 06:47:01.062] Torizon: all devices refreshed
[04-01 06:47:11.934] Step 1/2 : FROM torizon/debian-cross-toolchain-arm64:2-bullseye
[04-01 06:47:11.934] ---> a0e37579261b
[04-01 06:47:11.934] Step 2/2 : RUN apt-get -q -y update     && apt-get -q -y upgrade     && apt-get -q -y install gdb-multiarch procps rsync openssh-client    libboost1.67-dev:arm64        && rm -rf /var/lib/apt/lists/*
[04-01 06:47:11.934] ---> Running in e50f44bdb04d
[04-01 06:47:11.934] Get:1 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye InRelease [116 kB]
[04-01 06:47:11.935] Get:2 https://feeds.toradex.com/debian testing InRelease [13.0 kB]
[04-01 06:47:11.962] Get:3 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye-updates InRelease [38.8 kB]
[04-01 06:47:12.018] Get:4 https://feeds.toradex.com/debian testing/main arm64 Packages [134 kB]
[04-01 06:47:12.128] Get:5 http://snapshot.debian.org/archive/debian-security/20200908T070000Z bullseye-security InRelease [44.1 kB]
[04-01 06:47:12.138] Get:6 https://feeds.toradex.com/debian testing/non-free arm64 Packages [11.5 kB]
[04-01 06:47:12.258] Get:7 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye/main amd64 Packages [7683 kB]
[04-01 06:47:13.296] Get:8 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye/main arm64 Packages [7572 kB]
[04-01 06:47:15.095] Fetched 15.6 MB in 3s (4616 kB/s)
Reading package lists...
[04-01 06:47:15.831] Reading package lists...
[04-01 06:47:16.564] Building dependency tree...
[04-01 06:47:16.725] Reading state information...
[04-01 06:47:16.752] Calculating upgrade...
[04-01 06:47:16.887] 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[04-01 06:47:16.897] Reading package lists...
[04-01 06:47:17.604] Building dependency tree...
[04-01 06:47:17.767] Reading state information...
[04-01 06:47:17.863] e[91mE: Unable to locate package libboost1.67-dev:arm64
E: Couldn't find any package by glob 'libboost1.67-dev'
E: Couldn't find any package by regex 'libboost1.67-dev'
e[0m

Greeting @TriUrs,

You’re on the right track but there’s small versioning issue here. Let me explain, the libboost1.67-dev package is available how it’s only available on the “buster” release of Debian. The container you’re using is based on the “bullseye” release of Debian. The libboost development package for bullseye is here: Debian -- Details of package libboost1.74-dev in bullseye

When looking for packages in Debian make sure that it’s available for the specific release of Debian you’re working with, bullseye in your case. In this case the package is available but as a different version. Which can be a little confusing when requesting packages by specific version numbers.

Best Regards,
Jeremias

Hi Jeremias

Ah, I’ve overlooked that, my bad.

But unfortunately I get still the same error if I change the version to 1.74:

[04-06 11:10:19.155] Step 1/2 : FROM torizon/debian-cross-toolchain-arm64:2-bullseye
[04-06 11:10:20.697] ---> a0e37579261b
[04-06 11:10:20.697] Step 2/2 : RUN apt-get -q -y update     && apt-get -q -y upgrade     && apt-get -q -y install gdb-multiarch procps rsync openssh-client    libboost1.74-dev:arm64        && rm -rf /var/lib/apt/lists/*
[04-06 11:10:21.390] ---> Running in 03835b32b539
[04-06 11:10:24.124] Get:1 https://feeds.toradex.com/debian testing InRelease [13.0 kB]
[04-06 11:10:24.397] Get:2 https://feeds.toradex.com/debian testing/non-free arm64 Packages [11.5 kB]
[04-06 11:10:24.445] Get:3 https://feeds.toradex.com/debian testing/main arm64 Packages [134 kB]
[04-06 11:10:33.036] Get:4 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye InRelease [116 kB]
[04-06 11:10:33.223] Get:5 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye-updates InRelease [38.8 kB]
[04-06 11:10:33.349] Get:6 http://snapshot.debian.org/archive/debian-security/20200908T070000Z bullseye-security InRelease [44.1 kB]
[04-06 11:10:33.468] Get:7 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye/main arm64 Packages [7572 kB]
[04-06 11:10:34.441] Get:8 http://snapshot.debian.org/archive/debian/20200908T070000Z bullseye/main amd64 Packages [7683 kB]
[04-06 11:10:36.278] Fetched 15.6 MB in 13s (1171 kB/s)
Reading package lists...
[04-06 11:10:37.024] Reading package lists...
[04-06 11:10:37.755] Building dependency tree...
[04-06 11:10:37.923] Reading state information...
[04-06 11:10:37.951] Calculating upgrade...
[04-06 11:10:38.094] 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
[04-06 11:10:38.102] Reading package lists...
[04-06 11:10:38.838] Building dependency tree...
[04-06 11:10:39.000] Reading state information...
[04-06 11:10:39.103] e[91mE: Unable to locate package libboost1.74-dev:arm64
E: Couldn't find any package by glob 'libboost1.74-dev'
E: Couldn't find any package by regex 'libboost1.74-dev'
e[0m

Ahh now it’s my bad.

I forgot that we freeze our Debian package feeds in the container at a certain point in time. This is because Debian Bullseye isn’t yet considered a stable release. I had a look and it seems at the point in time the feeds were frozen the version of libboost was “1.71”. Please try libboost1.71-dev this worked and was able to be installed on my setup using our Debian containers.

Best Regards,
Jeremias

Ah… now it works!

And I think I figured out how to check the available packages or version:

  1. open terminal tab
  2. select bash
  3. apt-cache search

and there I found:

$apt-cache search libboost
libboost-regex1.71.0 - regular expression library for C++
libboost1.71-dev - Boost C++ Libraries development files

Thank you very much Jeremias. And greetings from lake Zürichsee :slight_smile:

Glad we were able to sort it out. Also yes, it’s probably best to sue the cache search for situations like this where the package feed in the container differs from what Debian lists online.

Best Regards,
Jeremias