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

Add recipe for libgazebo-yarp-plugins package #21891

Merged
merged 34 commits into from
Mar 24, 2023

Conversation

traversaro
Copy link
Contributor

@traversaro traversaro commented Jan 28, 2023

gazebo-yarp-plugins is a library of plugins to interface the Gazebo Classic simulator with the YARP middleware.

The recipe name contains the lib prefix as requested in #19764 (review) for C/C++ libraries.

Checklist

  • Title of this PR is meaningful: e.g. "Adding my_nifty_package", not "updated meta.yaml".
  • License file is packaged (see here for an example).
  • Source is from official source.
  • Package does not vendor other packages. (If a package uses the source of another package, they should be separate packages or the licenses of all packages need to be packaged).
  • If static libraries are linked in, the license of the static library is packaged.
  • Package does not ship static libraries. If static libraries are needed, follow CFEP-18.
  • Build number is 0.
  • A tarball (url) rather than a repo (e.g. git_url) is used in your recipe (see here for more details).
  • GitHub users listed in the maintainer section have posted a comment confirming they are willing to be listed there.
  • When in trouble, please check our knowledge base documentation before pinging a team.

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I wanted to let you know that I linted all conda-recipes in your PR (recipes/gazebo-yarp-plugins) and found some lint.

Here's what I've got...

For recipes/gazebo-yarp-plugins:

  • Selectors are suggested to take a <two spaces>#<one space>[<expression>] form. See lines [32]

@conda-forge-webservices
Copy link

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipes/gazebo-yarp-plugins) and found it was in an excellent condition.

@traversaro
Copy link
Contributor Author

macOS is failing with:

