Comment 11 for bug 1630676

Revision history for this message
Jonatan Liljedahl (kymatica) wrote :

Hi Wayne, I saw your post in the dev mailing list:

> Placing a spinit file in the path where the ngspice and libngspice
> binaries reside works with no need to set any environment variables.
>
> Option 2 could be used by the installer. The installer itself would
> have to create the spinit file by substituting the install path for the
> path of the .cm files. I'm not sure if this would work on osx. Maybe
> one of our osx devs could test this. If it does, than that would
> resolve the simulation init issues.

On OSX, the bundled libngspice resides in /Applications/Kicad/kicad.app/Contents/Frameworks/

I tried copying spinit there, but it didn't work - it was not used.

The bundled libngspice has a hardcoded path in it:
/Users/kicad/homebrew/Cellar/libngspice/26/share/ngspice

Which of course works fine on the build machine, but not for the end user unless they also installed ngspice via homebrew.

Would it work to simply let kicad set SPICE_LIB_DIR (using putenv()) and libngspice would see that?