-
Notifications
You must be signed in to change notification settings - Fork 767
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
boost libraries fix #132
boost libraries fix #132
Conversation
…h debug and release mode
@mbway I'm curious if the former version of that messy part of the CMake script would work in your case. a0fce42#diff-af3b638bc2a3e6c650974192a53c7291R148-R166 that is, using:
and:
and so on (check the diff in the link above). It's a way shorter and more readable solution, but we had to roll it back for the reasons explained in the code comments. Whatever is your result, please also report what's your version of Boost and CMake, since it all depends on new-enough versions of both of them. |
Any idea why are we including debug libraries in a release build? |
@ProfFan :
What do you mean? The list of "debug" and "optimized" libraries used in cmake actually is interpreted by cmake such that only one of the sets is used depending on CMAKE_BUILD_TYPE. |
I see. Seems that we have not checked the nullity of these variables. |
LGTM. But still I can't see a problem with IMPORTED targets like |
The problem was that if a user has a version of Boost newer than the latest version "known" by its CMake's An alternative could be, perhaps, importing the latest FindBoost.cmake from CMake master branch into the gtsam repo. More work to maintain and keep that file up-to-date, but the alternative is actually not much better... having to fight against all kind of problems like the one you tried to solve with this PR. What's your opinion about that alternative solution? @dellaert , @varunagrawal ?? PS: Bottom line problem is, actually IMHO, that Boost doesn't want to use CMake, so they don't provide proper exported cmake targets in their packages. But that's out of our control. |
The versions I'm using:
using |
Ok, I'll open a new PR reverting a0fce42 and including the latest FindBoost.cmake to prevent problems in users with older cmake versions, and let's move the discussion there... I will like @chrisbeall to test that version, since he had problems with the So, let's close this PR... |
@jlblancoc sorry to comment on an old thread but i didn't want to open a new issue. When moving from GTSAM 4.0.2 to 4.0.3, I could not compile my ROS code due to following error:
I am on:
I applied all the changes mentioned in this COMMIT to the CMakeLists.txt of 4.0.3 and the code compiles again. I understand the issue of cmake vs boost version finding each other but I am not sure what is the correct solution here. Any suggestion/advice how to resolve this would be appreciated. Thank you |
248971868 Merge pull request #132 from borglab/fix/matlab-wrapper 157fad9e5 fix where generation of wrapper files takes place f2ad4e475 update tests and fixtures 65e230b0d fixes to get the matlab wrapper working git-subtree-dir: wrap git-subtree-split: 24897186873c92a32707ca8718f7e7b7dbffc589
I encountered a problem when building gtsam and linking with boost installed through anaconda, because it seems that none of the debug libraries were available in that package. This was OK because I was building in release mode, however because the
Boost_*_LIBRARY_DEBUG
symbols were all empty, theGTSAM_BOOST_LIBRARIES
variable ended up beingoptimized;<library>;optimized;<library>......;debug;debug;debug;debug
which is invalid syntax becausedebug
andoptimized
has to immediately be followed by a path. It is also invalid to have a danglingdebug
oroptimized
at the end of the string.I don't think my fix is optimal, but it does work.
This change is