diff --git a/docker/build_in_rocky9.sh b/docker/build_in_rocky9.sh index 921f285d..71aa71b0 100755 --- a/docker/build_in_rocky9.sh +++ b/docker/build_in_rocky9.sh @@ -28,8 +28,13 @@ docker run --rm \ "$IMG" bash -lc ' set -eux git config --global --add safe.directory /workspace || true + # If this image predates the CMAKE_PREFIX_PATH fix, point cmake at the static libdbus config + # dir so the viewer (Qt6::DBus -> find_package(DBus1)) resolves WrapDBus1. Harmless once the + # image ENV already carries it. + dbus_dir=$(ls -d /opt/dbus-*-static/lib/cmake/DBus1 2>/dev/null | head -1) cmake -G Ninja -S /workspace -B /tmp/build \ -DJFJOCH_VIEWER_ONLY=ON -DJFJOCH_USE_CUDA=ON \ + ${dbus_dir:+-DDBus1_DIR=$dbus_dir} \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_CXX_FLAGS="-march=x86-64-v3" -DCMAKE_C_FLAGS="-march=x86-64-v3" ninja -C /tmp/build -j"$(nproc)" jfjoch_viewer diff --git a/docker/rocky8/Dockerfile b/docker/rocky8/Dockerfile index 357d031f..f3db6b7f 100644 --- a/docker/rocky8/Dockerfile +++ b/docker/rocky8/Dockerfile @@ -168,8 +168,10 @@ RUN set -eux; \ cmake --install eigen-build; \ cd /; rm -rf /tmp/eigen /tmp/eigen-build -# Make Qt and Eigen discoverable by CMake -ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/eigen-3.4 +# Make Qt, the static libdbus, and Eigen discoverable by CMake. The static libdbus prefix is +# required here (not only at Qt build time): every Qt6::DBus consumer re-runs find_package(DBus1) +# through Qt's exported config, so DBus1Config.cmake must be on CMAKE_PREFIX_PATH for the viewer build. +ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/dbus-${DBUS_VERSION}-static:/opt/eigen-3.4 # Set workdir for your project WORKDIR /workspace diff --git a/docker/rocky9/Dockerfile b/docker/rocky9/Dockerfile index f5328bff..57a513f8 100644 --- a/docker/rocky9/Dockerfile +++ b/docker/rocky9/Dockerfile @@ -207,8 +207,10 @@ RUN set -eux; \ cmake --install eigen-build; \ cd /; rm -rf /tmp/eigen /tmp/eigen-build -# Make Qt and Eigen discoverable by CMake -ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/eigen-3.4 +# Make Qt, the static libdbus, and Eigen discoverable by CMake. The static libdbus prefix is +# required here (not only at Qt build time): every Qt6::DBus consumer re-runs find_package(DBus1) +# through Qt's exported config, so DBus1Config.cmake must be on CMAKE_PREFIX_PATH for the viewer build. +ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/dbus-${DBUS_VERSION}-static:/opt/eigen-3.4 ENV LANG=en_US.UTF-8 ENV LANGUAGE=en_US:en diff --git a/docker/ubuntu2204/Dockerfile b/docker/ubuntu2204/Dockerfile index 7fcadefd..56588301 100644 --- a/docker/ubuntu2204/Dockerfile +++ b/docker/ubuntu2204/Dockerfile @@ -196,8 +196,10 @@ RUN set -eux; \ cmake --install eigen-build; \ cd /; rm -rf /tmp/eigen /tmp/eigen-build -# Make Qt and Eigen discoverable by CMake -ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/eigen-3.4 +# Make Qt, the static libdbus, and Eigen discoverable by CMake. The static libdbus prefix is +# required here (not only at Qt build time): every Qt6::DBus consumer re-runs find_package(DBus1) +# through Qt's exported config, so DBus1Config.cmake must be on CMAKE_PREFIX_PATH for the viewer build. +ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/dbus-${DBUS_VERSION}-static:/opt/eigen-3.4 # Set workdir for your project WORKDIR /workspace diff --git a/docker/ubuntu2404/Dockerfile b/docker/ubuntu2404/Dockerfile index f0b649e7..ca9678c7 100644 --- a/docker/ubuntu2404/Dockerfile +++ b/docker/ubuntu2404/Dockerfile @@ -183,8 +183,10 @@ RUN set -eux; \ cmake --install eigen-build; \ cd /; rm -rf /tmp/eigen /tmp/eigen-build -# Make Qt and Eigen discoverable by CMake -ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/eigen-3.4 +# Make Qt, the static libdbus, and Eigen discoverable by CMake. The static libdbus prefix is +# required here (not only at Qt build time): every Qt6::DBus consumer re-runs find_package(DBus1) +# through Qt's exported config, so DBus1Config.cmake must be on CMAKE_PREFIX_PATH for the viewer build. +ENV CMAKE_PREFIX_PATH=/opt/qt-${QT_VERSION}-static:/opt/dbus-${DBUS_VERSION}-static:/opt/eigen-3.4 # Set workdir for your project WORKDIR /workspace