Initialization of ngspice on OSX

Bug #1630675 reported by Jonatan Liljedahl
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Medium
Maciej Suminski

Bug Description

On OSX, the installed bundle does not include the necessary codemodels and init files for ngspice, so even though libngspice is bundled, one must also install ngspice separately. This might be OK in itself, but the problem is that kicad (or the bundled libngspice?) does not know where ngspice is installed, so it does not find the needed files. A workaround is to start kicad from the terminal and set an environment variable like this:

$ export SPICE_LIB_DIR=/Applications/ngspice/share/ngspice/
$ /Applications/Kicad/kicad.app/Contents/MacOS/kicad

This is not very user friendly.. ;)

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

Here's another workaround, that is a lot simpler. Add the following to your spice text block in the schematic:

.control
pre_set noaskquit
pre_set nomoremode
pre_codemodel /Applications/ngspice/lib/ngspice/spice2poly.cm
pre_codemodel /Applications/ngspice/lib/ngspice/analog.cm
pre_codemodel /Applications/ngspice/lib/ngspice/digital.cm
pre_codemodel /Applications/ngspice/lib/ngspice/xtradev.cm
pre_codemodel /Applications/ngspice/lib/ngspice/xtraevt.cm
.endc

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision af3d5befa7786e43ec535983f1cde45f96d547f7
https://git.launchpad.net/kicad/patch/?id=af3d5befa7786e43ec535983f1cde45f96d547f7

Changed in kicad:
status: New → Fix Committed
assignee: nobody → Maciej Sumiński (orsonmmz)
xzcvczx (xzcvczx)
Changed in kicad:
assignee: Maciej Sumiński (orsonmmz) → nobody
status: Fix Committed → Confirmed
tags: added: osx
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

The bug has been reopened as ngspice is currently not bundled with KiCad.

Revision history for this message
Jeff Young (jeyjey) wrote :

@Orson, not bundled with KiCad on any platform, or just not bundled on OSX?

(Is there some legal reason behind this, or just something we haven't done yet?)

Revision history for this message
Adam Wolf (adamwolf) wrote : Re: [Bug 1630675] Re: Initialization of ngspice on OSX

I think it's just something we haven't done yet. (If you want to take
a look, my next generation packaging scripts-in-progress are
https://github.com/wayneandlayne/kicad-mac-builder/tree/parity. The
goal is to get them ready before V5, to help make it easier for new
macOS devs.)

On Thu, Feb 15, 2018 at 6:22 PM, Jeff Young <email address hidden> wrote:
> @Orson, not bundled with KiCad on any platform, or just not bundled on
> OSX?
>
> (Is there some legal reason behind this, or just something we haven't
> done yet?)
>
> --
> You received this bug notification because you are subscribed to KiCad.
> Matching subscriptions: OS X KiCad bugs
> https://bugs.launchpad.net/bugs/1630675
>
> Title:
> Initialization of ngspice on OSX
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/kicad/+bug/1630675/+subscriptions

Changed in kicad:
milestone: none → 5.0.0-rc2
Revision history for this message
Maciej Suminski (orsonmmz) wrote :

I am not sure about the current status. I think the shared library might be bundled, but perhaps the codemodel files (*.cm) are not, which will lead to errors when using complex models.

tags: added: ngspice
Jeff Young (jeyjey)
Changed in kicad:
importance: Undecided → Medium
Revision history for this message
Nick Østergaard (nickoe) wrote :

Please test the latest builds on http://downloads.kicad-pcb.org/osx/testing/ and lets work from there. They are still highly experimental, but we need feedback on this. So please test. If you find other packaging issues, please report them on https://github.com/wayneandlayne/kicad-mac-builder/issues for now.

Changed in kicad:
assignee: nobody → Maciej Suminski (orsonmmz)
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 4526f40fe12eccd4579139dadda3a12c23d10d8c
https://git.launchpad.net/kicad/patch/?id=4526f40fe12eccd4579139dadda3a12c23d10d8c

Changed in kicad:
status: Confirmed → Fix Committed
Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.