[Pkg-electronics-devel] Bug#1085383: libngspice0 should depends ngspice in the same version
Holger Vogt
holger.vogt at fabsim.com
Fri Oct 18 23:11:35 BST 2024
Carsten,, Robert,
libngspice is a shared library version of ngspice, a full simulator like
standard ngspice, but depending on a caller for control.
libngspice reads spinit, and loads (using the commands 'codemodel ...'
in spinit) the shared libraries *.cm at runtime, thus behaving the same
as standard ngspice.
Due to ongoing development and functions added to the libngspice
interface (not deleting or changing existing functions), older versions
may not be compatible when the caller (e.g. KiCad Eeschema) is making
use of the new functions.
Ideally ngspice exe and libngspice would be distributed together with a
single compatible version of the *.cm shared library code models.
Currently there are Ubuntu users not being able to install standard
ngspice (with *cm) and then KiCad (with libngspice and again *.cm) .
Overwriting is not allowed, and the ngspice and libngspice versions may
be grossly different.
Regards
Holger
Am 18.10.2024 um 20:34 schrieb Carsten Schoenert:
> Hello Robert,
>
> Am Fri, Oct 18, 2024 at 05:41:44PM +0000 schrieb Robert Paciorek:
>
>> libngspice uses configuration and model files provided by ngspice package
>> (/usr/share/ngspice/scripts/spinit and /usr/lib/x86_64-linux-gnu/ngspice/*.cm).
> I disagree, the libngsice0 package is only containing the shared libray
> parts and if the libary would use some external things without depending
> on it would be programmed in a bad way.
>
> $ dpkg -L libngspice0
> /.
> /usr
> /usr/lib
> /usr/lib/x86_64-linux-gnu
> /usr/lib/x86_64-linux-gnu/libngspice.so.0.0.10
> /usr/share
> /usr/share/doc
> /usr/share/doc/libngspice0
> /usr/share/doc/libngspice0/changelog.Debian.gz
> /usr/share/doc/libngspice0/changelog.gz
> /usr/share/doc/libngspice0/copyright
> /usr/share/lintian
> /usr/share/lintian/overrides
> /usr/share/lintian/overrides/libngspice0
> /usr/lib/x86_64-linux-gnu/libngspice.so.0
>
> While the ngspice package is containing the files you mentioned.
>
> $ dpkg -S /usr/share/ngspice/scripts/spinit
> ngspice: /usr/share/ngspice/scripts/spinit
> $ dpkg -S /usr/lib/x86_64-linux-gnu/ngspice/*
> ngspice: /usr/lib/x86_64-linux-gnu/ngspice/analog.cm
> ngspice: /usr/lib/x86_64-linux-gnu/ngspice/digital.cm
> ngspice: /usr/lib/x86_64-linux-gnu/ngspice/spice2poly.cm
> ngspice: /usr/lib/x86_64-linux-gnu/ngspice/table.cm
> ngspice: /usr/lib/x86_64-linux-gnu/ngspice/xtradev.cm
> ngspice: /usr/lib/x86_64-linux-gnu/ngspice/xtraevt.cm
>
>
>> * running software used libngspice0 without ngspice installed may results in
>> error "MIF-ERROR - unable to find definition of model and Simulation
>> interrupted due to error!" (with previous warning "Warning: can't find the
>> initialization file spinit")
> The ngspice binary isn't even depending on any symbol from libngspice
> libary so dpkg-shlibdeps isn't filling in the library as an dependency.
>
> https://packages.debian.org/unstable/ngspice
>
> If there is a symbol from there needed then this needs to get fixed
> upstream. But I'm sure this isn't the case here. Maybe Holger (CCed) can
> give a better explanation.
>
>> * running software used libngspice0 with installed ngspice in version different
>> than libngspice0 version (for example libngspice0 43+ds-1~bpo12+1 and ngspice
>> 39.3+ds-1) may cause segmentation fault.
> You do not provide an example where we could prove your assumption.
> Without it's impossible to re-adjust a potential misbehavior.
>
>> Segmentation fault occurs only while referring to standard models provided by
>> *.cm files, for example while simulating digital systems using:
>>
>> A1 [in1 in2] out AND
>> .model AND d_and
> You might provide what you try to do in detail, Holger can then have a
> look at this.
>
> Holger, I assume you are interested in some samples so you could have a
> look at? Thanks!
>
> Regards
> Carsten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-electronics-devel/attachments/20241019/9b7a5e61/attachment.htm>
More information about the Pkg-electronics-devel
mailing list