[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: .so version numbers for dlopen'd objects
- To: "Paul B. Henson" <henson@acm.org>
- Subject: Re: .so version numbers for dlopen'd objects
- From: Robert Heller <heller@deepsoft.com>
- Date: Tue, 22 May 2018 16:16:16 -0400 (EDT)
- Cc: Robert Heller <heller@deepsoft.com>, openldap-technical@openldap.org
- Dkim-filter: OpenDKIM Filter v2.11.0 sharky3.deepsoft.com 8F8C526C1F29
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=deepsoft.com; s=deepsoft.com; t=1527020176; bh=SH6Xyf5otx+y0duRZlbiZdltrfgqdTEnIu1VmEM0wNc=; h=From:Subject:In-Reply-To:References:To:Cc:Date:From; b=PabAOlORIyn8sB7Za5zDBNBrh5cAoXcMFpruMmcZrCcbfNwtp1RkKHKTq8eGbe/N1 PkoxIAjnFCvcJFbwXgjtbnnOMZ/ulwiv3OFj2BvgZ2T/LG9FBTZsYf9IBgTe8otBnM +J3A3qDm1Vh4evaayg3VFh8Iw/EPe+zvag4AAaIU=
- In-reply-to: <0f9401d3f206$547d9c00$fd78d400$@acm.org>
- Organization: Deepwoods Software
- References: <0f9401d3f206$547d9c00$fd78d400$@acm.org>
At Tue, 22 May 2018 12:51:49 -0700 "Paul B. Henson" <henson@acm.org> wrote:
>
> I'm trying to get the OpenBSD openldap port updated to use modules,
> currently it just builds everything into a monolithic binary. They are
> objecting to the existence of the version number in the shared objects for
> the modules:
>
> -rwxr-xr-x 1 henson henson 1773576 May 21 12:54 back_bdb-2.4.so.2.10.7
> -rwxr-xr-x 1 henson henson 864 May 21 12:54 back_bdb.la
> lrwxrwxrwx 1 henson henson 22 May 21 12:54 back_bdb.so ->
> back_bdb-2.4.so.2.10.7
>
> They say that shared objects which are intended to be dlopen'd, as opposed
> to linked to, should not include version numbers, and it should look like:
>
> -rwxr-xr-x 1 henson henson 1773576 May 21 12:54 back_bdb-2.4.so
> -rwxr-xr-x 1 henson henson 864 May 21 12:54 back_bdb.la
>
> What is the openldap developer perspective on this?
I am not an openldap developer, but do develop other projects that use dlopen
(specificly Tcl extensions). If using libtool, it *should* create symlinks
for the .so file without the version numbers like this:
sauron.deepsoft.com% dir Deepwoods/ModelRRSystem/BUILDS/Linux64/C++/Azatrax/.libs/
gettext.o libazatrax_la-Azatrax.o libazatrax.so@
libazatrax.a libazatrax_la-azatrax_wrap.o libazatrax.so.0@
libazatrax.la@ libazatrax.lai libazatrax.so.0.0.0*
In my case, the shared library is *both* a dlopen'ed tcl extension and can
also be linked to by a C++ program. This is under Linux, but I do the same
under MacOSX (which is an OpenBSD variant under-the-hood).
>
> Thanks.
>
>
>
--
Robert Heller -- 978-544-6933
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller@deepsoft.com -- Webhosting Services