robostack.github.io icon indicating copy to clipboard operation
robostack.github.io copied to clipboard

Add *-devel output to conda-forge packages that require them

Open traversaro opened this issue 1 year ago • 8 comments

A common failure point in robostack is that we have conda-forge C++ libraries packages that do not have an output that can be installed to ensure that all the dependencies required to build a downstream C++ project. This is not an issue if a C++ package already include its headers and only use as public dependencies in its headers conda-forge libraries that also ship their headers in the main package, but as soon a dependency uses in its headers a dependency that ships its headers in a separate *-devel package, we need to have a *-devel output also for that package, or it needs to adds the *-devel package to its run dependencies, but some mantainer may be against this as it goes around the point of splitting *-devel packages.

Problematic packages:

  • qt-main : Depends on libgl-devel, but at runtime it only requires libgl
  • vtk : Depends on qt-main, i.e. inheriting the libgl-devel problem
  • pcl: Depends on qt-main, i.e. inheriting the libgl-devel problem
  • libspnav : Depends on xorg-xorgproto, as @Tobias-Fischer is the maintainer and the package is quite simple probably we can avoid the libspnav-devel output and just add xorg-xorgproto as run dependency.

traversaro avatar Dec 21 '24 11:12 traversaro

Can't we just add libgl-devel to the mapping of e.g. pcl etc. in the robostack.yaml?

Tobias-Fischer avatar Dec 21 '24 11:12 Tobias-Fischer

Sorry, I guess the context is not clear, as I forgot to press submit on this message: https://github.com/RoboStack/ros-humble/pull/229#issuecomment-2558093319 . Another important piece of context is that the issue is definitely not robostack-specific but rather conda-forge, I just opened the issue here as I got a clear idea regarding that while working on the ros humble rebuild and to avoid forgetting about it.

Can't we just add libgl-devel to the mapping of e.g. pcl etc. in the robostack.yaml?

Sure, that is what we have done until now (also as the situation was much more complex, as there were cdt involved, so we had REQUIRE_GL and REQUIRE_OPENGL).

We can add libgl-devel to each package that inclue Qt headers in its public headers as we did until now, but I see the following downside:

  • libgl-devel is required (and available) only on Linux, so we would need to split in platform specific sections all the affected dependencies (that is the main reason for now I kept REQUIRE_GL and REQUIRE_OPENGL in https://github.com/RoboStack/ros-humble/pull/229 for now)
  • The problem is not robostack-specific, so personally I think I have at least other ~30 places (superbuild, individual packages CI, conda environments, conda-forge recipes) in which I need to manually add libgl-devel as I depend on qt-main, vtk or pcl. If there was a qt-main-devel, I could just add it and the semantics of what I am trying to do would be clear.

Anyhow, I realize this is mostly OT here, so if you prefer I can close the issue here.

traversaro avatar Dec 21 '24 11:12 traversaro

I think that with vtk 9.4.1 I finally need to handle this problem, at least for vtk and pcl, see https://github.com/conda-forge/vtk-feedstock/pull/374 .

@Tobias-Fischer as you are the most active maintainers in both vtk and pcl, do you prefer to just add the run dependencies required for find_package(VTK) and find_package(PCL) to work fine to the vtk and pcl packages, or you prefer to add vtk-devel and pcl-devel outputs?

traversaro avatar Mar 24 '25 09:03 traversaro

vtk also has this problem with tbb and tbb-devel, see https://github.com/conda-forge/smesh-feedstock/pull/98#issuecomment-2885494146

adrianinsaval avatar May 17 '25 17:05 adrianinsaval

vtk also has this problem with tbb and tbb-devel, see conda-forge/smesh-feedstock#98 (comment)

I think the problem should have been solved by https://github.com/conda-forge/vtk-feedstock/pull/379 . However we probably need to early close vtk 9.4.1 migration and start the 9.4.2 one.

traversaro avatar May 17 '25 20:05 traversaro

I tried creating an environment with vtk 9.4.2 and it still doesn't install tbb-devel or do you mean that 9.4.2 doesn't need tbb-devel to succesfully configure?

adrianinsaval avatar May 18 '25 13:05 adrianinsaval

I tried creating an environment with vtk 9.4.2 and it still doesn't install tbb-devel or do you mean that 9.4.2 doesn't need tbb-devel to succesfully configure?

Good point, I guess the cmake-package-check VTK check in the recipe is not working as expected.

traversaro avatar May 18 '25 15:05 traversaro

I tried creating an environment with vtk 9.4.2 and it still doesn't install tbb-devel or do you mean that 9.4.2 doesn't need tbb-devel to succesfully configure?

Good point, I guess the cmake-package-check VTK check in the recipe is not working as expected.

I opened https://github.com/conda-forge/vtk-feedstock/issues/383 to track this problem.

traversaro avatar May 18 '25 16:05 traversaro