Merge pull request #328847 from tobim/pkgs/ceph-fix-parallel-build

ceph: Fix race in parallel build
This commit is contained in:
Niklas Hambüchen 2024-08-08 04:48:49 +02:00 committed by GitHub
commit 7012353d27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -341,8 +341,6 @@ in rec {
graphviz
];
enableParallelBuilding = true;
buildInputs = cryptoLibsMap.${cryptoStr} ++ [
arrow-cpp
babeltrace
@ -450,6 +448,14 @@ in rec {
''-DWITH_XFS=${if optLibxfs != null then "ON" else "OFF"}''
] ++ lib.optional stdenv.isLinux "-DWITH_SYSTEM_LIBURING=ON";
preBuild =
# The legacy-option-headers target is not correctly empbedded in the build graph.
# It also contains some internal race conditions that we work around by building with `-j 1`.
# Upstream discussion for additional context at https://tracker.ceph.com/issues/63402.
''
cmake --build . --target legacy-option-headers -j 1
'';
postFixup = ''
wrapPythonPrograms
wrapProgram $out/bin/ceph-mgr --prefix PYTHONPATH ":" "$(toPythonPath ${placeholder "out"}):$(toPythonPath ${ceph-python-env})"