How to install ngspice version 44 on debian and ubuntu platforms integrated into kicad 8.0.8? For the windows platform it is already integrated into the installer. Flatpack and similar packages are not suitable
Since itās integrated, you just need to install kicad with apt install kicad
or am I mistaken?
Is this related to the recent discussion?
If you do this, it remains in version 43
These are different problems: there is an error in dependencies, here there is a lack of version 44 on Linux platforms.
You wait for ngspice-44 to be released on Ubuntu.
Or compile yourself as explained here
Is it dependent on the 8.0.8 branch? Or should I not wait and try to build it myself?
I assumed that within the framework of version 8 the update will happen for all platforms
ngspice is an independent project from KiCad.
On Linux systems, the norm (unless you are using something like Flatpak) is that libraries and applications are updated independently and not synchronized to release at the same time.
On Windows and macOS, KiCad bundles ngspice, so we control what version is released. But the same is not true on most Linux systems.
I donāt really understand what independent means if it is inside the code and the kicad itself. How can I update this module on Linux inside kicad? As I understand it, I shouldnāt use PPA but compile everything myself from the source code, specifying the required library versions?
Itās not inside the code and KiCad itself. KiCad uses it as an external library.
At the interface level of the scheme there is integration with the simulator and direct access. Otherwise it is not there and in windows the library is used from one developer. It turns out that depending on the platform it is updated or not and not because of its absence or presence in the code of the kicad?
Yes. This is a key principle of Linux that is worth understanding if you are coming to Linux from Windows or macOS. Ngspice is used by KiCad as a shared library, meaning it is not directly built in to KiCad. And on Linux, shared libraries from different projects are packaged and updated separately. This means that updating KiCad does not update ngspice and vice versa.
You need to wait for your Linux distribution to update Ngspice, or else you need to build it from source.
Alternatively, you can use something like FlatPak, where the shared libraries can be updated faster.
It looks to be in ābackportsā for Debian Bookworm.
ngspice is distributed in two flavours:
ngspice (Linux, macOS) or ngspice.exe (Windows) is the standard executable.
libnspice0.so (Linux), libngspice0.dylib (macOS) or libngspice.dll (Windows) is the shared library version of ngspice.
In addition both ngspice standard or shared need some additional files like the code models (analog.cm, digital.cm etc.).
KiCad uses the shared library version of ngspice. In Debian this is Debian -- Details of package libngspice0 in bookworm-backports.
However the code models are distributed only with the standard executable in Debian -- Details of package ngspice in bookworm-backports.
So you need to install both.
is there a deb package 8.0.8 with ngspice 44?
why canāt all this be sent at once, for example, to a ppa? for what reason is it in a flat pack or other form, but not in the native deb or pp? This is not a complaint, Iām just curious. Anything is a snap flat pack, a portable version, but not a deb or pp. This applies not only to kikad, for example, and freecad does the same PPA for KiCad: 8.0 releases : āKiCadā team
I cannot reproduce that Debian. Here it installs 44.2 by default:
- check the package versions: kicad - Debian Package Tracker
ā youāll find that for kicad version 8.0.8 youāll need debian sid (unstable) - I installed a fresh Debian and upgraded to sid
- I then ran
apt install kicad
Launching kicad and checking the ngspice version: Help ā About KiCad ā Version shows ngspice 44.2:
So Iād say on Debian it works out-of-the-box.
It makes no sense to build the Ngspice library into the KiCad package, KiCad is working in principle also without any file from ngspice. And, ngspice is a own project!
Thinking the other way around would mean, if I need or want to use some functions from ngspice like a simulation outside KiCad (e.g. done on CLI) I would be needed to have installed the rather big package of kicad. There is a reason why Linux system have a bit smarter dependency checking than Windows. We have hard dependencies which are really needed as the software wouldnāt be usable, next groups are additional recommended packages that add extra functionality which are for users mostly very practical, and then also packages that are just suggested and not really needed for the functionality. E.g. documentation or some very specific AddOn which is a corner case.
Think about in bigger scenarios, even on a home server you mostly donāt want to have installed every possible software and package for a certain package. For example you want to install libreoffice without any UI stuff as you will not run an X server, but want or need to have core function usable like PDF creation from any LO formats.
ngspice 44.2 will be shortly available in bookworm-backports.
This approach creates many problems for users. If you do not embed the library, then the dependencies break, you have to compile them yourself in a separate non-system folder or use the entire zoo of various packages in the form of flat packs, snaps, etc. Here is a more detailed description of what is happening
The user has no choice when installing Kicad from the PPA repository to install the simulator library or not. There is no simple and clear way to update it separately after installing Kicad. Compiling it yourself is apparently the only way out at the moment.This is one of the many ancient problems of Kicad that has not been solved for years and honestly it irritates me knowing that I will have to do this on several machines for the normal operation of the simulator and it is repeated every time you just need to update the library