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

fcl: add missing transitive_headers=True, CMP0077 #25381

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

valgur
Copy link
Contributor

@valgur valgur commented Sep 24, 2024

Summary

Changes to recipe: fcl/[*]

Motivation

Details


jcar87
jcar87 previously requested changes Sep 24, 2024
recipes/fcl/all/conanfile.py Show resolved Hide resolved
if self.options.with_octomap:
self.requires("octomap/1.9.7")
# Used in fcl/geometry/octree/octree.h
self.requires("octomap/1.9.7", transitive_headers=True, transitive_libs=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

none of these seem to require transitive_libs - eigen is a hader only library and for the other two headers mention, only types /macros seem to be required, but should cause no symbols to be directly required by the translation unit including this header - at least, not "indirectly".

Copy link
Contributor Author

@valgur valgur Sep 24, 2024

Choose a reason for hiding this comment

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

It's generally not worth the time and effort to dig into the finer points of transitive_libs=True/False for every minor library, IMO, although I don't mind setting it to False for clear header-only libs like Eigen or OctoMap.
It's very easy to miss uses of externally-defined symbols in the code and test_package usually tests a too narrow slice of the library to catch issues caused by transitive_libs=False.

Regarding Eigen specifically, though, it does have support for an optional SuiteSparse backend that could be well added in the future as an optional dependency, which is why I decided to keep it as True.

Anyway, I'll change it to False for Eigen and OctoMap.

Copy link
Contributor

@jcar87 jcar87 Sep 24, 2024

Choose a reason for hiding this comment

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

It's generally not worth the time and effort to dig into the finer points of transitive_libs=True/False for every minor library,

Thanks! We don't expect you to do it - we are very happy to do so as part of the review process so that we can orient this better to suit the recipe. transitive_libs=True can result in over-linking for shared libraries (consumers will unconditionally link against it). IIRC only the Linux distros where ld has --as-needed by default (or gcc is configured to pass it) are robust against this.

Situation:

  • foobar depends on fcl, fcl depends on octomap (foobar -> fcl -> octomap)

  • transitive_libs=True (fcl on octomap) will cause the foobar binary to record a dependency on octomap, uncondtionally, even when shared (except for the --as-needed case)

The two things we want to protect ourselves against:
When all are shared=True:

  • octomap is updated to a version where the minor component was updated (minor component -> source compatible, ABI compatible but may have new symbols). Because it is source compatible and foobar didnt change, there's no reason for foobar to be rebuilt or be aware of octomap at all. Conan won't trigger a rebuild - but if anything in the update changes, such as changing the .soname (which has unfortunately happened before in Conan center), foobar will be broken, even if fcl is successfully rebuilt.

When fcl is shared and octomap is static:

  • octomap symbols may end up in both fcl and the consumer (may being key here, will depend on the linker behaviour)
  • being able to mix/match and select which libraries are static and which arent - are a feature we know users do use, even if it's not the general case we expect.

We can probably lint/statically detect the correct cases here - I'll make sure we have hooks that can advise better.

@conan-center-bot

This comment has been minimized.

Copy link
Contributor

Hooks produced the following warnings for commit 8f60fb7
fcl/0.6.1@#888fcc68c9fe7dabb483acf0334498f2
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/shape_octree_distance_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/shape_mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/mesh_octree_distance_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
fcl/0.7.0@#814c14d3b69a30bdf79ead26bb5815fa
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/shape_octree_distance_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/shape_mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/mesh_octree_distance_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

@conan-center-bot

This comment has been minimized.

tc.variables["OCTOMAP_PATCH_VERSION"] = octomap_version.patch
tc.variables["BUILD_TESTING"] = False
tc.variables["FCL_NO_DEFAULT_RPATH"] = False
tc.cache_variables["OCTOMAP_MAJOR_VERSION"] = octomap_version.major
Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect these may need str() - the requirement to be json serializable may come from the fact that cache_variables end up in the generated presets file.

@conan-center-bot
Copy link
Collaborator

Conan v1 pipeline ✔️

All green in build 3 (3baf85d2fe4a35bbadb0590d7acb87e328d19da3):

  • fcl/0.7.0:
    Built 20 packages out of 22 (All logs)

  • fcl/0.6.1:
    Built 20 packages out of 22 (All logs)


Conan v2 pipeline ✔️

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 3 (3baf85d2fe4a35bbadb0590d7acb87e328d19da3):

  • fcl/0.7.0:
    Built 8 packages out of 10 (All logs)

  • fcl/0.6.1:
    Built 8 packages out of 10 (All logs)

Copy link
Contributor

Hooks produced the following warnings for commit 3baf85d
fcl/0.7.0@#28b233d6dab43a14515f616ba516a067
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/shape_octree_distance_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/shape_mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/mesh_octree_distance_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
fcl/0.6.1@#67b1beb5cfaecda71f9ada52dcbe13a1
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/shape_octree_distance_traversal_node.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/shape_mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/collision/mesh_continuous_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/distance/mesh_conservative_advancement_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/collision/mesh_octree_collision_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.
post_package(): WARN: [SHORT_PATHS USAGE (KB-H066)] The file './include/fcl/narrowphase/detail/traversal/octree/distance/mesh_octree_distance_traversal_node-inl.h' has a very long path and may exceed Windows max path length. Add 'short_paths = True' in your recipe.

# Used in fcl/common/types.h public header
self.requires("eigen/3.4.0", transitive_headers=True)
# Used in fcl/narrowphase/detail/convexity_based_algorithm/support.h
self.requires("libccd/2.1", transitive_headers=True, transitive_libs=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

As far as I can see - this still does not require transitive_libs to be unconditionally set to true, has this been verified?

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