Building piaware on Forky fails due to missing "boost/asio/io_service.hpp"

@obj

Trying to build piaware package on Raspberry Pi Model 4 with Armbian Forky OS. Got stuck when faup978 started building:

In file included from faup978_main.cc:12:
faup978_reporter.h:13:10: fatal error: boost/asio/io_service.hpp: No such file or directory
   13 | #include <boost/asio/io_service.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [<builtin>: faup978_main.o] Error 1
make[2]: Leaving directory '/home/pi/piaware_builder/package-forky/dump978'
make[1]: *** [debian/rules:73: build_dump978] Error 2
make[1]: Leaving directory '/home/pi/piaware_builder/package-forky'
make: *** [debian/rules:116: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
pi@localhost:~/piaware_builder/package-forky$

Installed following packages, then tried again to build. Got stuck with the same error :frowning:

sudo apt install -y \
libboost-system-dev \
libboost-program-options-dev \
libboost-regex-dev \
libboost-filesystem-dev \
libboost-all-dev \
libsoapysdr-dev \
soapysdr-module-rtlsdr

 

pi@localhost:~$ apt-cache policy libboost-dev
libboost-dev:
  Installed: 1.90.0.1
  Candidate: 1.90.0.1
  Version table:
 *** 1.90.0.1 500
        500 http://deb.debian.org/debian forky/main arm64 Packages
        100 /var/lib/dpkg/status


pi@localhost:~$ apt-cache policy libboost-all-dev
libboost-all-dev:
  Installed: 1.90.0.1
  Candidate: 1.90.0.1
  Version table:
 *** 1.90.0.1 500
        500 http://deb.debian.org/debian forky/main arm64 Packages
        100 /var/lib/dpkg/status

 

These are due to Boost API changes, rather than a dependency issue, they need changes to the source code to fix.

A starting point is to replace all uses of io_service with io_context. But you’ll probably also hit issues with io_context::post and tcp::resolver which are slightly more involved than just a search-and-replace.

I should be able to spend some time on dump978 and get that fixed up sometime next week, all going well.

Thank you @obj for quick responce.

I replaced all instances of io_service by io_context in all files in folder dump978 by following command:

sudo find piaware_builder/package-forky/dump978 -type f -exec sed -i 's/io_service/io_context/g' {} +

I then again issued command sudo dpkg-buildpackage -b. This time the error missing <boost/asio/io_service.hpp> did not appear, but as you have already said, another error appeared. I got fedup and quit.

Anyway I will wait till you find time to fix the dump978 source code. Thanks again for your help.

@obj
Another issue when trying to install mlat-client & pfclient on RPi model 4 with Armbian Forky:

Unit mlat-client.service not found
Unit pfclient.service not found

Google search gave following result (I am not sure if this AI generated responce is correct or not):

The systemd v260 removed SysV compatibility interfaces, which means many legacy SysV behaviors no longer work unless the distribution explicitly compiles systemd with compatibility enabled.

Your packages rely on:
• /etc/init.d scripts
• systemd’s generator-late to auto‑create *.service units from those scripts
But since systemd v260 removed SysV compatibility by default, the generator may not run or may run in a reduced mode. This leads to:
• No generated *.service units
• Installation failures for packages expecting SysV support
• Behavior differing from older Debian or Raspberry Pi OS releases
This aligns with systemd’s documented removal of SysV support.

(1) Error message: mlat-client

pi@rpi-armbian-forky:~$ sudo dpkg -i mlat-client_0.2.13_arm64.deb
(Reading database… 68054 files and directories currently installed.)
Preparing to unpack mlat-client_0.2.13_arm64.deb…
Unpacking mlat-client (0.2.13) over (0.2.13)…
Setting up mlat-client (0.2.13)…
Failed to start mlat-client.service: Unit mlat-client.service not found.
invoke-rc.d: initscript mlat-client, action "start" failed.
Unit mlat-client.service could not be found.
dpkg: error processing package mlat-client (--install):

(2) Error message: Planefinder’s pfclient

pi@rpi-armbian-forky:~$ sudo dpkg -i pfclient_5.3.29_arm64.deb
Selecting previously unselected package pfclient.
(Reading database… 68093 files and directories currently installed.)
Preparing to unpack pfclient_5.3.29_arm64.deb…
Unpacking pfclient (5.3.29)…
Setting up pfclient (5.3.29)…
Failed to start pfclient.service: Unit pfclient.service not found.
dpkg: error processing package pfclient (--install):

 

FWIW this is the page that documents the Boost API changes: Networking TS compatibility

(some of them are not entirely trivial)

Don’t know, those aren’t packages I build/maintain.

Can you try this branch: GitHub - flightaware/dump978 at boost-asio-deprecation · GitHub and see if that works any better?

I don’t have a sufficiently-new Boost library version on hand to directly test what you saw, but that branch defines BOOST_ASIO_NO_DEPRECATED which should turn off the old APIs even on older Boost versions.

nb: this builds for me but is otherwise untested; it’s possible something broke when being rearranged for the new APIs.

Did following:

(1) In file piaware_builder/sensible-build.sh, commented out this line:

# shallow_clone https://github.com/flightaware/dump978.git v10.2 $OUTDIR/dump978

(2) Just below it, added this line:

shallow_clone https://github.com/flightaware/dump978.git boost-asio-deprecation $OUTDIR/dump978

(3) Ran sudo ./sensible-build.sh forky

(4) When above script completed, checked cloned dump978

pi@rpi-armbian-forky:~/piaware_builder/package-forky/dump978$ sudo git log -1 

commit 8765132e9278e080f97a7aec0088f64b51848f67 (grafted, HEAD, origin/boost-asio-deprecation, boost-asio-deprecation)
Author: Oliver Jowett <oliver.jowett@flightaware.com>
Date:   Tue Mar 31 02:06:52 2026 +0800

    Build with BOOST_ASIO_NO_DEPRECATED, fix fallout

    Newer boost versions entirely remove the deprecated APIs, so let's fix
    them now:

     io_service -> io_context
     expires_from_now -> expires_after
     post/dispatch method become free functions
     strand wrap() -> bind_executor
     resolver changes that don't fit in this margin

    Building with BOOST_ASIO_NO_DEPRECATED makes the deprecated API
    unavailable even in older Boost versions, so set that to provoke errors
    if the old API is used at all.

(5) Moved to folder piaware_builder/package-forky, and ran following command:
sudo dpkg-buildpackage -b --no-sign

(6) Got following error:

g++ -std=c++11 -Wall -Wno-psabi -Werror -O2 -g -Ilibs -DBOOST_ASIO_NO_DEPRECATED  faup978_main.o socket_input.o uat_message.o track.o faup978_reporter.o -o faup978 -lboost_system -lboost_program_options -lboost_regex -lboost_filesystem -lpthread -lstdc++ -lm
/usr/bin/aarch64-linux-gnu-ld.bfd: cannot find -lboost_system: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:21: faup978] Error 1
make[2]: Leaving directory '/home/pi/piaware_builder/package-forky/dump978'
make[1]: *** [debian/rules:73: build_dump978] Error 2
make[1]: Leaving directory '/home/pi/piaware_builder/package-forky'
make: *** [debian/rules:116: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
pi@rpi-armbian-forky:~/piaware_builder/package-forky$

 

Okay, that’s progress, you can probably try just removing -lboost_system from the Makefile

(edit: I pushed that change to the branch)

 

STEP (1):

pi@rpi-armbian-forky:~/piaware_builder/package-forky/dump978$ sudo git pull 

 

STEP (2):

pi@rpi-armbian-forky:~/piaware_builder/package-forky/dump978$ sudo git log -1

commit 286b48f24bec2d447aefb52a213b478849e6a165 (HEAD, origin/boost-asio-deprecation)
Author: Oliver Jowett <oliver.jowett@flightaware.com>
Date:   Tue Mar 31 12:49:11 2026 +0800

    Drop libboost_system link dependency

    Boost.System "has been header-only since 1.69", and the stub library was
    removed in 1.89 which breaks trying to link to the (now nonexistent)
    libboost_system.

    Rather than trying to detect the boost version, just assume that we have
    at least 1.69 and remove the link dependency entirely. The oldest Debian
    version we expect to compile against (bullseye) has 1.74 so should be
    okay.

STEP (3):

pi@rpi-armbian-forky:~/piaware_builder/package-forky$ sudo dpkg-buildpackage -b --no-sign 

 

RESULT:

install ca/*.pem /home/pi/piaware_builder/package-forky/debian/piaware/usr/lib/piaware_packages/ca
c_rehash /home/pi/piaware_builder/package-forky/debian/piaware/usr/lib/piaware_packages/ca
make[3]: c_rehash: No such file or directory
make[3]: *** [Makefile:17: install] Error 127
make[3]: Leaving directory '/home/pi/piaware_builder/package-forky/piaware/package'
make[2]: *** [Makefile:18: install] Error 2
make[2]: Leaving directory '/home/pi/piaware_builder/package-forky/piaware'
make[1]: *** [debian/rules:101: install_piaware] Error 2
make[1]: Leaving directory '/home/pi/piaware_builder/package-forky'
make: *** [debian/rules:116: binary] Error 2
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2

 

okay, so that’s getting past the faup978 build.

From here you probably need to work through the problems yourself. c_rehash is usually part of openssl. but the piaware packaging does already have a build-depends on openssl. maybe it’s moved? (or possibly now we should use “openssl rehash”?)

edit: https://metadata.ftp-master.debian.org/changelogs//main/o/openssl/openssl_3.6.1-3_changelog

 openssl (3.6.0-1) experimental; urgency=medium

  * Import 3.6.0
  * Stop shipping c_rehash. It bas been long replaced by "openssl rehash"

 -- Sebastian Andrzej Siewior <sebastian@breakpoint.cc>  Fri, 03 Oct 2025 17:40:10 +0200
1 Like

Thank you @obj for providing guidance and help. I really appreciate it.

SUCCESS - Lot of thanks to @obj

STEP (1): Replaced all instances of c_rehash by openssl rehash in all files inside folder piaware_builder/package-forky/piaware by following command

sudo find piaware_builder/package-forky/piaware -type f -exec sed -i 's/c_rehash/openssl rehash/g' {} + 

STEP (2): Entered folder piaware_builder/package-forky and issued following command

sudo dpkg-buildpackage -b --no-sign

 

RESULT:

 

 

 

1 Like

 

Solved this problem by manually creating service files:

1 of 2 - mlat-client:

sudo nano /usr/lib/systemd/system/mlat-client.service

In above newly-created blank file, copy-pasted following code:

# Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/mlat-client
Description=LSB: Multilateration client
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=remote-fs.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/mlat-client start
ExecStop=/etc/init.d/mlat-client stop

[Install]
WantedBy=default.target

 

Ran following command, and apt happily configured and completed broken installation :slight_smile:

sudo apt --fix-broken install

 

2 of 2 - pfclient:

sudo nano /usr/lib/systemd/system/pfclient.service

In above newly-created blank file, copy-pasted following code:

# Automatically generated by systemd-sysv-generator
[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/pfclient
Description=LSB: planefinder.net ads-b decoder
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=remote-fs.target
After=network-online.target
After=time-sync.target
Wants=network-online.target

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/pfclient start
ExecStop=/etc/init.d/pfclient stop

[Install]
WantedBy=default.target

 

Ran following command, and apt happily configured and completed broken installation :slight_smile:

sudo apt --fix-broken install