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

Re: maxima, draw3d, and vtk



On Sat, Aug 20, 2016 at 04:54:09PM +0200, Nicolas George wrote:
>
> 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.

Thanks for your excellent and clear response!  I see that the actual library
file and the SONAME link (which has the major version) are included in the vtk
packages that I have installed.

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

It seems that maxima is trying to access a file that is ordinarily present only
when one might want to build an executable (or other library) and then link
against vtk.  Linking via '-lfoo' would also, in general, require header files,
which declare the symbols that are resolved by linking.  So I see why the link
ending in '.so' would be supplied by the '-dev' package.

> The .so file comes with the -dev package.

Right.

> 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.

You seem to mean that the only acceptable way of accessing a library via
dlopen() is through the SONAME.  I presume that maxima is using dlopen(), but I
don't really know.  Clearly, one may access a library by linking to it (as with
'-lfoo') via the file that ends with '.so'.

> 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.

You seem to suggest that the Debian vtk developers might have made changes to
the build system to make the names of the library and the links be right,
though a bit different from upstream vtk, and that the Debian maxima developers
might not have caught a broken dependency on upstream naming when incorporating
the draw package into maxima.


Reply to: