I am in the process of creating a Balena app for my robot. It is a Raspberry Pi+. My base OS is balenalib/%%BALENA_MACHINE_NAME%%-ubuntu:bionic.
During a make process I get this error:
– Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
CMake Error at raspicam_node/CMakeLists.txt:30 (MESSAGE):
Could not find mmal libraries
– Configuring incomplete, errors occurred!
See also “/ros/catkin_ws/build/CMakeFiles/CMakeOutput.log”.
See also “/ros/catkin_ws/build/CMakeFiles/CMakeError.log”.
Makefile:1104: recipe for target ‘cmake_check_build_system’ failed
make: *** [cmake_check_build_system] Error 1
Invoking “make cmake_check_build_system” failed"
I’ve been scouring google for any tips and have not yet been able to find it.
Hi @pitosalas,
Could you please let me know which RPi model you have? Is it the RPi 3B+?
Moreover, it would be really helpful if you’d let me know what you are trying to achieve. Did you try to connect a Raspberry Pi camera?
The logs you attach here is a small fraction of the entire log and I cannot tell much about what is happening. Attaching here the entire logs would also help us to better understand what could be the issue here.
I am attaching the whole log (but much of the action is happening in underlying scripts and make files.) Let me look if there’s anything else I can provide.logs.log (52.0 KB)
It seems like you are using the 64bit variant of the OS. The base image you are using doesn’t have the sources required to find the package. Can you tried one of the following please?
Use the balenalib/rpi-raspbian base image. that is changing the FROM directive in the Dockerfile to FROM balenalib/rpi-raspbian
I do wonder thought, why if I have a Raspberry Pi 3 Model B Plus Rev 1.3 which is definitely 64bit should I not use a 64 bit OS? ROS likes Ubuntu 18.04. I haven’t tested on Raspian so I am a little concerned.
From my reading ROS has a build for rasping-stretch. Should I therefore use FROM balenalib/rpi-raspbian
I do wonder though, why if I have a Raspberry Pi 3 Model B Plus Rev 1.3 which is definitely 64bit should I not use a 64 bit OS?
You can. But given that a lot of raspberry pi specific packages are not available for 64bit userspace you might find it more challenging. This might change in the future considering Raspbian has a 64-bit variant in beta
Thanks so much! I did try Option 1 (rpi-raspian) and sadly it didn’t work. Maybe it would work with raspian-stretch? I will try your option 2. I appreciate your help as I am teaching a class in Robotics starting tomorrow and I thought I would have had this working by now
Looks like this RUN apt-get install -y ros-melodic-ros-base is failing
[main] The following packages have unmet dependencies:
[main] ros-melodic-ros-base : Depends: ros-melodic-actionlib but it is not going to be installed
[main] Depends: ros-melodic-bond-core but it is not going to be installed
[main] Depends: ros-melodic-dynamic-reconfigure but it is not going to be installed
[main] Depends: ros-melodic-nodelet-core but it is not going to be installed
[main] Depends: ros-melodic-ros-core but it is not going to be installed
maybe change the line to RUN apt-get install -y ros-melodic-bond-core ros-melodic-dynamic-reconfigure ros-melodic-nodelet-core ros-melodic-ros-core ros-melodic-ros-base ?
Again no joy. Do you think any of the later Ubuntu base images will have that library? I dont know how to check, e.g. cosmic (18.10), disco (19.04), eoan (19.10) or focal (20.04)?
According to the ROS website the latest version is supported on Ubuntu Focal and Debian Buster. You could try using FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:buster in your Dockerfile instead of Ubuntu or Raspbian.
Also, for ROS Melodic, you might also try Debian Stretch (instead of Ubuntu Bionic). Their website says Bionic is supported, but it might be worth trying one of the other distros or ROS Noetic.
Do you work at Balena yourself? To answer your question,
I’m quite comfortable that this Dockerfile.template file works. We’ve done a lot of work with ROS. Our Dockerfile with
FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu:bionic
works fine in all respects in Balena except for the “Could not find mmal libraries” error. FYI here’s the GitHub that I am pushing out to Balena Cloud: https://github.com/campusrover/gpg_bran_balena
I am quite mystified why tracking down this error has been so very difficult. Here are the ones that I’ve tested so far and what the error was.
# [main] manifest for balenalib/raspberrypi3-64-ubuntu:focal not found
# FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu:focal
# [main] E: Unable to correct problems, you have held broken packages.
# FROM balenalib/%%BALENA_MACHINE_NAME%%-debian:stretch
# [main] E: Unable to correct problems, you have held broken packages.
# FROM balenalib/%%BALENA_MACHINE_NAME%%-ubuntu:xenial