no setup.py unless Release mode
When I compiled gtsam with RelWithDebInfo I got directories
gtsamRelWithDebInfo gtsam_eigency gtsam_unstableRelWithDebInfo
in the cython install directory, but no setup.py. Assigning @matt_broadway to comment and possibly fix.
Comments (7)
-
-
Is there a way to force CMake to not do this? I am currently affected by this and it is making debugging GTSAM with the Python wrapper impossible.
For now, I’ve just renamed the various directories and .so files, but there should be a better way.
-
reporter The “right way” is to fix the cmake scripts so it correctly generates and installs a debug version of the wrapper.
-
reporter @matt_broadway is this something you might be able to fix? I don’t know where to begin, but you seem to have a good grasp on it.
-
building with the latest develop, the
build/cython/gtsam
,build/cython/gtsam_unstable
andinstall/cython
directories don't seem to have the suffix anymore when compiling with-DCMAKE_BUILD_TYPE=RELWITHDEBINFO
, howeverbuild/cython/gtsamRelWithDebInfo.so
has the suffix so there is still a problem. I found that a flag is already offered which prevents the suffix from being added:-DGTSAM_BUILD_TYPE_POSTFIXES=OFF
. by default it isON
. (when set toOFF
everything works OK because the paths are exactly as they would be in release mode)is it desirable to have the python bindings work even when suffixes are present, or should they just be disabled when generating python bindings?
-
reporter Ah, well, that makes it easy I propose a little cmake check that turns off the postfixes if the matlab or cython wrappers are asked for, and tells the user about it at ccmake time.
-
reporter - changed status to resolved
Addressed in PR #430
- Log in to comment
there are other issues than just setup.py when compiling with
-DCMAKE_BUILD_TYPE=RELWITHDEBINFO
as well, and probably with any other build type with a suffix.The
setup.py
gets generated to the build directory, but if you try to import gtsam from the build directory it fails because__init__.py
is looking forgtsam.so
but the library gets namedgtsamRelWithDebInfo.so
.When running
make install
, the__init__.py
andsetup.py
get written toinstall/cythonRelWithDebInfo/gtsam
but the.pyx
and.so
files get written toinstall/cython/gtsamRelWithDebInfo
, probably because the paths are hard-coded incython/CMakeLists.txt