Project

General

Profile

Actions

Bug #68807

open
JM GA

ceph-volume fails to build on python 3.12

Bug #68807: ceph-volume fails to build on python 3.12

Added by John Mulligan about 2 years ago. Updated about 1 year ago.

Status:
New
Priority:
High
Target version:
-
Due date:
% 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.


Related issues 1 (0 open — 1 closed)

Related to CI - Bug #66914: start building/testing for Ubuntu 24.04 LTS (Noble Numbat)ResolvedDavid Galloway

Actions

JM Updated by John Mulligan almost 2 years ago Actions #1

This will also fail on centos 10 and derivatives.

JM Updated by John Mulligan over 1 year ago Actions #2

  • Related to Bug #66914: start building/testing for Ubuntu 24.04 LTS (Noble Numbat) added

CB Updated by Casey Bodley about 1 year ago Actions #3

  • Priority changed from Normal to High

CB Updated by Casey Bodley about 1 year ago Actions #4

  • Assignee set to Guillaume Abrioux
Actions

Also available in: PDF Atom