Skip to content

pybind/cephfs: fix including of platform_errno.h - #65839

Merged
batrick merged 1 commit into
ceph:mainfrom
rishabh-d-dave:cephfs-pybind-types
Oct 10, 2025
Merged

batrick merged 1 commit into
ceph:mainfrom
rishabh-d-dave:cephfs-pybind-types

Conversation

@rishabh-d-dave

@rishabh-d-dave rishabh-d-dave commented Oct 8, 2025 •

Copy link
Copy Markdown
Contributor

Without this we see build fail with following error -

Compiling cephfs.pyx because it changed.
[1/1] Cythonizing cephfs.pyx
running build
running build_ext
building 'cephfs' extension
creating /home/jenkins-build/build/workspace/ceph-api/build/lib/cython_modules/temp.linux-x86_64-cpython-312/home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs
/usr/bin/clang-19 -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -iquote/home/jenkins-build/build/workspace/ceph-api/src/include -w -Dvoid0=dead_function(void) -D__Pyx_check_single_interpreter(ARG)=ARG##0 -fPIC -I/usr/include/python3.12 -I/usr/include/python3.12 -c /home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs/cephfs.c -o /home/jenkins-build/build/workspace/ceph-api/build/lib/cython_modules/temp.linux-x86_64-cpython-312/home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs/cephfs.o -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -iquote/home/jenkins-build/build/workspace/ceph-api/src/include -w -Dvoid0=dead_function(void) -D__Pyx_check_single_interpreter(ARG)=ARG##0 -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall
/home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs/cephfs.c:1271:10: fatal error: '../../include/platform_errno.h' file not found
 1271 | #include "../../include/platform_errno.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang-19' failed with exit code 1

With this the build passes -

Compiling cephfs.pyx because it depends on types.pxd.
[1/1] Cythonizing cephfs.pyx
running build
running build_ext
building 'cephfs' extension
/usr/lib64/ccache/gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -O3 -iquote/home/rishabh/repos/ceph/vols-rmtree/src/include -w -Dvoid0=dead_function(void) -D__Pyx_check_single_interpreter(ARG)=ARG##0 -fPIC -I/usr/include/python3.13 -I/usr/include/python3.13 -c /home/rishabh/repos/ceph/vols-rmtree/build/src/pybind/cephfs/cephfs.c -o /home/rishabh/repos/ceph/vols-rmtree/build/lib/cython_modules/temp.linux-x86_64-cpython-313/home/rishabh/repos/ceph/vols-rmtree/build/src/pybind/cephfs/cephfs.o -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -O3 -iquote/home/rishabh/repos/ceph/vols-rmtree/src/include -w -Dvoid0=dead_function(void) -D__Pyx_check_single_interpreter(ARG)=ARG##0 -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -O3
/usr/lib64/ccache/gcc -shared -L/home/rishabh/repos/ceph/vols-rmtree/build/lib -iquote/home/rishabh/repos/ceph/vols-rmtree/src/include -w -Dvoid0=dead_function(void) -D__Pyx_check_single_interpreter(ARG)=ARG##0 /home/rishabh/repos/ceph/vols-rmtree/build/lib/cython_modules/temp.linux-x86_64-cpython-313/home/rishabh/repos/ceph/vols-rmtree/build/src/pybind/cephfs/cephfs.o -L/usr/lib64 -L/usr/lib64/python3.13/config-3.13-x86_64-linux-gnu -L/usr/lib64 -lcephfs -ldl -lm -o /home/rishabh/repos/ceph/vols-rmtree/build/lib/cython_modules/lib.3/cephfs.cpython-313-x86_64-linux-gnu.so

$ git diff
diff --git a/src/pybind/cephfs/types.pxd b/src/pybind/cephfs/types.pxd
index d59664ec07c..afbeec6b597 100644
--- a/src/pybind/cephfs/types.pxd
+++ b/src/pybind/cephfs/types.pxd
@@ -56,6 +56,6 @@ ELSE:
             unsigned char d_type
             char d_name[256]

-cdef extern from "../../include/platform_errno.h":
+cdef extern from "../include/platform_errno.h":
     ctypedef signed int int32_t;
     int32_t ceph_to_hostos_errno(i

Introduced-by: 2439bcb
Fixes: https://tracker.ceph.com/issues/73435

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

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

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@vshankar

vshankar commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Didn't we see this build failure in #65135 ?

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@rishabh-d-dave

rishabh-d-dave commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor Author

Didn't we see this build failure in #65135 ?

CI should've caught the build error but strangely it didn't.

@vshankar

vshankar commented Oct 9, 2025

Copy link
Copy Markdown
Contributor

Didn't we see this build failure in #65135 ?

CI should've failed but strangely it didn't.

I guess the build fails only with clang?

@rishabh-d-dave

rishabh-d-dave commented Oct 9, 2025 •

Copy link
Copy Markdown
Contributor Author

Didn't we see this build failure in #65135 ?

CI should've failed but strangely it didn't.

I guess the build fails only with clang?

Locally it failed with g++ for me. I don't have clang installed.

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@chrisphoffman chrisphoffman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've manually tested and the build passes with this patch and fails without.

lgtm

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins retest this please

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test docs

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

Changed SHA1, since doc CI job passes sometimes after it

@rishabh-d-dave

rishabh-d-dave commented Oct 10, 2025 •

Copy link
Copy Markdown
Contributor Author

@vshankar @chrisphoffman @batrick
The docs CI job is now failing for a relevant reason. And, unfortunately, the reason is exact opposite of build error -

      cephfs.c:1186:10: fatal error: ../include/platform_errno.h: No such file or directory
       1186 | #include "../include/platform_errno.h"
            |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]      

https://app.readthedocs.org/projects/ceph/builds/29892007/

@vshankar

Copy link
Copy Markdown
Contributor

The docs CI job is now failing for a relevant reason. And, unfortunately, the reason is exact opposite of build error -

I am not looking at this closely, but it seems that the include paths for RTD is what's causing the failure.

@rishabh-d-dave

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@batrick batrick left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the build is broken and this fixes it, let's merge. However, if @tchaikov thinks this approach is wrong then I trust his judgement; there should be a followup PR to fix it.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants