[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: maxima, draw3d, and vtk



Le quartidi 4 fructidor, an CCXXIV, Thomas Vaughan a écrit :
> Using 'dpkg -S libvtkCommonCoreTCL', I find
> libvtk6.3: /usr/lib/x86_64-linux-gnu/libvtkCommonCoreTCL-6.3.so.6.3.0
> libvtk6.3: /usr/lib/x86_64-linux-gnu/libvtkCommonCoreTCL-6.3.so.6.3
> 
> It looks to me as though there is something at least a bit broken about the
> names of the libraries installed by the libvtk6.3 Debian package, but I'm
> not an expert in library naming.

A library normally exists as three files:

First, the actual library file, with a full version after the .so extension.
The other files will be symlinks to it.

Second, a symlink with just a major version mark after the .so extension.
This is called the SONAME, it can be queried with "objdump -p". This is the
name programs must use to access the library. It therefore must be changed
each time an incompatible change in the library ABI is made, for example
changing the type of a function argument.

Third, a symlink with just .so: this is accessed to support linking
libraries using the "-lsomething" linker options.

The actual file, of course, comes in the library package. The SONAME symlink
comes with it too, but it is really not necessary since ldconfig will
recreate them if necessary.

The .so file comes with the -dev package.

The SONAME symlink exists to allow several versions of the same library to
be present on the system at the same time. Otherwise, you would have to
rebuild all the packages that depends on it at the same time.

On the other hand, incompatible API changes are considered rare enough: no
provisions exist to allow the development files for several versions of the
same library to be present on the system at the same time. If it is
necessary, it either requires the developer to play with -L and -I paths, or
the name of the library needs to be changed, for example from gtk-2.0 to
gtk-3.0 (which are respectively at version 2.32.2 and 3.21.4; I wonder what
they were on when they decided to include the .0 in the name for the 3
branch).


Now, what can we tell about vtk? Well, you can see that the version number,
"6.3" is included both in the library name and as a suffix for the SONAME.
That tells us that the vtk people have decided not to care more about ABI
stability than API stability. Fine.

Still, the only acceptable way of accessing a library for a program (not
part of the library package) is though the SONAME. The maxima package is
definitely at fault.

The blame likely lies with the maxima people.

Still, there may be a case for another explanation: sometimes, the upstream
of a library does not understand the SONAME logic and just produces a
library file ending as .so, and the distribution maintainers add the SONAME
to make it a proper library. If that happens, programs that expect that will
not work without the -dev package. You can check that by compiling the
upstream libvtk and checking if it includes the SONAME.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature


Reply to: