libsdl2 port question
Bill Cole
macportsusers-20171215 at billmail.scconsult.com
Sun Nov 14 18:46:56 UTC 2021
On 2021-11-14 at 05:53:21 UTC-0500 (Sun, 14 Nov 2021 11:53:21 +0100)
Gerben Wierda via macports-users <gerben.wierda at rna.nl>
is rumored to have said:
> I was just curious: why does the libsdl2 port which is at version
> 2.0.16 install 2.0.0 libraries? How does that happen? Just learning.
I assume you mean the fact that the actual dylib file is named
/opt/local/lib/libSDL2-2.0.0.dylib
It is a norm for dynamically loaded libraries to include a symlink with
their base name (i.e. /opt/local/lib/libSDL2.dylib) and sometimes
additional symlinks with partial versions in their names, with the
versions being indicators of binary compatibility rather than
whole-project code revision. This allows for multiple incompatible
versions of the same shared library to be installed simultaneously, with
the runtime loader picking which version to attempt to load by the name
linked in the executable. This is a pattern/norm, not a fixed standard,
so exactly how a specific library handles the possibility of future
version incompatibility can vary a bit. The libsdl2 devs have apparently
decided to leave the name of the real library with the lowest version
that remains compatible with the current version rather than doing
anything more complex. Others (e.g. pth) use distinct versioning for
their library names.
--
Bill Cole
bill at scconsult.com or billcole at apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
More information about the macports-users
mailing list