summaryrefslogtreecommitdiffstats
path: root/cmake/modules/Distutils.cmake
diff options
context:
space:
mode:
authorKefu Chai <tchaikov@gmail.com>2022-08-05 10:40:41 +0200
committerKefu Chai <tchaikov@gmail.com>2022-08-05 14:07:02 +0200
commit5824fed5b427f1d055fb7104fea2e68cd36e6844 (patch)
tree41398a47da3f95b5889cbdc0c21a0b8ad2294097 /cmake/modules/Distutils.cmake
parentMerge pull request #47470 from tchaikov/wip-win32-silence-warning (diff)
downloadceph-5824fed5b427f1d055fb7104fea2e68cd36e6844.tar.xz
ceph-5824fed5b427f1d055fb7104fea2e68cd36e6844.zip
cmake: remove spaces in macro used for compiling cython code
we are facing following FTBFS on jammy + GCC-11.2 + Cython 0.29 + CMake 3.22: creating /home/jenkins-build/build/workspace/ceph-api/build/lib/cython_modules/temp.linux-x86_64-3.10/home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs compile options: '-I/usr/include/python3.10 -I/usr/include/python3.10 -c' extra options: '-Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -iquote/home/jenkins-build/build/workspace/ceph-api/src/include -w -Dvoid0=dead_function(void) -D__Pyx_check_single_interpreter(ARG)=ARG ## 0 -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2' cc: /home/jenkins-build/build/workspace/ceph-api/build/src/pybind/cephfs/cephfs.c cc: warning: ##: linker input file unused because linking not done cc: error: ##: linker input file not found: No such file or directory cc: warning: 0: linker input file unused because linking not done cc: error: 0: linker input file not found: No such file or directory it seems cython is not able to escape the space in the "extra options" anymore, so the "##" and "0" are considered as object files passed to compiler in addition to cephfs.c. in this change the spaces are removed to help cython to make the right decision. Signed-off-by: Kefu Chai <tchaikov@gmail.com>
Diffstat (limited to 'cmake/modules/Distutils.cmake')
-rw-r--r--cmake/modules/Distutils.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
index 192c8c3efe2..daaae4ba63f 100644
--- a/cmake/modules/Distutils.cmake
+++ b/cmake/modules/Distutils.cmake
@@ -69,7 +69,7 @@ function(distutils_add_cython_module target name src)
# This little bit of magic wipes out __Pyx_check_single_interpreter()
# Note: this is reproduced in distutils_install_cython_module
list(APPEND PY_CPPFLAGS -D'void0=dead_function\(void\)')
- list(APPEND PY_CPPFLAGS -D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0')
+ list(APPEND PY_CPPFLAGS -D'__Pyx_check_single_interpreter\(ARG\)=ARG\#\#0')
set(PY_CC ${compiler_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1})
set(PY_CXX ${compiler_launcher} ${CMAKE_CXX_COMPILER} ${cxx_compiler_arg1})
set(PY_LDSHARED ${link_launcher} ${CMAKE_C_COMPILER} ${c_compiler_arg1} "-shared")
@@ -128,7 +128,7 @@ function(distutils_install_cython_module name)
set(ENV{LDSHARED} \"${PY_LDSHARED}\")
set(ENV{CPPFLAGS} \"-iquote${CMAKE_SOURCE_DIR}/src/include
-D'void0=dead_function\(void\)' \
- -D'__Pyx_check_single_interpreter\(ARG\)=ARG \#\# 0' \
+ -D'__Pyx_check_single_interpreter\(ARG\)=ARG\#\#0' \
${CFLAG_DISABLE_VTA}\")
set(ENV{LDFLAGS} \"-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
set(ENV{CYTHON_BUILD_DIR} \"${CMAKE_CURRENT_BINARY_DIR}\")