It turns out those errors had nothing to do with rpi-userland files they were both part of Google's gperftools profiler
.
My options were to build tvheadend with the --disable-gperftools
build option or else to install the support for them:
# sudo apt install gperftools libgoogle-perftools-dev
Installing rpi-userland on Ubuntu 22.04 64-bit running on a Pi 4
As mentioned above the SNAP command does not currently work to install rpi-userland in this environment.
Furthermore currently rpi-userland is just not supported on any 64-bit OS running on a Pi 4.
You can download and cross compile the 32-bit rpi-userland sources on your 64-bit system. This github page has a script build_arm64_rpi_userland.sh
that does that. It generates a .deb file which you can then install like this:
# sudo dpkg -i /home/ubuntu/workdir/output/rpiuserland_54fd97a_arm64.deb
Initially I had some problems and needed to run these commands:
# sudo apt --fix-broken install
• Then tried again...
# sudo apt install libgcc1-armhf-cross
# sudo apt install libc6-armhf-cross
# sudo apt install libstdc++6-armhf-cross
# sudo dpkg -i rpiuserland_54fd97a_arm64.deb
The catch is that you don't get full rpi-userland functionality, some of the libraries work but not all. For instance there is no mmal support.
ubuntu@ubuntu:~$ dpkg -L rpiuserland | grep mmal
/opt/vc/lib/pkgconfig/mmal.pc
/opt/vc/src/hello_pi/hello_mmal_encode
/opt/vc/src/hello_pi/hello_mmal_encode/Makefile
/opt/vc/src/hello_pi/hello_mmal_encode/mmal_encode.c
ubuntu@ubuntu:~$ dpkg -L rpiuserland | grep bcm
/opt/vc/include/bcm_host.h
/opt/vc/lib/libbcm_host.so
/opt/vc/lib/pkgconfig/bcm_host.pc
ubuntu@ubuntu:~$ ls -l /opt/vc/lib/ | grep mmal
ubuntu@ubuntu:~$
For instance, none of these mmal libraries are available in /opt/vc/lib
libmmal_components.so
libmmal_core.so
libmmal.so
libmmal_util.so
libmmal_vc_client.so
In my case I was trying to build tvheadend with mmal support but the build still failed with:
ERROR: mmal not found
This was because the mmal stuff never got ported to the 64-bit kernel and AFAIK has been deprecated.