¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

Circuit simulation


 

Dear List,


When I try to do circuit simulation, I get the following error:

Missing ngspice shared library

and

libngspice.so.0.0.0: Cannot open shared object file: No such file or directory.

I've compiled ngspice locally, and installed to /usr/local. Then
compiled KiCad, and it dinds ngspice libraries in /usr/local/. If I
set LD_LIBRARY_PATH, it works.

I've read that others move the libraries to /usr, what I don't want to do.

Is there any way to explicitly tell KkiCad where to search for the libraries?


Thanks,
Levente


 

What operating system are you using, and what version of Ki-Cad? (Don't get hopes up... *I* still won't know answer... but if you supply that info, someone else may be quicker to respond.)


On Thursday, 7 November 2019, 14:25:28 GMT, Lev <leventelist@...> wrote:


Dear List,


When I try to do circuit simulation, I get the following error:

Missing ngspice shared library

and

libngspice.so.0.0.0: Cannot open shared object file: No such file or directory.

I've compiled ngspice locally, and installed to /usr/local. Then
compiled KiCad, and it dinds ngspice libraries in /usr/local/. If I
set LD_LIBRARY_PATH, it works.

I've read that others move the libraries to /usr, what I don't want to do.

Is there any way to explicitly tell KkiCad where to search for the libraries?


Thanks,
Levente




 

Oh yes, sorry I forgot this.

Debian stable, KiCad 5.1.4, ngspice-31


Thanks,
Levente

On Thu, Nov 7, 2019 at 4:35 PM ng10066504jan via Groups.Io
<ng10066504jan@...> wrote:

What operating system are you using, and what version of Ki-Cad? (Don't get hopes up... *I* still won't know answer... but if you supply that info, someone else may be quicker to respond.)


On Thursday, 7 November 2019, 14:25:28 GMT, Lev <leventelist@...> wrote:


Dear List,


When I try to do circuit simulation, I get the following error:

Missing ngspice shared library

and

libngspice.so.0.0.0: Cannot open shared object file: No such file or directory.

I've compiled ngspice locally, and installed to /usr/local. Then
compiled KiCad, and it dinds ngspice libraries in /usr/local/. If I
set LD_LIBRARY_PATH, it works.

I've read that others move the libraries to /usr, what I don't want to do.

Is there any way to explicitly tell KkiCad where to search for the libraries?


Thanks,
Levente




 

Have you added the ngspice to the library directory she¡¯ll variable??

On Thu, Nov 7, 2019 at 6:25 AM Lev <leventelist@...> wrote:
Dear List,


When I try to do circuit simulation, I get the following error:

Missing ngspice shared library

and

libngspice.so.0.0.0: Cannot open shared object file: No such file or directory.

I've compiled ngspice locally, and installed to /usr/local. Then
compiled KiCad, and it dinds ngspice libraries in /usr/local/. If I
set LD_LIBRARY_PATH, it works.

I've read that others move the libraries to /usr, what I don't want to do.

Is there any way to explicitly tell KkiCad where to search for the libraries?


Thanks,
Levente




 


Sorry, library path shell variable?


On Thu, Nov 7, 2019 at 7:50 PM G.Dragon via Groups.Io <tregare=[email protected]> wrote:
Have you added the ngspice to the library directory she¡¯ll variable??

On Thu, Nov 7, 2019 at 6:25 AM Lev <leventelist@...> wrote:
Dear List,


When I try to do circuit simulation, I get the following error:

Missing ngspice shared library

and

libngspice.so.0.0.0: Cannot open shared object file: No such file or directory.

I've compiled ngspice locally, and installed to /usr/local. Then
compiled KiCad, and it dinds ngspice libraries in /usr/local/. If I
set LD_LIBRARY_PATH, it works.

I've read that others move the libraries to /usr, what I don't want to do.

Is there any way to explicitly tell KkiCad where to search for the libraries?


Thanks,
Levente




 

When compiling KiCad, cmake says it finds libngspice in /usr/local/lib. So I don't understand why it can't find it. Even KiCad's shared objects is located in?/usr/local/lib.


On Fri, Nov 8, 2019, 00:53 G.Dragon <tregare@...> wrote:

Sorry, library path shell variable?

On Thu, Nov 7, 2019 at 7:50 PM G.Dragon via Groups.Io <tregare=[email protected]> wrote:
Have you added the ngspice to the library directory she¡¯ll variable??

On Thu, Nov 7, 2019 at 6:25 AM Lev <leventelist@...> wrote:
Dear List,


When I try to do circuit simulation, I get the following error:

Missing ngspice shared library

and

libngspice.so.0.0.0: Cannot open shared object file: No such file or directory.

I've compiled ngspice locally, and installed to /usr/local. Then
compiled KiCad, and it dinds ngspice libraries in /usr/local/. If I
set LD_LIBRARY_PATH, it works.

I've read that others move the libraries to /usr, what I don't want to do.

Is there any way to explicitly tell KkiCad where to search for the libraries?


Thanks,
Levente




 

I never assume that it will actually find anything;). Too bloody many times I¡¯ve come across issues with software compiled on Unix and Unix like systems.

