← Back to team overview

kicad-developers team mailing list archive

Re: eeschema depends on libngspice.so instead of libngspice.so.0?

 

Hi Carsten,

On 10/26/18 9:22 PM, Carsten Schoenert wrote:
> Hi,
> 
> I got a bug report [1] for KiCad in Debian testing/unstable because of a
> not working ngspice based simulation in eeschema.
> 
> I was first searching for the reason why the packaging isn't detecting
> that the assumed library libngspice.so.0.0.0 was detected as a dependency.
> The bugreporter stated that he is needed the package libnsgpice0-dev to
> get eeschema working with simulation. So I tried around this information
> and the reporter is right. If I start eeschema without this package
> installed I get an error message that libngspice.so was not found.
> 
> This is an error in my eyes because eeschema is not looking for the
> needed library with the API version it's build against. As libngspice is
> using a API version 0 the correct library to look for would be
> libngspice.so.0 and not libngspice.so that is normally a symlink to the
> most recent version of the library and only used while linking.
> Thus we ship -dev packages in Debian with a symlink of a file libfoo.so
> to full versioned named library. For libngspice0 this looks like this:
> 
>> $ ls -l /usr/lib/x86_64-linux-gnu/libngspice.so*
>> lrwxrwxrwx 1 root root      19 Okt 15 19:50 /usr/lib/x86_64-linux-gnu/libngspice.so -> libngspice.so.0.0.0
>> lrwxrwxrwx 1 root root      19 Okt 15 19:50 /usr/lib/x86_64-linux-gnu/libngspice.so.0 -> libngspice.so.0.0.0
>> -rw-r--r-- 1 root root 7091024 Okt 15 19:50 /usr/lib/x86_64-linux-gnu/libngspice.so.0.0.0
> 
>> $ dpkg -S /usr/lib/x86_64-linux-gnu/libngspice.so
>> libngspice0-dev:amd64: /usr/lib/x86_64-linux-gnu/libngspice.so
> $ dpkg -S /usr/lib/x86_64-linux-gnu/libngspice.so.0.0.0
>> libngspice0:amd64: /usr/lib/x86_64-linux-gnu/libngspice.so.0.0.0

What about libngspice.so.0 symlink? Which package ships that? Anyway, it
makes sense to request a particular version of the library in case the
API changes in the future.

> So looking manually at the binaries build from the kicad source by ldd I
> can see a lot linked libraries but no library libngspice.so.0! Seems the
> library is simply opened by dlopen. So that's the reason why the
> packaging isn't adding a dependency on the package libngspice0.

You are correct. The library used to be linked with eeschema, but we
have faced problems that could be resolved only by reloading the
library. I am afraid it has to stay this way for the time being.

Regards,
Orson

> [1] https:/bugs.debian.org/911965
> 

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References