I have the simulator crashing the ngspice library when including ltspices lt3042.sub file.
A user on the diyaudio forum suggested upgrading ngspice so I build ngspice 39 today from source. But the simulator still shows ngspice-36. How can I replace the obviously included ngspice library in kicad?
Firstly we may check if ngspice-39 will be able to read and use LT3042. Could you publish LT3042.sub here? I will then have a look.
Upgrading ngspice will be a manual procedure. You will have to replace the simulator and some associated files.
KiCad uses the ngspice shared library libngspice.so, not the standard ngspice executable. So compile shared ngspice, e.g. by using ./compile_linux_shared.sh, resulting in a libngspice.so
Locate libngspice.so in your system. It probably will be found at two places: Where KiCad has installed ngspice, and where your compiled ngspice has landed. You will have to figure out which is which.
Next located the files lib/ngspice/analog.cm, together with some other *.cm files. Again they may occur at two places, the KiCad place and your compiled version.
Now you need to copy libngspice.so and the complete lib/ngspice folder with all *.cm files from your compiled installation place to the KiCad place. Before copying, you may rename the lingspice.so and lib/ngspice folder, so that you can revert the copying in case of malfunctioning.
But let’s test first if lt3042.sub is compatible with ngspice. ADI has some tricks to make the usage impossible.
OK, then we will take it one step at a time, here is the sub file. Unfortunately “new users cannot upload files” so here’s a link to my nextcloud: T5! Cloud
Btw. I tried to search for libngspice:
/usr/lib/x86_64-linux-gnu/libngspice.so.0
/usr/lib/x86_64-linux-gnu/libngspice.so.0.0.2
these are the only occurrences, and they are built today.
maybe it is statically linked into builds so it cannot be replaced?
one more thing, analog.cm can only be found in one location on my system:
-rwxr-xr-x 1 root root 131K Jan 1 2022 /usr/lib/x86_64-linux-gnu/ngspice/analog.cm
as you can see it was built today and is certainly not the “stock” 36 version
ok, that will explain it. f**k that proprietary stuff. /me being sad once again but thanks for your valuable help and keep up the good stuff! I built numerous projects with kicad now and several more are to come, all open source and open hardware…