Thank you so much for sharing those sources, that makes troubleshooting so much easier!
The problem is using qemu (any version) to emulate arm32 seems to trip up the cmake compiler_id_detection. I reproduced it with the latest qemu static outside of the build process.
This issue seems to have been raised with cmake already, and the fix is in cmake 3.18.
I added a code snippet to build cmake 3.20 from source, but it takes a very long time (especially with emulation) but you can give it a try by adding this snippet anytime before catkin_make
.
WORKDIR /opt/cmake
# https://cmake.org/install/
RUN curl -L https://github.com/Kitware/CMake/releases/download/v3.20.0-rc3/cmake-3.20.0-rc3.tar.gz -O && \
tar xvf cmake-3.20.0-rc3.tar.gz --strip-components=1 && \
./bootstrap && make -j"$(nproc)" && make install
WORKDIR /ws
Mine’s still building… but hopefully this helps!