-
Notifications
You must be signed in to change notification settings - Fork 305
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 symbol versioning #25
Conversation
RE: It avoid crashes if, for some reason, a process (indirectly) ends with both libmlt5.so and libmlt6.so in its image. RE: every new symbol exported must be added to the version script file. |
Since the number of applications using mlt is quite low the crash problem is quite controlled. But the situation would be:
About the second point, symbols versioning and C++ is actually an ugly combination. I created it by hand, but it could actually be automated. I could try to do it... whenever I have time ("this month"?). |
Is the C++ symbol sensitive to the g++ version and perhaps clang++ has a different scheme? I did not have a problem with it until I saw the mlt++ block of symbols! |
g++ changed it in version 3.4 to use the "Itanium C++ ABI", which appears to be the standard in the ELF world (Microsoft has its own scheme). I don't know 100% for sure about clang++, I never used it. But a quick search returns http://clang.llvm.org/doxygen/ItaniumMangle_8cpp_source.html, so at the very least clang++ supports the same symbol name mangling scheme. I guess it's the default in ELF systems. |
I changed it to explicitly specify every symbol. This way no new symbols will be added to an old version by accident. |
One thing that perhaps wasn't 100% clear. When an app is linked against libmlt now those "MLT_0.8.8" and "MLTPP_0.8.8" strings are also saved in the app binary. So they can not change. They start to form part of the library interface. Meaning that you may want to change the 0.8.8 part for 0.9.0, or whatever the next release number is going to be, as soon as possible. Otherwise apps compiled with the current GIT version will stop working with the next release. |
It should be adapted to whatever symbols are exported in the next release.
It avoid crashes if, for some reason, a process (indirectly) ends with both libmlt5.so and libmlt6.so in its image.
It also lets RPM automatically add the minimum required version for dependent packages. So, if kdenlive uses a symbol added in MLT 0.9.0 RPM will specify MLT >= 0.9.0 as a dependency. Even if kdenlive is actually compiled using MLT 0.9.2.
But it requires discipline. In the future, every new symbol exported must be added to the version script file.