[fpc-pascal] Re: linux: should we hard-code versioned or unversioned shared libraries in our apps?

Michael Van Canneyt michael at freepascal.org
Thu Aug 16 09:50:55 CEST 2012



On Thu, 16 Aug 2012, Marco van de Voort wrote:

> If dynamic linking is so great, why do we constant, constantly have these
> discussions and worse all these illadvised changes?

Because the problem is not in dynamic versus static.

We would have exactly the same discussions if they were statically linked.
Only it would be 'the app XYZ does not start, fails with library not found'.
which would be a system message.

Now, when loading dynamically, it is an FPC-generated error.

But the actual problems that people experience would be 100% the same:
a library not found.

At the same time, creating statically linked binaries, the developers 
would have more difficulties making an configurable application:

Creating an application where the connection type (remote/embedded) 
for firebird is somehow settable would require creating 2 binaries, 
since having the option in 1 binary would require both libraries 
be present on the system.

Having different sound backends on linux would require the same scenario.

The list is endless. So yes, dynamically loading is a good thing.

So, what is the problem, and what started the whole discussion: 
the FPC team (i.e. us) simply chose a poor default for the default 
library name in several cases.

That's all that needs to be changed to get rid of most of the 
problems and discussions.

Michael.



More information about the fpc-pascal mailing list