-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Installing GTSAM in combination with RoboStack ROS Noetic on Windows 10 #25
Comments
This is unfortunately a recurrent problem with robostack packages. conda-forge has ABI migration occuring regularly (https://conda-forge.org/blog/2019/12/06/cfep09/), but at robostack at the moment we only do periodic rebuilds, that however use the version of dependencies used in conda-forge packages built at the moment we did the rebuild (as you noticed, currently libboost 1.82, see https://github.com/RoboStack/ros-noetic/blob/7f743314408fbaea5701b8f09193e11136b9b899/additional_recipes/ros-distro-mutex/recipe.yaml#L33). The "proper" solution is to do a rebuild with updated libboost pinning set to 1.84, but that takes time. Other solutions involve separating gtsam and ros code in two separated conda environment, and make them communicate over some kind of non-ROS IPC. Yes another workaround is to compile gtsam from source. However, as the boost 1.84 migration is still ongoing (see https://conda-forge.org/status/migration/boost1840) probably at least for gtsam we can do a dual 1.82/1.84 . Doing this for all packages it is not sustainable but for this specific case I do not think it is particularly problematic. |
Ok, one step back as I may be a bit confused.
If this is issue was fixed in borglab/gtsam#1685, how is this related to gtsam 4.2.0 that was released several months before borglab/gtsam#1685 was merged? Can you try if you see the same problem with gtsam-4.2.0===_4 ? Thanks! |
Thanks for your response and the explanation. I will check again tomorrow as I don't have my PC but I am quite certain that the behavior is already fixed in |
If that is the case, then a rebuild against liboost 1.82 will not help. |
Just to double check, can you check if you can install suitesparse==7 with the packages you need? If you can't, again the rebuild in #26 will not be useful for you. |
|
I do not see any specific problem that could emerge. There are a bunch of patches in https://github.com/conda-forge/gtsam-feedstock/tree/main/recipe, but hopefully they are superseded in master thanks to the PR borglab/gtsam#1685, so a good attempt would just to try to compile the master version as it is is. You can get inspiration from the https://github.com/conda-forge/gtsam-feedstock/blob/main/recipe/bld.bat script, just make sure that you use
To be honest, I am not sure about that. Not sure if I am missing anything, but issue does not seem to be related to boost. |
Okay, so #26 should be closed then. |
Those instructions seems fine, the only thing that is important is not to install any dependency with pip, but rather use conda to install the dependencies listed in https://github.com/conda-forge/gtsam-feedstock/blob/main/recipe/meta.yaml#L30-L53 . Note that instead of the compilers macros, you can just use the |
I just tested your script, and it is failing with the reported error with the following environment:
Also installing python==3.11.* it still fails. @hmaarten can you please report the exact environment in which the test is working? Thanks! |
Hmm, I just realized that it indeed only works with build
The main difference seems to be the version of |
On another note, I tried to build gtsam from source using changes in borglab/gtsam/#1685. I tried two approaches
However, here already
The subcomponents are all present in the environments Library/include and Library/lib folder, respectively. So not sure what to do with that. Here I did not understand exactly what to do with
Could you elaborate on that?
This approach almost works, however when I try to import gtsam it throws
I found a similar issue here #19, and the workaround is included in the https://github.com/conda-forge/gtsam-feedstock/blob/main/recipe/bld.bat file with So currently I am a bit stuck with both approaches. Any additional inputs would be appreciated. |
I reproduced the problem in CI in #26 . Let's just backport the patch and if that works and live happy. |
Please, always include the exact error that you are experiencing, not a recap. The exact errors are important to provide you feedback. |
conda-build works with two environments, a build and host environment. If you do a local build, you just have an environment, pointed by |
Yes, that is the reason. VS is a so-called multiple config generator, while |
Here a more detailed description of approach 1: Made a gtsam_build env with the following packages:
Cloned
Then the output from cmake is
I tried copying the |
Can you try to set
Any change w.r.t. to what? |
Changed it now to
which did not change anything of the cmake output (still boost error). Same goes for adding flag -DCMAKE_PREFIX_PATH=%LIBRARY_PREFIX% or -DCMAKE_PREFIX_PATH=%CONDA_PREFIX%.
As in the circular import issue
remains. Using ninja instead for the build outside of anaconda, i.e., changing
to
yields
so indicating again a Thanks for your continued support, I much appreciate it. If the patch that you suggest in #26 actually works (from what I can see it does), I'd be very happy with that and the issue can be closed from my side. |
Problem is fixed for me with the latest build #26 , thanks a lot! |
Comment:
I aim to implement a ROS package in Python that lives completely within an Anaconda environment on a Windows computer (we have some other software that must run on Windows). I have been using RoboStack ROS Noetic to implement the ROS side of things. Additionally, I require GTSAM in one of my ros nodes. After having installed ROS using
mamba install ros-noetic-desktop
I install GTSAM usingmamba install gtsam
which does work, however, it installs versiongtsam-4.2.0-py311h669d342_3
which is not the latest build. When running the following snippet of code (minimal reproducible example)the following error is thrown:
This is a known issue and was fixed in this pull request. Indeed, when installing the latest build of GTSAM (
gtsam-4.2.0-py311hdd3dd35_5
) no error is thrown for the upper code snippet. However, this version is incompatible withmamba install ros-noetic-desktop
, as versions oflibboost
1.82 and 1.84 collide.What could be a workaround to ensure compatibility? Should GTSAM be rebuilt for
libboost 1.82
, while still incorporating the changes of the above-mentioned pull request? Or is there a combination of versions that is compatible with my requirements and does not throw this error? I have tried installing only a subset of the ROS package, but that didn't work. Also, trying other Python versions yielded no success as ROS Noetic is only built for Python 3.11 as it seems. Any help would be appreciated as I am not well versed with package building usingconda-forge
.The text was updated successfully, but these errors were encountered: