-
Notifications
You must be signed in to change notification settings - Fork 795
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Python bindings do not build (linker errors) #1261
Comments
@mikesheffler and I spent a lot of time on Windows compilation, but there is still a lot of work to do. I might have cycles for this after the ICRA deadline... |
Thanks, sounds good! One thing I forgot to mention is that we only tried with the last release (4.1.1), not with the latest commit on develop where some fixes might have landed. |
I've been solidly on the Linux side since February**, but I can do some test building on Windows as another data point, if that is helpful. I updated VS 2019 and pulled the What would actually be helpful for me to do? Should I try to replicate @Tobias-Fischer 's setup or try something else? ** It looks like #1087 is still open. I'm not sure if I still owe anything on that issue? I just kind of wandered off when #1107 landed, and I'm not sure what remains to be done. |
Hiya - I'm just wondering whether you had any time to look into this? |
I'll definitely look into this. @mattking-smith and I were talking about the wrapper on Windows so I have motivation. :) |
Yeah, I definitely have lots of interest from sponsors using |
I'm encountering similar issues both for the python and matlab wrappers. In VisualStudio2019, the project gtsam builds successfully, but not gtsam_py
or gtsam_matlab_wrapper
Just added PR #1514 which should address 1.2 under original post "Steps to reproduce." Small victory. |
Check my comment here if you still experience the long build times on Windows #1216 (comment) |
We have now managed to build the Python bindings on Windows. We still need a few patches (see https://github.com/conda-forge/gtsam-feedstock/tree/main/recipe), but I think most of the issues have been addressed in the |
Description
Steps to reproduce
1.1 Basically the problem is that on Linux people rename to the same name different libraries because they have different suffix (like .a vs .so for static vs shared, or .pysomething vs .so for Python vs shared C++). However, on Windows when you build a shared library you create both a name.lib and a name.dll, so if you have a static and shared library with the same name, that results in a collision. Similalry, if you have a name.dll and name.pyd (C++ and Python), both will also generate a name.lib that will result in a collision. See pantor/ruckig#18. (Credits to @traversaro)
1.2 The cmake command
configure_file(${test_file} "${GTSAM_UNSTABLE_MODULE_PATH}/tests/${test_file}" COPYONLY)
leads to a syntax error on Windows for some reason. I am not sure why, for testing I simply commented it out.2. Build gtsam with
GTSAM_BUILD_PYTHON=ON
on Windows3. Observe linker errors (just a few listed here; build.log):
Expected behavior
Build should succeed, and I should be able to
import gtsam
in a Windows python environment without issues.Environment
Windows with VS2019 on conda-forge. I expect this to happen on any Windows machine, but I have not confirmed this. Full build commands:
Additional information
See conda-forge/gtsam-feedstock#8 where we are able to build gtsam (including gtsam-unstable) successfully, but fail building with python bindings enabled.
The text was updated successfully, but these errors were encountered: