Project

General

Profile

Actions

Bug #62428

closed

cmake: rebuild picks up newer python when originally built with older one

Added by Patrick Donnelly 9 months ago. Updated 7 months ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
build
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
reef,quincy
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

For a RHEL 8 machine, when multiple Python versions exist:

[zack@vossi04 ceph]$ ls /usr/bin/python3.[0-9]
/usr/bin/python3.6  /usr/bin/python3.8  /usr/bin/python3.9
[zack@vossi04 ceph]$ ls -l /usr/bin/python3
lrwxrwxrwx. 1 root root 25 Dec 11  2022 /usr/bin/python3 -> /etc/alternatives/python3
[zack@vossi04 ceph]$ ls -l /etc/alternatives/python3
lrwxrwxrwx 1 root root 18 Aug  9 19:18 /etc/alternatives/python3 -> /usr/bin/python3.9

the build system always picks up the newer python3.9 on a rebuild even when originally configured to use python 3.6. i.e.

./do_cmake.sh -DWITH_PYTHON3=3.6 ...

By rebuild I mean that the first build succeeds but if the HEAD commit sha1 changes, the rebuild will pick up the new python3 when regenerating cmake. This causes build failures like:

CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3: Found unsuitable version "3.9.13", but required is
  exact version "3.6" (found /usr/bin/python3, found components: Interpreter)
Actions #1

Updated by Kefu Chai 9 months ago

By rebuild I mean that the first build succeeds but if the HEAD commit sha1 changes, the rebuild will pick up the new python3 when regenerating cmake. This causes build failures like:

[...]

hi Patrick, instead of pasting the snippet of the error, could you please provide the whole output of the CMake?

Actions #2

Updated by Kefu Chai 9 months ago

  • Status changed from New to Need More Info
Actions #3

Updated by Kefu Chai 9 months ago

  • Status changed from Need More Info to In Progress
Actions #4

Updated by Kefu Chai 9 months ago

  • Assignee set to Kefu Chai
Actions #5

Updated by Kefu Chai 9 months ago

  • Status changed from In Progress to Fix Under Review
Actions #6

Updated by Kefu Chai 9 months ago

  • Pull request ID set to 52984
Actions #7

Updated by Patrick Donnelly 7 months ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF