Open bakeromso opened 3 days ago
Edit:
I managed to get them to compile by disabling cpputest's memoryleak detection, dockerfile:
# Use official Ubuntu rolling base image
FROM ubuntu:24.04
# Install gcc, g++, and make
RUN apt-get update && apt-get install -y \
gcc \
g++ \
make \
cmake \
pkg-config
RUN apt-get update && apt-get install -y \
git
# Since the packed Cpputest is problematic for Ubuntu, let's build it ourselves
RUN cd /root && \
git clone https://github.com/cpputest/cpputest.git && \
cd cpputest && \
mkdir cpputest_build && \
cmake -S . -B cpputest_build -DCPPUTEST_MEM_LEAK_DETECTION_DISABLED=1 && \
cd cpputest_build && \
make install
CMD [ "/bin/bash" ]
And in the unittests cmakelists.txt enforce the use of C++20 standard:
set(CMAKE_CXX_STANDARD 20) # Replace 11 with 14 or 17 as needed
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF) # Keep this OFF to stick to the standard without compiler-specific extensions
If you like, I can make a PR out of this with the fixes. If this doesn't make any sense, please let me know as well!
Thanks for the extensive protocol you've made! I'm trying it out, and wanted to run the unit tests, but I'm running into compile issues. I'm building with a container, but the same issue also arises bare metal.
Reproducing the issue
If you're interested in reproducing the issue, this is my setup
Dockerfile:
build it:
And run it (from this repo root):
From the docker:
Compilation problems
The build fails with the following output:
This seems similar to this issue in cpputest, but their they proposed the a fix of moving the system includes before the cputest include headers. However, the first file to fails the compilation (
fd_multidrop_tests.cpp
) is already failing on the first include. This include is a system include rather than a cpputest include, so there is nothing that could be moved further up here. In other words, I don't see how the proposed fix of that issue would apply here.I have no experience with cpputest, would you have any idea what's going on here? Are the unit tests still compiling on your system?