-
Notifications
You must be signed in to change notification settings - Fork 287
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
Submit DART port to vcpkg #1005
Comments
I am trying to follow the instructions for the installation and the tutorials under windows MSVC 2017. I managed to install all the dependencies with vcpkg and to build the library. Unfortunatelly I did not manage to run the examples yet. After setting the compiler flag -permissive-, the tutorial code for the pendulum is compiled, but crashes on execution. I would appreciate more detailed instructions on how to use DART on windows and think that a vcpkg integration would be very helpful! |
Currently trying to do that. Dart does not mark its exports with __declspec(dllexport) as windows requires. I use the cmake option WINDOWS_EXPORT_ALL_SYMBOLS to generate an .def to work around that. However in this case the dart.dll has more than 65535 symbols. And this is not supported by msvc compiler (LNK1189) https://msdn.microsoft.com/en-us/library/aa234479(v=vs.60).aspx Most of the symbols result from eigen3 header only library. Maybe upcoming solution I proposed at cmake: https://gitlab.kitware.com/cmake/cmake/issues/17841 |
@Fleischner Thanks for working on this. A straightforward solution would be that DART marks |
I've been meaning to recommend that DART use |
@smartcam3d Let me try to reproduce the problem when I have a chance. Issue #1039 created to track the problem. |
I didn't know about GenerateExportHeader. This is of course a better solution. |
In the meantime, it should still be possible to use DART as a static library. Is vcpkg able to support libraries that can only be built as static libraries? |
Yes it is. It can even mix. When vcpkg calls darts cmake file it passes in BUILD_SHARED_LIBS variable. You can build static on shared by overriden the variable. As default there is shared and static builds. For DART this would be e.g: |
Short update: Another library (ompl) that currently runs into the 65535 symbol limit will hopefully also apply this approach: https://bitbucket.org/ompl/ompl/issues/386/mark-all-dll-exports-with-cmakes |
@Fleischner #1040 is created to explicitly specify which API to be exposed as discussed above. Anyone knows how to count the number of symbols of a shared library? I would like to see the difference so that I'm sure #1040 is worthwhile. 😄 |
@jslee02 . Wow that was fast 👍 For counting there is sure an clean way to do this. I found at least an 'ugly' one yesterday: build with cmake and set -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS. You will get an .def file with as many lines as symbols. If I remeber correctly dart had around 90k. |
Building with #1040 G:\code\vcpkg\buildtrees\dart\src\dart-build-visibility\dart/common/AspectWithVersion.hpp(55): error C2668: 'dart::common::detail::AspectWithVersionedProperties<dart::common::CompositeTrackingAspect,DerivedT,PropertiesDataT,CompositeT,void dart::common::detail::NoOp<DerivedT*>(DerivedT )>::AspectWithVersionedProperties': ambiguous call to overloaded function |
And there are countless warnings C4251: needs to have dll-interface to be used by clients of class. So best to disable this warning. Most of these C4251 derive from std:: and eigen3:: (if these types are members of classes that are exported, even if members are private). This is a general problem with c++. But as far as I understand C4251 is no problem here. Std:: should be fine as long as respecting the general requirements of building everything with the exact matching compiler version against the same standard library. And eigen3 should be fine as it is header only. The question is how to easily find the C4251 that are triggered by missing exports in dart? There is a new filter option in visual studio to silence warnings be external headers. Maybe this helps. I need to try this. |
Yes, this is possible by starting the port with |
Some random issues I found blocking/nice to have for the vcpkg port:
|
Done in microsoft/vcpkg#13356 . |
As microsoft/vcpkg#13320 has been merged, |
Awesome! Thank you for your effort on this matter, @traversaro! Let me review #1497 soon. |
As most of the dependencies of DART are added to vcpkg, it would be good to submit DART port to vcpkg as well so that the users on Windows can easily install DART using the package manager.
The text was updated successfully, but these errors were encountered: