-
Notifications
You must be signed in to change notification settings - Fork 27
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
Mangle third party libraries #343
Comments
Other third party libraries probably have a similar problem. Cc: @vibraphone |
cJSON is small and not widely available as a system package. Because of the way we use it (applications dependent on SMTK will need to use it), I would prefer not to make it a static library that does not get installed. Mangling can be done if absolutely required but until we have an actual need for it I would prefer to avoid it. sparsehash and clpp are header-only. The other third-party libraries in SMTK (PyYAML, pugixml, moab) I leave to @BobObara and @robertmaynard . |
Distros which ship SMTK won't use this one anyways; they'd package cJSON separately and then patch SMTK to use that one. The point here is that SMTK should not install a library using the name of another project, not that the library should be static or whatever. As for mangling, it will be necessary as soon as SMTK is loaded into the same address space as another library using a different cJSON. |
@mathstuf I understand that this is desirable but perhaps for now we can install the libraries to a subdirectory of |
Shouldn't just providing the option to use a system version of cJSON instead of the built in version alleviate this problem as far as Distro packagers are concerned? |
Wouldn't work. The SONAME needs to differ.
Mangling is to help those not using a system copy. |
I think it is fair to assume that people not using a system copy don't have a system copy installed (or they would use it). cJSON is not changing rapidly and not widely distributed, so this is a good assumption. It is also why we should install the cJSON library if SMTK is built with it; otherwise, it is not possible to use an installed SMTK. |
@robertmaynard I don't know of a single platform that provides a packaged cJSON. If we create our own homebrew keg, Ubuntu PPA, etc. then we can package cJSON separately if needed. Until then, we need to install it. |
I'm saying to not install it as cJSON. Call it |
Calling it smtkCJSON would be easy. +1. Can mangling can wait until there's trouble? |
Yeah, I'm less worried about that. |
Another possibility for JSON is to use a header only version like: https://github.com/kazuho/picojson - we do this for XML (Pugi). Bob Robert M. O'Bara, MEng. Kitware Inc. Phone: (518) 881- 4931
|
What problem started this discussion? Bob Kitware Inc. Phone: (518) 881- 4931
|
I believe Ben is fighting superbuild woes and trying to build against either an installed or build-dir SMTK. |
It was something I noticed when adding the target include directories to cJSON so that CMB can use SMTK from a build directory (its own). |
Are there other libs that we have to worry about or is this the only one? If JSON is the only one I would investigate the header only option. Bob Robert M. O'Bara, MEng. Kitware Inc. Phone: (518) 881- 4931
|
I think switching from cJSON to picojson would be an order of magnitude more work than mangling cJSON, which is an order of magnitude more work than just changing the library name, which I think we have agreed will suffice for now. |
I have no problem with this approach but I do have to ask is the JSON support confined to a 2 classes like XML is in SMTK? Bob Robert M. O'Bara, MEng. Kitware Inc. Phone: (518) 881- 4931
|
In short, no. json parsing/conversion is done by numerous classes in smtk. |
Close.
|
SMTK should not be installing
libcJSON.so
, but should instead mangle the library and the symbols to have "smtk" as part of it.The text was updated successfully, but these errors were encountered: