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

Mark Morgan Lloyd markMLl.fpc-pascal at telemetry.co.uk
Wed Aug 15 14:43:59 CEST 2012


Henry Vermaak wrote:
> On 15/08/12 12:37, Mark Morgan Lloyd wrote:
>> Jonas Maebe wrote:
>>
>>>> In both these cases, I manually created unversioned symlinks to those
>>>> libraries, and that got my applications working again. This is not
>>>> ideal, but I don't know how else to handle this.
>>> The official way to get the unversioned symbolic links is to install
>>> the -dev or -devel package for that library. Of course, you're not
>>> supposed to require end-users to do that.
>> Does not always work, e.g. in the case of Debian. -dev will install the
>> .h and .a files, but won't necessarily set up unversioned symlinks.
> 
> I've never found a -dev package that doesn't set up symlinks in many
> years of using Debian for development.  (Except if only static versions
> of a specific library exists, obviously).  Could you give an example?

[Checks a couple of systems] I can't be /absolutely/ certain without 
building a system from clean, but the thing that regularly bites me is 
the PostgreSQL client library and I've recently been bitten by libcap2.

However, I suspect that in both cases I might have set up a symlink 
myself and later installed the -dev package, I don't have an easy way of 
reconciling usage of ln -s (logged in root's .bash_history) with the 
date a package was installed (which I log into RCS). So I might have to 
recant, or to deprecate my testimony as unreliable :-)

I do agree with Graeme's position though: a -dev is described as 
containing files for developers, and it should not be necessary for a 
non-developer user to start encumbering his system with .h files etc. 
What's more, part of the reason that I've had to create symlinks 
manually in the past is because things like (if I recall correctly) 
OpenOffice's interface to PostgreSQL require libpq.so without declaring 
-dev as a prerequisite... which rather reinforces my position that this 
is a distro issue even if they prefer to disclaim it.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]



More information about the fpc-pascal mailing list