-
Notifications
You must be signed in to change notification settings - Fork 26
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
SCENARIO_USE_SYSTEM_TPL does not work #256
Comments
Thanks for reporting @traversaro! Yes that's right, at the moment there's nothing exported by the upstream |
In theory yes, but let's see if we can fix the problem upstream (see https://gitlab.com/eidheim/tiny-process-library/-/merge_requests/38/diffs) so that we don't have complexity downstream. |
The MR has been merged, so I think that we can fix the issue also here now. |
Awesome! I had a quick look to the current situation, and I want to explain and double check the situation with this dependency. Please @traversaro correct me if you notice anything wrong. To avoid any problem with the export of ScenarIO, we compile the vendored Then, all our targets that link against this object will produce a library / executable with that code included. This being said, let's analyze the following two cases:
The modification required to achieve it are minimal. Then, when packaging, we will set |
That is the classical problem when vendoring dependencies. On ELF system everything is fine when both TPLs have the same ABI, while you may get a mysterious runtime crash if their ABI are different. The only way to avoid this problems is either hide the TPL symbols, or to change the symbols name to add a namespace, so they don't get mixed with the real TPL symbols. See robotology/how-to-export-cpp-library#46 (comment) for more details. However I do not know if the complexity of the additional machinery for hiding symbols or changing their name is worth the benefit. |
Mmh if I understood, hiding / scoping the symbols has to be done in the external library, right? On the fly I cannot see how it can be done without editing those sources. Since the library is small, we're bypassing their CMake project and create a new target on the fly in the vendored case. Here in theory we can actually hide all symbols of this target by default since we control it. This is the problematic case, do you think this is the right way and is worth spending some time on it? I never tried to hide symbols and I'm not sure it can be done on a single-target basis without operating on the sources. |
Personal evaluation: I think that the effort require to tackle this corner case is more then the benefit of the problems that we can avoid. |
Ok then, I'll fix what I can fix after the MR and let's keep this caveat in mind in case related problems emerge. |
The SCENARIO_USE_SYSTEM_TPL option (see https://github.com/robotology/gym-ignition/blob/v1.0beta2/deps/CMakeLists.txt#L11) assumes that tiny-process-library installs a CMake config for the
tiny-process-library
CMake package, and that this CMake package exports atiny-process-library
imported target, but none of these two hypothesis are true for the current version of tiny-process-library.The text was updated successfully, but these errors were encountered: