Skip to content

Commit

Permalink
mgr: Define PY_SSIZE_T_CLEAN ahead of every Python.h
Browse files Browse the repository at this point in the history
Building on Fedora 35 with Python 3.10 makes vstart to loop
forever, throwing the following message:

 Error EINVAL: SystemError: PY_SSIZE_T_CLEAN macro must be
 defined for '#' formats

I followed the hint in the following document:
 https://docs.python.org/3/c-api/intro.html

It says "recommended" to always define PY_SSIZE_T_CLEAN,
but as you can see it is actually required in our case.

Fixes: https://tracker.ceph.com/issues/53441
Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
  • Loading branch information
Pete Zaitcev committed Dec 16, 2021
1 parent 6a1e2cb commit 3890548
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mgr/CMakeLists.txt
Expand Up @@ -33,6 +33,7 @@ if(WITH_MGR)
mgr_commands.cc
$<TARGET_OBJECTS:mgr_cap_obj>)
add_executable(ceph-mgr ${mgr_srcs})
target_compile_definitions(ceph-mgr PRIVATE PY_SSIZE_T_CLEAN)
if(WITH_LIBCEPHSQLITE)
target_link_libraries(ceph-mgr cephsqlite SQLite3::SQLite3)
endif()
Expand Down

0 comments on commit 3890548

Please sign in to comment.