[SOLVED] Cannot find pspice library even if it loads its content

I’m learning how to simulate in Kicad and I’m following some tutorial.
For example I placed an pspice:OPAMP symbol, then I selected the model I downloaded for a TL072:

As you can see it successfully loaded the content of the library file.
But when I run the simulation it says it cannot find the library!

immagine

How is it possible?
What should I do in order to fix this?

I set the compatibility mode to ps:

Compatibility modes selected: ps

I’m using this Kicad version:

Application: KiCad Schematic Editor
Version: 6.0.10-86aedd382b~118~ubuntu22.04.1, release build

Libraries:
	wxWidgets 3.0.5
	libcurl/7.81.0 OpenSSL/3.0.2 zlib/1.2.11 brotli/1.0.9 zstd/1.4.8 libidn2/2.3.2 libpsl/0.21.0 (+libidn2/2.3.2) libssh/0.9.6/openssl/zlib nghttp2/1.43.0 librtmp/2.3 OpenLDAP/2.5.13

Platform: Linux 5.15.0-60-generic x86_64, 64 bit, Little endian, wxGTK, ubuntu, x11

Build Info:
	Date: Dec 18 2022 19:39:39
	wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
	Boost: 1.74.0
	OCC: 7.5.2
	Curl: 7.86.0
	ngspice: 36
	Compiler: GCC 11.3.0 with C++ ABI 1016

Build settings:
	KICAD_USE_OCC=ON
	KICAD_SPICE=ON

Check the file and directory permissions first.

$ ls -l
totale 28
drwxrwxr-x  2 mark mark 4096 lug 25  2022 3d
-rw-rw-r--  1 mark mark  972 ott  8  2020 esp32-poe.kicad_mod
drwxrwxr-x 14 mark mark 4096 feb 24  2021 footprint
drwxrwxr-x  2 mark mark 4096 lug 25  2022 library
drwxrwxr-x  2 mark mark 4096 apr 25  2021 logo
drwxrwxr-x  2 mark mark 4096 feb 10 11:10 pspice
drwxrwxr-x  4 mark mark 4096 feb 16  2022 scripts

and

$ ls -l
totale 4
-rw-rw-r-- 1 mark mark 1153 feb 10 11:10 tl072.lib

They seem ok to me.
But it they were wrong, it could not have loaded the content as shown in the first picture, could it?

Anyway, I tried to set them to 777 but nothing changed.

please post the ngspice netlist here:
Eeschema → Export → netlist → Spice → Export netlist

File attached, thanks.

test-log.cir (284 Bytes)

Problem found.
I had to change the path of the file using an absolute path.
For me it’s a bug: using the select button it should retrieve the path it needs!

The offending line is
.include "MyProject/Development/Kicad/pspice/op184.lib"
It includes a relative path starting with MyProject.
As ngspice is a shared library, the relative path starts with the location of the caller, the eeschema executable. Can you follow this path, from eeschema until op184.lib is found?

1 Like

O.k., just an overlap of posts. You may consider opening a bug report at Issues · KiCad / KiCad Source Code / kicad · GitLab.