New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
apt-get package does not work with CMake find_package on Ubuntu #1639
Comments
Did a test where I build my own CppUTest deb package using CPack. FROM ubuntu:jammy
ENV CMAKE_MAKE_PROGRAM=ninja
ENV CMAKE_GENERATOR=Ninja
RUN apt-get update && \
apt-get install --no-install-recommends -y git cmake ninja-build gcc g++ ca-certificates && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt/archives && \
rm -rf /usr/share/doc/ && \
rm -rf /usr/share/man/ && \
rm -rf /usr/share/locale/ \
gcc --version && \
cmake --version && \
ninja --version
RUN git clone https://github.com/cpputest/cpputest.git /tmp/cpputest/ && \
cd /tmp/cpputest/ && \
echo "include(CPack)" >> /tmp/cpputest/CMakeLists.txt && \
cmake -S /tmp/cpputest/ -B /tmp/build/ -DCPACK_GENERATOR=DEB -DCPACK_DEBIAN_PACKAGE_MAINTAINER="itavero" && \
cmake --build /tmp/build/ --target package
FROM ubuntu:jammy
COPY CMakeLists.txt /testproject/
COPY bla.cpp /testproject/
COPY --from=0 /tmp/build/*.deb /tmp/
ENV CMAKE_MAKE_PROGRAM=ninja
ENV CMAKE_GENERATOR=Ninja
RUN apt-get update && \
apt-get install --no-install-recommends -y nano git cmake ninja-build gcc g++ ca-certificates && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
dpkg -i /tmp/CppUTest*.deb && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt/archives && \
rm -rf /usr/share/doc/ && \
rm -rf /usr/share/man/ && \
rm -rf /usr/share/locale/ \
gcc --version && \
cmake --version && \
ninja --version && \
ls -hal /testproject/ && \
cmake -S /testproject -B /tmp/build |
I recommend submitting an issue against the Ubuntu package: https://launchpad.net/ubuntu/+source/cpputest/+bugs. |
Thanks for the suggestion. I've also created a bug report on Launchpad |
@basvodde are we involved in packaging for Ubuntu at all? If not, can we close this? |
Let me try to check this today or this week. I'll need to check this as I remember somewhat had changed. |
I think this is the same as #1563 that I opened a while back. |
I'm trying to create a new Docker image for our CI environment.
Rather than compiling CppUTest every time in our pipeline, I want to add a precompiled version of it.
Our Docker image is based on
ubuntu:jammy
which has an apt-get package available for CppUTest.Unfortunately it seems that there's something wrong with the CMake modules it provides for
find_package
support, as it provides the following error during the CMake configuration phase:In order to reproduce it, you can grab the
Dockerfile
andCMakeLists.txt
from this Gist and rundocker build -t cpputest .
in the same directory.The text was updated successfully, but these errors were encountered: