Skip to content
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

Fix MSVC linking for assimp and fcl #1510

Merged
merged 7 commits into from
Oct 17, 2020
Merged

Conversation

traversaro
Copy link
Contributor

This PR fixes the linking of tests that use fcl and assimp on MSVC, hopefully fixing the problems reported in gazebosim/gz-physics#87 (comment) .

As the existing code is working well in CI for non-MSVC platforms, and as support for CMake imported targets can vary depending on the platform (for example, assimp::assimp is basically broken in Ubuntu 20.04 apt packages: https://bugs.launchpad.net/ubuntu/+source/assimp/+bug/1882427 and robotology/idyntree#693), to minimize the possible regressions I just used the imported targets for fcl and assimp when using MSVC.

@traversaro
Copy link
Contributor Author

cc @scpeters

@traversaro
Copy link
Contributor Author

@jslee02 I don't know if you prefer this PR to target master or to target release-6.9 . I am currently targeting master as the CI on Windows in master seems to be under a better shape.

@traversaro
Copy link
Contributor Author

It seems that the vcpkg version on AppVeyor is quite old and does not contain the fcl 0.6 that was updated in March 2020: microsoft/vcpkg#10025 . I can add a fallback to the old logic, but I am afraid it would be broken that as well.

@traversaro
Copy link
Contributor Author

I just tried with the latest vcpkg and the configuration with fcl and assimp enabled works fine. @jslee02 do you think we can tag a new release in https://github.com/dartsim/vcpkg-build to get a new version of the dependencies?

@scpeters
Copy link
Collaborator

I tested this with ignition-physics3, and it fixes most of the linking errors, though it still fails to link to utf8cpp (which I believe comes from assimp gazebosim/gz-physics#87 (comment)). That may be an assimp problem; I'm not sure

@jslee02
Copy link
Member

jslee02 commented Oct 14, 2020

I am currently targeting master as the CI on Windows in master seems to be under a better shape.

master is fine

It seems that the vcpkg version on AppVeyor is quite old and does not contain the fcl 0.6 that was updated in March 2020: microsoft/vcpkg#10025 . I can add a fallback to the old logic, but I am afraid it would be broken that as well.

Please ignore the AppVeyor build for now. It needs to use dartsim/vcpkg-build to be consistent with the GitHub Actions.

@jslee02 do you think we can tag a new release in dartsim/vcpkg-build to get a new version of the dependencies?

A new version is published for vcpkg 2020.07, which is the latest version.

Please change the below line to v0.2.0-2020.07 to use the new version.

VCPKG_BUILD_TAG: v0.1.1

Let me know if vcpkg 2020.07 is still too old.

@scpeters
Copy link
Collaborator

I tested this with ignition-physics3, and it fixes most of the linking errors, though it still fails to link to utf8cpp (which I believe comes from assimp ignitionrobotics/ign-physics#87 (comment)). That may be an assimp problem; I'm not sure

this was fixed by microsoft/vcpkg#14061

scpeters
scpeters previously approved these changes Oct 15, 2020
Copy link
Collaborator

@scpeters scpeters left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this works for ignition-physics3

@traversaro
Copy link
Contributor Author

Let me know if vcpkg 2020.07 is still too old.

Unfortunately there were a few bugs in vcpkg ports that were fixed only recently (latest PR: microsoft/vcpkg#14061), so probably generating a new archive against a new commit of vcpkg may be the simpler solution, and then switch to a new release of vcpkg once they do one (unfortunately vcpkg release are not really regular). In robotology/robotology-superbuild-dependencies-vcpkg#32 I am using microsoft/vcpkg@70f192e and it seems to be a good commit without anything strange.

@jslee02
Copy link
Member

jslee02 commented Oct 16, 2020

New build for microsoft/vcpkg@70f192e is released. You could use VCPKG_BUILD_TAG: v0.2.0-70f192e once https://github.com/dartsim/vcpkg-build/runs/1265369776?check_suite_focus=true is done

@traversaro
Copy link
Contributor Author

New build for microsoft/vcpkg@70f192e is released. You could use VCPKG_BUILD_TAG: v0.2.0-70f192e once https://github.com/dartsim/vcpkg-build/runs/1265369776?check_suite_focus=true is done

Great!

@codecov
Copy link

codecov bot commented Oct 16, 2020

Codecov Report

Merging #1510 into master will decrease coverage by 0.03%.
The diff coverage is 11.11%.

@@            Coverage Diff             @@
##           master    #1510      +/-   ##
==========================================
- Coverage   58.20%   58.17%   -0.04%     
==========================================
  Files         412      414       +2     
  Lines       29913    30008      +95     
==========================================
+ Hits        17412    17456      +44     
- Misses      12501    12552      +51     
Impacted Files Coverage Δ
dart/collision/CollisionResult.cpp 70.73% <0.00%> (ø)
dart/constraint/BoxedLcpConstraintSolver.cpp 53.00% <0.00%> (ø)
dart/dynamics/PyramidShape.hpp 0.00% <0.00%> (ø)
dart/dynamics/Skeleton.hpp 83.33% <ø> (ø)
dart/collision/fcl/FCLCollisionDetector.cpp 85.62% <2.85%> (-4.01%) ⬇️
dart/dynamics/PyramidShape.cpp 6.25% <6.25%> (ø)
dart/utils/SkelParser.cpp 66.66% <14.28%> (-0.39%) ⬇️
dart/dynamics/Skeleton.cpp 66.22% <100.00%> (+0.05%) ⬆️
dart/dynamics/detail/GenericJoint.hpp 75.47% <100.00%> (+0.03%) ⬆️
... and 6 more

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants