Closed Kreijstal closed 8 months ago
Open kicad, create new project. Put some spice elements in schematic view.
Please explain those steps and how the attached file is used after those steps.
Open kicad, create new project. Put some spice elements in schematic view.
Please explain those steps and how the attached file is used after those steps.
it is an example file of me creating some components
Do you mean to open the project/directory in kicad after extracting the zip file?
I think the zip file is a misunderstanding, it is just an example in case tester was too lazy to create anything in schematics interface, it is unrelated to the bug, just click on
and you receive an error, when kicad is installed through pacman, steps are
tried with a recent installation of msys2 on another computer running windows 10, I can reproduce this on 2 machines now
I installed kicad through scoop, to see what is wrong..
scoop's kicad provides ngspice.dll which msys does not seem to provide.
The kicad installed from scoop does not suffer from this problem, it can open the simulator without problems
okay, so I did something weird, I copy this ngspice.dll into /mingw64/bin directory, and it did not error anymore, but it crashed with a segfault, so... there is something going on. :)
There is ngspice documentation about ngspice.dll
Okay, I copied libngspice0.dll into ngspice.dll, and it worked!
Thanks for the info. I can reproduce the issue in my setup. kicad is probably loading ngspice shared library with LoadLibrary and can not find it.
eeschema/sim/ngspice.cpp: m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) );
I guess I would see what is the most common naming notation, and either make a copy of ngspice.dll for kicad or patch kicad so it looks for either libngspice0.dll or ngspice.dll or upstream?
https://gitlab.com/kicad/code/kicad/-/blob/7.0.10/cmake/Findngspice.cmake?ref_type=tags#L105
Is valid only when using MSYS Makefiles
, probably should changed to if (MINGW)
.
https://gitlab.com/kicad/code/kicad/-/blob/7.0.10/eeschema/CMakeLists.txt#L19
I guess it is a problem wit wxWidgets name resolution?
I guess it is a problem wit wxWidgets name resolution?
Yeah, something like that. The DLL name is set by the CMake file. MehdiChinoune's suggestion may solve the issue.
@Kreijstal I have pushed an update for kicad to 7.0.10, It includes a fix for your issue. Could update it from staging repo https://packages.msys2.org/queue and confirm.
I have downloaded the kicad 7.0.10 package from staging and verified that 02cf7e7dc77ca15758ec83e6e7ea3fc4672995a8 commit fixes the kicad issue. Thank you.
The new kicad package has been added in pacman repository. Please update the packages with pacman -Syu
command.
@Kreijstal I have pushed an update for kicad to 7.0.10, It includes a fix for your issue. Could update it from staging repo https://packages.msys2.org/queue and confirm.
Yeah it fixed it thank you
Description / Steps to reproduce the issue
install ngspice and kicad with pacman or pacboy. Open kicad, create new project. Put some spice elements in schematic view. 3-2024-01-05_145924.zip Try to use simulation, kicad will not find the ngspice shared library
Expected behavior
Simulation should work, or it should find ngspice shared library
Actual behavior
Simulation library is not found
Verification
Windows Version
MINGW64_NT-6.3-9600
MINGW environments affected
Are you willing to submit a PR?
I don't know what the problem is