Skip to content

Build hangs when Running custom install script libcamera/src/ipa/ipa-sign-install.sh #323

@PeterQFR

Description

@PeterQFR

When Building libcamera I commonly have issues where the installation will hang indefinitely regenerating signatures in the above script. This is when cross-compiling using docker buildx command on an x86_64 system targeting an aarch64 architecture.

Specifically on the line:

 236.5 Running custom install script '/libcamera/src/ipa/ipa-sign-install.sh /libcamera/build/src/ipa-priv-key.pem lib/aarch64-linux-gnu/libcamera/ipa/ipa_rpi_vc4.so lib/aarch64-linux-gnu/libcamera/ipa/ipa_rpi_pisp.so'

The build will hang, not error and will spin for a long > 50000s time. On successful builds, on raspberry 4 it will typically only take 500s.

Steps to Reproduce
This occurs in a dockerfile such as

FROM ubuntu:20.04


RUN export DEBIAN_FRONTEND=noninteractive &&\
        apt update -qq && apt install -y software-properties-common && add-apt-repository universe \
        && apt update &&  apt install -y curl \
        && curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg \
        && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | tee /etc/apt/sources.list.d/ros2.list > /dev/null \
        && apt update && apt upgrade -y \
        && apt-get install -qq -y \
        ros-galactic-ros-base \
        ros-dev-tools

RUN apt-get update -qq && apt-get install -qq -y \
        python3-colcon-common-extensions \
        ros-galactic-angles \
	ros-galactic-vision-opencv \
        ros-galactic-cv-bridge \ 
        git \
        libcurl4 \
        libcurl4-openssl-dev \
        libjsoncpp-dev \
	python3-pip 


RUN apt-get update -qq && apt-get install -qq -y \
	libboost-dev \
	libgnutls28-dev openssl libtiff-dev pybind11-dev \
	qtbase5-dev libqt5core5a libqt5widgets5 \
	cmake \
	python3-yaml python3-ply \
	python3-pybind11 pybind11-dev \
	libglib2.0-dev libgstreamer-plugins-base1.0-dev

RUN pip3 install meson>=0.63 ninja Jinja2

RUN git clone https://github.com/raspberrypi/libcamera.git && cd libcamera && \
	export CFLAGS="-Wno-error" && meson setup build --buildtype=release -Dpipelines=rpi/vc4,rpi/pisp -Dipas=rpi/vc4,rpi/pisp \
		-Dgstreamer=disabled -Dtest=false -Dlc-compliance=disabled -Dcam=disabled -Dqcam=disabled \
		-Ddocumentation=disabled -Dpycamera=enabled -Dcpp_args="-fPIC -Wno-error"  \
	-Dcpp_link_args="-fPIC" \
	&& ninja -C build install && cd .. && rm -rf libcamera*

being built on an ubuntu host system (x86_64 in crosscompile via docker buildx using the following command:

docker buildx build --platform linux/aarch64  -t ros2  -f ros2/Dockerfile ros2

I have tried checking out versions where it has worked ie v0.5.0, but the error remains. The system has sufficient resources to complete this action. It last worked on a rpi 4 with debian bookworm as the host system.

Just confirming that a clean cache on a Raspberri4 running rasparian does complete without errors in a docker environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions