[racket-dev] Racket should install libracket3m-X.Y.Z.so as libracket3m.so.X.Y.Z
On 09/16/13 18:24, Matthew Flatt wrote:
> At Mon, 16 Sep 2013 18:10:34 +0200, Juan Francisco Cantero Hurtado wrote:
>> On 09/11/13 10:42, Juan Francisco Cantero Hurtado wrote:
>>> The standard on modern unix systems is to name the shared libraries with
>>> this pattern: "lib" + name + ".so." + major version + "." + minor
>>> version. Racket uses libracket-5.3.6.so. It isn't correct.
>>>
>>> -rwxr-xr-x 1 root wheel 9.0M Aug 17 04:28
>>> /usr/local/lib/libracket3m-5.3.6.so
>>> -rw-r--r-- 1 root wheel 14.3M Aug 17 04:28 /usr/local/lib/libracket3m.a
>>> -rw-r--r-- 1 root wheel 852B Aug 17 04:28 /usr/local/lib/libracket3m.la
>>> lrwxr-xr-x 1 root wheel 20B Aug 17 05:51
>>> /usr/local/lib/libracket3m.so -> libracket3m-5.3.6.so
>>>
>>> Look some examples. libpng on OpenBSD:
>>>
>>> lrwxr-xr-x 1 root wheel 10B Sep 10 19:30 /usr/local/lib/libpng.a ->
>>> libpng16.a
>>> -rw-r--r-- 1 root bin 720B Aug 17 02:22 /usr/local/lib/libpng.la
>>> lrwxr-xr-x 1 root wheel 16B Sep 10 19:30
>>> /usr/local/lib/libpng.so.17.0 -> libpng16.so.17.0
>>> -rw-r--r-- 1 root bin 1.2M Aug 17 02:22 /usr/local/lib/libpng16.a
>>> -rw-r--r-- 1 root bin 730B Aug 17 02:22 /usr/local/lib/libpng16.la
>>> -rw-r--r-- 1 root bin 703K Aug 17 02:22
>>> /usr/local/lib/libpng16.so.17.0
>>>
>>> libarchive on Gentoo:
>>>
>>> lrwxrwxrwx 1 root root 20 May 10 09:12 /usr/lib/libarchive.so ->
>>> libarchive.so.13.1.2
>>> lrwxrwxrwx 1 root root 20 May 10 09:12 /usr/lib/libarchive.so.13 ->
>>> libarchive.so.13.1.2
>>> -rwxr-xr-x 1 root root 723968 May 10 09:12 /usr/lib/libarchive.so.13.1.2
>>>
>>>
>>> Also you should add some easy setting to change the suffix X.Y.Z of the
>>> lib. Some projects use variables in configure or the main makefile. The
>>> version of the libs is unrelated to the version of the software. On
>>> OpenBSD we change the numbers, so we can control when the dependencies
>>> require an update.
>>>
>>
>> Any comment about this?. Basically, I need to rename
>> libracket3m-5.3.6.so to libracket3m.so.0.0. I've searched where are the
>> version numbers in the makefiles and configure but I've not found it.
>
> It's set via `configure`. See line 1408 in
>
> racket/src/racket/configure.ac
>
> which uses `-release ${plt_lib_version}`
Oh. I was looking for the wrong string. Thanks a lot!
>
> We went with `-release` mode instead of version numbers, because we
> didn't want to try to track of binary compatibility at the
> shared-library level.
>
> As you say, release versions don't necessarily have anything to do with
> library versions, and it's almost certainly the case that libraries for
> different v5.x releases cannot be substituted for each other (e.g., the
> value of `scheme_char_string_type` is likely to shift). It would make
> sense to simply introduce a new shared-library major version for every
> release.
>
> Overall, we haven't tried to provide shared-library versions mostly
> because the libracket shared library doesn't seem all that useful. I'm
> happy to accept patches to the `configure` script so that you can
> configure the library name, though.
If I manage to fix the problem with the lib, I'll add a new option to
configure to select the behavior of libtool.