[giflib] Changed library linkage to static.#5784
[giflib] Changed library linkage to static.#5784Rastaban merged 2 commits intomicrosoft:masterfrom qis:dev/qis/giflib
Conversation
|
I am a little bit against all this static linking you are pushing "everywhere". |
|
@cenit As I understand it from this discussion,
It would be interesting to know what is true and how many users (and potential users) of vcpkg need |
|
The main question is: why should we block interested user from exploiting a dynamic link? Just create your own triplet, with static linking for libraries and dynamic for crt, and you should be ok, without limiting others. Or not? Interested users can already do it, without impacting people that does not need it or that require dynamic linking. |
|
Yes, good points. I'm not sure what the exact differences to the Linux ELF model but I'm pretty sure that they are substantial. By declaring Given the drawbacks of |
|
On the contrary, since it is a c library, the symbol proliferation due to templates is not present. And I think the author may know better than us their product... |
|
@cenit While it would be reasonable to revert the @ras0219-msft What is your take on it? |
|
Of course I can accept community decision, also this one. It is just a trend that I don’t like and I wanted to explain my position before it was too late. Another point: For now no big deal about licenses. But what about if you made only static a library whose licensing required me to open up the source code if static linked? vcpkg is used a lot also in private companies and there might be some serious concern about using it more, if you have to constantly check if libraries become only static, without any message, one day out of the blue, just because you wanted to update... |
|
@cenit Since we have strict no (L)GPL license requirements, I personally wouldn't have touched those. But this is a very good point. May I suggest adding some guidelines regarding this and similar issues to the documentation? Perhaps in the |
|
Yep, I noticed no license damage for now. Not sure if it was intended or by chance, so I raised up my objection and wanted to make it clear, again, before it was too late. I agree with you that maybe some documentation or guideline or whatever might just be enough |
|
@cenit @qis Thanks for opening this discussion! After considering the significant downsides of This means for libraries like giflib where we are providing the cmake file, the lack of a The above said, it is important to enable users to opt into advanced or custom scenarios assuming they are fully aware of the downsides. In this case, it is as simple as removing the |
|
Understood. Just to have it even more clear, does this mean that moving on every library in which we explicitly enable the CMake flag |
|
Yes, for every library that we are providing buildsystem replacements for, we should avoid/remove uses of I'll note that it ( |
|
You mean this one 8feeb8d ? I removed any reference to that symbol also from vcpkg-provided CMakeLists.txt, only a couple of patches adding it to original CMakeLists.txt are left. |
The
CMAKE_WINDOWS_EXPORT_ALL_SYMBOLSflag preventsgiflibfrom being built with a/GLand/LTCGtoolchain.Tested with this:
https://github.com/qis/toolchains/blob/075a467b671cc08b3f94c1f37ef503bc1627f2fe/windows.cmake
Please note that the
portfile.cmakefile does not explicitly setCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS, but it is set ingiflib-5.1.4/CMakeLists.txtline 22 whenBUILD_SHARED_LIBSis enabled.I have found no other support for shared libraries on Windows in the
giflibport. All functions are hard-coded asexternor don't have any linkage specifier at all.