2023-01-28T17:36:05.9420740Z In file included from $PREFIX/include/oneapi/tbb/flow_graph.h:167:
2023-01-28T17:36:05.9422200Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:126:7: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
2023-01-28T17:36:05.9423410Z class graph_task : public task {
2023-01-28T17:36:05.9423850Z       ^
2023-01-28T17:36:05.9425120Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:128:5: note: in implicit destructor for 'tbb::detail::d1::graph_task' first required here
2023-01-28T17:36:05.9426020Z     graph_task(graph& g, small_object_allocator& allocator
2023-01-28T17:36:05.9426520Z     ^
2023-01-28T17:36:05.9427900Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:126:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
2023-01-28T17:36:05.9428770Z class graph_task : public task {
2023-01-28T17:36:05.9429240Z       ^
2023-01-28T17:36:05.9430560Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:160:7: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
2023-01-28T17:36:05.9431670Z class priority_task_selector : public task {
2023-01-28T17:36:05.9432150Z       ^
2023-01-28T17:36:05.9433350Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:162:5: note: in implicit destructor for 'tbb::detail::d1::priority_task_selector' first required here
2023-01-28T17:36:05.9434370Z     priority_task_selector(graph_task_priority_queue_t& priority_queue, small_object_allocator& allocator)
2023-01-28T17:36:05.9434980Z     ^
2023-01-28T17:36:05.9436190Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:160:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
2023-01-28T17:36:05.9437090Z class priority_task_selector : public task {
2023-01-28T17:36:05.9437540Z       ^
2023-01-28T17:36:05.9437950Z 1 warning and 6 errors generated.
2023-01-28T17:36:05.9438440Z ninja: build stopped: subcommand failed.

So we need to bump the macOS version sdk to 10.14, so for now we just skip macOS.

@Tobias-Fischer
Copy link
Contributor

macOS is failing with:

2023-01-28T17:36:05.9420740Z In file included from $PREFIX/include/oneapi/tbb/flow_graph.h:167:
2023-01-28T17:36:05.9422200Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:126:7: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
2023-01-28T17:36:05.9423410Z class graph_task : public task {
2023-01-28T17:36:05.9423850Z       ^
2023-01-28T17:36:05.9425120Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:128:5: note: in implicit destructor for 'tbb::detail::d1::graph_task' first required here
2023-01-28T17:36:05.9426020Z     graph_task(graph& g, small_object_allocator& allocator
2023-01-28T17:36:05.9426520Z     ^
2023-01-28T17:36:05.9427900Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:126:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
2023-01-28T17:36:05.9428770Z class graph_task : public task {
2023-01-28T17:36:05.9429240Z       ^
2023-01-28T17:36:05.9430560Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:160:7: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
2023-01-28T17:36:05.9431670Z class priority_task_selector : public task {
2023-01-28T17:36:05.9432150Z       ^
2023-01-28T17:36:05.9433350Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:162:5: note: in implicit destructor for 'tbb::detail::d1::priority_task_selector' first required here
2023-01-28T17:36:05.9434370Z     priority_task_selector(graph_task_priority_queue_t& priority_queue, small_object_allocator& allocator)
2023-01-28T17:36:05.9434980Z     ^
2023-01-28T17:36:05.9436190Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:160:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
2023-01-28T17:36:05.9437090Z class priority_task_selector : public task {
2023-01-28T17:36:05.9437540Z       ^
2023-01-28T17:36:05.9437950Z 1 warning and 6 errors generated.
2023-01-28T17:36:05.9438440Z ninja: build stopped: subcommand failed.

So we need to bump the macOS version sdk to 10.14, so for now we just skip macOS.

I think we can use conda_build_config.yaml here as well, can't we?

@traversaro
Copy link
Contributor Author

traversaro commented Feb 1, 2023

macOS is failing with:

2023-01-28T17:36:05.9420740Z In file included from $PREFIX/include/oneapi/tbb/flow_graph.h:167:
2023-01-28T17:36:05.9422200Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:126:7: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
2023-01-28T17:36:05.9423410Z class graph_task : public task {
2023-01-28T17:36:05.9423850Z       ^
2023-01-28T17:36:05.9425120Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:128:5: note: in implicit destructor for 'tbb::detail::d1::graph_task' first required here
2023-01-28T17:36:05.9426020Z     graph_task(graph& g, small_object_allocator& allocator
2023-01-28T17:36:05.9426520Z     ^
2023-01-28T17:36:05.9427900Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:126:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
2023-01-28T17:36:05.9428770Z class graph_task : public task {
2023-01-28T17:36:05.9429240Z       ^
2023-01-28T17:36:05.9430560Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:160:7: error: aligned deallocation function of type 'void (void *, std::align_val_t) noexcept' is only available on macOS 10.14 or newer
2023-01-28T17:36:05.9431670Z class priority_task_selector : public task {
2023-01-28T17:36:05.9432150Z       ^
2023-01-28T17:36:05.9433350Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:162:5: note: in implicit destructor for 'tbb::detail::d1::priority_task_selector' first required here
2023-01-28T17:36:05.9434370Z     priority_task_selector(graph_task_priority_queue_t& priority_queue, small_object_allocator& allocator)
2023-01-28T17:36:05.9434980Z     ^
2023-01-28T17:36:05.9436190Z $PREFIX/include/tbb/../oneapi/tbb/detail/_flow_graph_impl.h:160:7: note: if you supply your own aligned allocation functions, use -faligned-allocation to silence this diagnostic
2023-01-28T17:36:05.9437090Z class priority_task_selector : public task {
2023-01-28T17:36:05.9437540Z       ^
2023-01-28T17:36:05.9437950Z 1 warning and 6 errors generated.
2023-01-28T17:36:05.9438440Z ninja: build stopped: subcommand failed.

So we need to bump the macOS version sdk to 10.14, so for now we just skip macOS.

I think we can use conda_build_config.yaml here as well, can't we?

Yes, I added it but it does not work on staged-recipes (at least the last time that I checked), so for now I just skipped macOS, and we can re-add it once the PR is merged.

The CI checks now run fine, @conda-forge/help-c-cpp the recipe is ready for review, thanks!

Comment on lines 39 to 44
commands:
- test -f ${PREFIX}/include/GazeboYarpPlugins/common.h # [not win]
- test -f ${PREFIX}/lib/libgazebo_yarp_camera${SHLIB_EXT} # [unix]
- if not exist %LIBRARY_INC%\\GazeboYarpPlugins\\common.h exit 1 # [win]
- if not exist %LIBRARY_BIN%\\gazebo_yarp_camera.dll exit 1 # [win]

Copy link
Member

Choose a reason for hiding this comment

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

I strongly recommend checking existence for all your shared libraries and some CMake files. You can use a loop in jinja to reduce the amount of boiler plate for the shared objects since they all start with the same $PREFIX/lib/libgazebo_yarp_.

something like

{%for module in ['camera', 'foo'] %}
    - test -f ${PREFIX}/lib/libgazebo_yarp_{{ module }}${SHLIB_EXT}    # [unix]
    - if not exist %LIBRARY_BIN%\\gazebo_yarp_{{ module }}.dll exit 1  # [win]
{%endfor%}

There's an example in the tk feedstock.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Cool, I was not aware of it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I tried to address your comment in 192a30d . @carterbox

@traversaro
Copy link
Contributor Author

The windows checks now fail with:

['  ERROR (libgazebo-yarp-plugins,Library/bin/gazebo_yarp_camera.dll): $RPATH/CameraPlugin.dll not found in packages, sysroot(s) nor the missing_dso_whitelist.\n.. is this binary repackaging?', '  ERROR (libgazebo-yarp-plugins,Library/bin/gazebo_yarp_depthCamera.dll): $RPATH/DepthCameraPlugin.dll not found in packages, sysroot(s) nor the missing_dso_whitelist.\n.. is this binary repackaging?']

However, those libraries are in a directory that is added in the PATH in the activation script of Gazebo, so I think we can just add them to missing_dso_whitelist.

@traversaro
Copy link
Contributor Author

traversaro commented Mar 7, 2023

There is an imath-related error:

$SRC_DIR/build/bin/ClockTest: error while loading shared libraries: libImath.so.29: cannot open shared object file: No such file or directory

However, it is not diretly related to the PR, it just steems that there is some wrong run_exports for imath, see conda-forge/imath-feedstock#6 .

@traversaro
Copy link
Contributor Author

I did not realized this but CI is not passing, the PR is ready for review. @conda-forge/help-c-cpp @carterbox

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

Successfully merging this pull request may close these issues.

3 participants