On Thu, Nov 7, 2019 at 9:30 PM Lev <leventelist@...> wrote:
When compiling KiCad, cmake says it finds libngspice in /usr/local/lib. So I don't understand why it can't find it. Even KiCad's shared objects is located in?/usr/local/lib.

On Fri, Nov 8, 2019, 00:53 G.Dragon <tregare@...> wrote:

Sorry, library path shell variable?

On Thu, Nov 7, 2019 at 7:50 PM G.Dragon via Groups.Io <tregare=[email protected]> wrote:
Have you added the ngspice to the library directory she¡¯ll variable??

On Thu, Nov 7, 2019 at 6:25 AM Lev <leventelist@...> wrote:
Dear List,


When I try to do circuit simulation, I get the following error:

Missing ngspice shared library

and

libngspice.so.0.0.0: Cannot open shared object file: No such file or directory.

I've compiled ngspice locally, and installed to /usr/local. Then
compiled KiCad, and it dinds ngspice libraries in /usr/local/. If I
set LD_LIBRARY_PATH, it works.

I've read that others move the libraries to /usr, what I don't want to do.

Is there any way to explicitly tell KkiCad where to search for the libraries?


Thanks,
Levente




 

I don't have any plain debian systems to confirm with, as my boxen are generally ubuntu variants, but they don't typically stray TOO far from debian.

I assume the ngspice library is actually in /usr/local/lib , correct?

check the files/etc/ld.so.conf and if the directory exists, the files inside /etc/ld.so.conf.d/
One of these files should contain the line
/usr/local/lib

If none of the files include the line, add it to /etc/ld.so.conf
(or read the man page for ldconfig for how to properly add it to a file inside /etc/ld.so.conf.d/ )

run?
sudo ldconfig
The program ought to be able to find it then.


 

It is there

lev@mercury:~$ cat /etc/ld.so.conf.d/libc.conf
# libc default configuration
/usr/local/lib

Still no luck.

On Fri, Nov 8, 2019 at 2:02 PM <barryc@...> wrote:

I don't have any plain debian systems to confirm with, as my boxen are generally ubuntu variants, but they don't typically stray TOO far from debian.

I assume the ngspice library is actually in /usr/local/lib , correct?

check the files/etc/ld.so.conf and if the directory exists, the files inside /etc/ld.so.conf.d/
One of these files should contain the line

/usr/local/lib


If none of the files include the line, add it to /etc/ld.so.conf
(or read the man page for ldconfig for how to properly add it to a file inside /etc/ld.so.conf.d/ )

run

sudo ldconfig

The program ought to be able to find it then.


 

If you run ldd against the kicad executable, it should give you a report on which libraries it's pulling in for each of the dependencies. does that give you anything useful?


 

On Sat, 09 Nov 2019 09:14:28 -0800
barryc@... wrote:

If you run ldd against the kicad executable, it should give you a report
on which libraries it's pulling in for each of the dependencies. does
that give you anything useful?
It doesn't list ngsipce library, hence it is loaded dynamically at runtime. However, if I define

LD_DEBUG=libs

and run kicad, I get this:
[...]
7390: find library=libngspice.so.0 [0]; searching
7390: search cache=/etc/ld.so.cache
7390: trying file=/usr/local/lib/libngspice.so.0
7390:
7390: find library=libfftw3.so.3 [0]; searching
7390: search cache=/etc/ld.so.cache
7390: trying file=/usr/lib/x86_64-linux-gnu/libfftw3.so.3
7390:
7390:
7390: calling init: /usr/lib/x86_64-linux-gnu/libfftw3.so.3
7390:
7390:
7390: calling init: /usr/local/lib/libngspice.so.0
7390:
7390:
7390: calling init: /usr/local/bin/_eeschema.kiface
7390:
7390: find library=libngspice.so.0.0.0 [0]; searching
7390: search cache=/etc/ld.so.cache
7390: search path=/lib/x86_64-linux-gnu/tls/x86_64/x86_64:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64/x86_64:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64/x86_64:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64/x86_64:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64/x86_64:/lib/tls/x86_64:/lib/tls/x86_64:/lib/tls:/lib/x86_64/x86_64:/lib/x86_64:/lib/x86_64:/lib:/usr/lib/tls/x86_64/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64/x86_64:/usr/lib/x86_64:/usr/lib/x86_64:/usr/lib (system search path)
7390: trying file=/lib/x86_64-linux-gnu/tls/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64-linux-gnu/tls/libngspice.so.0.0.0
7390: trying file=/lib/x86_64-linux-gnu/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64-linux-gnu/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/tls/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64-linux-gnu/libngspice.so.0.0.0
7390: trying file=/lib/tls/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/tls/libngspice.so.0.0.0
7390: trying file=/lib/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/x86_64/libngspice.so.0.0.0
7390: trying file=/lib/libngspice.so.0.0.0
7390: trying file=/usr/lib/tls/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/tls/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/tls/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/x86_64/libngspice.so.0.0.0
7390: trying file=/usr/lib/libngspice.so.0.0.0

It is very interesting, hence I really do have /usr/local/lib in ld.so.conf, and even in ld.so.cache.

So I'm a it confused.

Levente

--
Levente Kovacs
Senior Electronic Engineer

W: