|
From: Ethan A M. <sf...@us...> - 2016-03-03 23:32:16
|
On Friday, 04 March, 2016 00:02:06 Mojca Miklavec wrote: > > > Are you saying that I should make an /opt/gnuplot directory > > on the build machine, put the required dynamic libraries there, > > and tell the gnuplot build that the libraries are in /opt/gnuplot? > > Yes, that would be much better than installing dynamic libraries into /usr/local I very much disagree with this. The whole point of shared libraries is that they are, well, _shared_. When a single copy of the library is shared, that means security fixes, library bug-fixes, and upgrades benefit all programs on the system. If you keep a separate copy for each program then you would have to update and rebuild each of those separate copies in parallel. What a headache. > > And your point is that the dynamic libraries in /opt/gnuplot > > are less likely to get clobbered than if they are in their > > "standard" places? > > Yes. Where "clobbered" can mean "updated or fixed" > Gnuplot binary alone is in fact not problematic at all, but as soon as > you start shipping some libraries (like libpng.dylib inside > /usr/local/lib/libpng.dylib if you wouldn't build it statically for > some reason) this is just asking for problems later on. (Even if user > just decides to install MacPorts or HomeBrew later on, libpng.dylib in > /usr/local/lib will cause numerous headaches for that user and any bug > reports that the user would try to file would be immediately closed > with "please remove that library from /usr/local/lib".) That is the exact opposite of a supportable system layout IMHO. If there is a bug in the library, that is exactly when you _do_ want a single shared copy so that fixing the bug benefits all users of the library. Now it is true that if you manage to build a defective copy of a library then putting it in /usr/local/lib could harm other programs as well as breaking your intended client. But putting that defective library in your private directory isn't going to get you a working client either, nor would including it permanently in your executable as a static library. Ethan |