From 8157e6a483b72a6278606ebf5c53f2fae414e734 Mon Sep 17 00:00:00 2001 From: Aaron Miller <78561124+aaron-skydio@users.noreply.github.com> Date: Fri, 20 Dec 2024 21:18:50 -0800 Subject: [PATCH 1/2] Fix build with spaces Building symenginepy as part of the SymForce build, I get an error currently if I try to build under a source directory with a space in the path: ``` [100%] Linking CXX shared library symengine_wrapper.cpython-38-x86_64-linux-gnu.so c++: error: test/build/symenginepy-prefix/src/symenginepy-build/build/lib.linux-x86_64-cpython-38/symengine/lib/version_script_symengine_wrapper.txt: No such file or directory make[5]: *** [symengine/lib/CMakeFiles/symengine_wrapper.dir/build.make:121: symengine/lib/symengine_wrapper.cpython-38-x86_64-linux-gnu.so] Error 1 make[4]: *** [CMakeFiles/Makefile2:132: symengine/lib/CMakeFiles/symengine_wrapper.dir/all] Error 2 make[3]: *** [Makefile:136: all] Error 2 error: error building project make[2]: *** [CMakeFiles/symenginepy.dir/build.make:86: symenginepy-prefix/src/symenginepy-stamp/symenginepy-build] Error 1 ``` This change seems to fix that. I'm not 100% sure in what scenarios this applies to a standalone build of symengine? But I figured I'd open a PR and propose this change Coming from here on the SymForce repo: https://github.com/symforce-org/symforce/pull/414 --- cmake/FindPython.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/FindPython.cmake b/cmake/FindPython.cmake index 2f54f509..df8bfdc1 100644 --- a/cmake/FindPython.cmake +++ b/cmake/FindPython.cmake @@ -130,7 +130,7 @@ macro(ADD_PYTHON_LIBRARY name) configure_file(${CMAKE_SOURCE_DIR}/cmake/version_script.txt ${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt @ONLY) set_property(TARGET ${name} APPEND_STRING PROPERTY - LINK_FLAGS " -Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt") + LINK_FLAGS " \"-Wl,--version-script=${CMAKE_CURRENT_BINARY_DIR}/version_script_${name}.txt\"") ELSE() add_library(${name} SHARED ${ARGN}) ENDIF() From 0bc912b865cc4ce643011c92d93c9ffb7670c67a Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Sat, 21 Dec 2024 14:46:10 +0530 Subject: [PATCH 2/2] Fix CI --- bin/install_travis.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/install_travis.sh b/bin/install_travis.sh index 8176202d..572bb0d2 100644 --- a/bin/install_travis.sh +++ b/bin/install_travis.sh @@ -2,7 +2,7 @@ # symengine's bin/install_travis.sh will install miniconda -export conda_pkgs="python=${PYTHON_VERSION} pip 'cython>=0.29.24' pytest gmp mpfr" +export conda_pkgs="python=${PYTHON_VERSION} pip pytest gmp mpfr" if [[ "${WITH_NUMPY}" != "no" ]]; then export conda_pkgs="${conda_pkgs} numpy"; @@ -27,7 +27,7 @@ if [[ "${WITH_SAGE}" == "yes" ]]; then export conda_pkgs="${conda_pkgs} sage=8.1"; fi -conda install -q ${conda_pkgs} +conda install -q ${conda_pkgs} "cython>=0.29.24" if [[ "${WITH_SYMPY}" != "no" ]]; then pip install sympy;