Actions
Bug #68807
openceph-volume fails to build on python 3.12
% Done:
0%
Source:
Community (dev)
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
Merge Commit:
Fixed In:
Released In:
Upkeep Timestamp:
Description
ceph-volume fails to "build" when run via cmake on python 3.12 (on ubuntu 24.04).
The issue seems to be that setuptools is no longer part of the default bundle of packages in a virtualenv:I was successfully able to get past the issue with a hacky little change:
diff --git a/src/ceph-volume/CMakeLists.txt b/src/ceph-volume/CMakeLists.txt
index 9166553dc73..6452cc5d0eb 100644
--- a/src/ceph-volume/CMakeLists.txt
+++ b/src/ceph-volume/CMakeLists.txt
@@ -20,7 +20,7 @@ add_custom_command(
add_custom_command(
OUTPUT ${CEPH_VOLUME_VIRTUALENV}/bin/ceph-volume
DEPENDS ${CEPH_VOLUME_VIRTUALENV}/bin/python
- COMMAND . ${CEPH_VOLUME_VIRTUALENV}/bin/activate && ${CEPH_VOLUME_VIRTUALENV}/bin/python setup.py develop && deactivate
+ COMMAND . ${CEPH_VOLUME_VIRTUALENV}/bin/activate && pip install setuptools && ${CEPH_VOLUME_VIRTUALENV}/bin/python setup.py develop && deactivate
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/src/ceph-volume
COMMENT "${CMAKE_SOURCE_DIR}/src/ceph-volume")
But I'm not really sure if that's the best way forward, especially if we don't want things in the build relying on internet access (and/or arbitrary versions). I'm not familiar with why ceph-volume is being "built" using a virtualenv because that isolates us from system packages (odd if we are building an rpm or deb IMO). So rather than trying to fix it myself, I'm filing a tracker so we can discuss it later.
Updated by John Mulligan about 1 year ago
This will also fail on centos 10 and derivatives.
Updated by John Mulligan 9 months ago
- Related to Bug #66914: start building/testing for Ubuntu 24.04 LTS (Noble Numbat) added
Actions