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

Use of embedded external dependencies #4221

Open
olivier-roussel opened this issue Oct 5, 2023 · 1 comment
Open

Use of embedded external dependencies #4221

olivier-roussel opened this issue Oct 5, 2023 · 1 comment
Labels
issue: discussion Open topic of discussion STC#17 Tasks for STC#17 coding sprint

Comments

@olivier-roussel
Copy link
Contributor

olivier-roussel commented Oct 5, 2023

Following the remarks we got from the SOFA conda package PR on conda-forge (conda-forge/staged-recipes#23085), we have some problems regarding some external libraries that are embedded in SOFA code.
Here is a try to sum up all of these embedded libraries:

Lib name Type Location in code License Status
difflib header-only extlibs MIT OK
json nlohmann header-only extlibs MIT (should be in a separate file) OK. Fixed in #4272
stb header-only extlibs MIT OK
TinyXML static extlibs zlib (should be in a separate file) Externalize tinyxml dependency: #4240 (waiting for merge)
miniFlowVR static applications/plugins/SofaDistanceGrid/extlibs LGPL (version ?) (should be in a separate file) Not built by default. TODO: plugin to be externalized (#1442 )
newmat static applications/plugins/SofaNewmat/extlibs type inconnu Not built by default. TODO: plugin to be externalized (#1442 )
CImg header-only applications/plugins/CImgPlugin/extlibs CeCILL-C / CeCILL OK
csparse static Sofa/Component/LinearSolver/Direct/extlibs no license file Plugin to be externalized. WIP : #4258
metis static Sofa/Component/LinearSolver/Direct/extlibs Apache v2 Externalize metis dependency : #4266 (waiting for merge)
gtest shared Sofa/framework/Testing/extlibs BSD-3-Clause Externalize ?
cxxopts header-only Sofa/GUI/Common (fetched from GitHub) MIT Add to possibility to use external dependency and prevent from fetching: Fixed in #4273
libQGLViewer shared Sofa/GUI/Qt GPL Find or use embedded code (find module being fixed in #4290)

The actions we should take to make our code compatible for the conda package on conda-forge are:

  1. Fix the missing licenses files (points in bold)
  2. Avoid all static libraries.

For point 2, we are not concerned by miniFlowVR and newmat, as we do not compile the corresponding plugins for the conda package, at least for now. Before considering any action on these two, do the SofaDistanceGrid and SofaNewmat plugins are still used and planned to be maintained in future releases ?

Regarding other static libs (TinyXML, csparse and metis), could we consider to switch to an external dependency instead ? For TinyXML, the current behavior is to first look for an external package, and fallback to embedded version if unavailable. This looks reasonable at first, but shouldn't we switch to fully externalized versions for maintainability ?

Last point, we were also advised to use external dependency for some header-only libraries, especially when they are already packaged in conda-forge. Could we consider also to use externalized versions for some of these (the ones easily available as external packages), such as json nlohmann and cxxopts ?

@olivier-roussel
Copy link
Contributor Author

Edited to add libQGLViewer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: discussion Open topic of discussion STC#17 Tasks for STC#17 coding sprint
Projects
None yet
Development

No branches or pull requests

2 participants