Skip to content

Commit 5185c3e

Browse files
committed
fix(arm): call mamba cmake by full path in pass 1 (apt 3.22 is too old)
The previous fix (install cmake via apt) didn't actually help: OpenMS 3.5's CMakeLists.txt requires cmake >= 3.24, and Ubuntu 22.04's apt cmake is 3.22.1, which fails configure with CMake Error at src/openms/extern/CMakeLists.txt:11 (cmake_minimum_required): CMake 3.24 or higher is required. You are running version 3.22.1 That's exactly why the existing x86 Dockerfile installs cmake via mamba (the conda-forge build is 3.30+). FLASHApp.arm escapes this by using ubuntu:24.04 (apt cmake 3.28); we stay on 22.04 to minimize churn vs. the working x86 Dockerfile. Fix: in pass 1, call the mamba-env cmake by its full path `/root/miniforge3/envs/streamlit-env/bin/cmake`. The plain-bash SHELL is still in effect, so cmake doesn't pick up any conda-forge environment side effects, and CMAKE_IGNORE_PREFIX_PATH keeps it from auto-discovering miniforge libraries during find_package. The cmake binary itself runs against miniforge's libstdc++, but that's a runtime detail of cmake — it doesn't leak into the configured project's link command. The apt cmake addition from f11bc99 is now redundant but harmless; leaving it in place to keep this diff focused.
1 parent f11bc99 commit 5185c3e

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Dockerfile.arm

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,15 @@ WORKDIR /openms-build
9494
# pick the miniforge yaml-cpp makes TOPP linking fail with
9595
# undefined reference to `std::ios_base_library_init()@GLIBCXX_3.4.32`
9696
# amd64 happens to work because its conda-forge yaml-cpp build is older.
97+
# We call the mamba-env cmake by full path so we get a version >= 3.24
98+
# (OpenMS 3.5's floor); ubuntu:22.04's apt cmake is 3.22 which is too old.
99+
# CMAKE_IGNORE_PREFIX_PATH keeps cmake from auto-discovering miniforge libs
100+
# even though the binary itself lives there.
97101
# Pass 2 re-runs cmake inside the mamba env with PYOPENMS=ON so the Python
98102
# bindings can find the conda-forge Python/Cython/NumPy; CMAKE_IGNORE_PREFIX_PATH
99103
# keeps the C++ link command unchanged from pass 1.
100104
SHELL ["/bin/bash", "-c"]
101-
RUN cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_PREFIX_PATH='/OpenMS/contrib-build/;/usr/;/usr/local' -DCMAKE_IGNORE_PREFIX_PATH=/root/miniforge3 -DHAS_XSERVER=OFF -DBOOST_USE_STATIC=OFF ../OpenMS
105+
RUN /root/miniforge3/envs/streamlit-env/bin/cmake -DCMAKE_BUILD_TYPE='Release' -DCMAKE_PREFIX_PATH='/OpenMS/contrib-build/;/usr/;/usr/local' -DCMAKE_IGNORE_PREFIX_PATH=/root/miniforge3 -DHAS_XSERVER=OFF -DBOOST_USE_STATIC=OFF ../OpenMS
102106
SHELL ["mamba", "run", "-n", "streamlit-env", "/bin/bash", "-c"]
103107
RUN cmake -DPYOPENMS=ON -DPY_MEMLEAK_DISABLE=On -DCMAKE_IGNORE_PREFIX_PATH=/root/miniforge3 .
104108

0 commit comments

Comments
 (0)