Skip to content

cmake/modules: always use the python3 specified in command line#45916

Merged
djgalloway merged 1 commit intoceph:masterfrom
tchaikov:wip-python3
Apr 19, 2022
Merged

cmake/modules: always use the python3 specified in command line#45916
djgalloway merged 1 commit intoceph:masterfrom
tchaikov:wip-python3

Conversation

@tchaikov
Copy link
Contributor

if another python3 with higher version is found by
find_package(Python3), the cmake's install script would just
install the python modules/extensions into that python3's
dist-package directory, and the packaging script would fail
to find these artifacts when trying to package them.

so we need to ensure that the install directories for python
modeules/extensions are always "versioned" with WITH_PYTHON3
cmake option.

Signed-off-by: Kefu Chai tchaikov@gmail.com

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

if another python3 with higher version is found by
find_package(Python3), the cmake's install script would just
install the python modules/extensions into that python3's
dist-package directory, and the packaging script would fail
to find these artifacts when trying to package them.

so we need to ensure that the install directories for python
modeules/extensions are always "versioned" with WITH_PYTHON3
cmake option.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
@tchaikov
Copy link
Contributor Author

this change should address the packaging failure at https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos8,DIST=centos8,MACHINE_SIZE=gigantic/62075//consoleFull

error: File not found: /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11639-g5a2a646b/rpm/el8/BUILDROOT/ceph-17.0.0-11639.g5a2a646b.el8.x86_64/usr/lib/python3.6/site-packages/cephfs_top-*.egg-info

@tchaikov
Copy link
Contributor Author

@djgalloway djgalloway merged commit a9d5958 into ceph:master Apr 19, 2022
@djgalloway
Copy link
Contributor

Does this need to get backported now too?

@tchaikov
Copy link
Contributor Author

tchaikov commented Apr 20, 2022

@djgalloway yup. to ensure the build is repeatable on building host which happens to have non-offical python version installed. just created

@djgalloway
Copy link
Contributor

Miss you so much ❤️

@djgalloway
Copy link
Contributor

Could this PR possibly be causing (or does it fix):


-- Performing Test HAS_WARNING_PESSIMIZING_MOVE
-- Performing Test HAS_WARNING_PESSIMIZING_MOVE - Success
CMake Error at cmake/modules/FindCython.cmake:13 (message):
  Could not find cython: /usr/bin/python3.8: No module named cython

Call Stack (most recent call first):
  src/pybind/CMakeLists.txt:5 (find_package)


CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Cython (missing: CYTHON_VERSION)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindCython.cmake:16 (find_package_handle_standard_args)
  src/pybind/CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11737-g10090b63/rpm/el8/BUILD/ceph-17.0.0-11737-g10090b63/x86_64-redhat-linux-gnu/CMakeFiles/CMakeOutput.log".
See also "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11737-g10090b63/rpm/el8/BUILD/ceph-17.0.0-11737-g10090b63/x86_64-redhat-linux-gnu/CMakeFiles/CMakeError.log".
error: Bad exit status from /var/tmp/rpm-tmp.YBHbYI (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.YBHbYI (%build)
+ rm -fr /tmp/install-deps.2297837
Build step 'Execute shell' marked build as failure

https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos8,DIST=centos8,MACHINE_SIZE=gigantic/62167/

1 similar comment
@djgalloway
Copy link
Contributor

Could this PR possibly be causing (or does it fix):


-- Performing Test HAS_WARNING_PESSIMIZING_MOVE
-- Performing Test HAS_WARNING_PESSIMIZING_MOVE - Success
CMake Error at cmake/modules/FindCython.cmake:13 (message):
  Could not find cython: /usr/bin/python3.8: No module named cython

Call Stack (most recent call first):
  src/pybind/CMakeLists.txt:5 (find_package)


CMake Error at /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Cython (missing: CYTHON_VERSION)
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindCython.cmake:16 (find_package_handle_standard_args)
  src/pybind/CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
See also "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11737-g10090b63/rpm/el8/BUILD/ceph-17.0.0-11737-g10090b63/x86_64-redhat-linux-gnu/CMakeFiles/CMakeOutput.log".
See also "/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11737-g10090b63/rpm/el8/BUILD/ceph-17.0.0-11737-g10090b63/x86_64-redhat-linux-gnu/CMakeFiles/CMakeError.log".
error: Bad exit status from /var/tmp/rpm-tmp.YBHbYI (%build)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.YBHbYI (%build)
+ rm -fr /tmp/install-deps.2297837
Build step 'Execute shell' marked build as failure

https://jenkins.ceph.com/job/ceph-dev-new-build/ARCH=x86_64,AVAILABLE_ARCH=x86_64,AVAILABLE_DIST=centos8,DIST=centos8,MACHINE_SIZE=gigantic/62167/

@tchaikov
Copy link
Contributor Author

tchaikov commented Apr 20, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants