← Back to team overview

kicad-developers team mailing list archive

Re: Testing Tom’s integrated ngspice simulator on Mac OSX

 

Hi Orson,

yes, from which library to use point of view you are right.

My question was on how the library is used/packaged by KiCad for OSX.

I didn't look myself yet, but Johannes told me that it is not
dynamically linked as other dependencies (in this case, it would be
bundled automatically), but you really load it on demand like e.g.
the 3D plugins.

For me, this feels a lot more "optional" than usual dynamic linking
(which actually is not optional).
That's why I asked if it should be bundled or not.


Regards,
Bernhard

On 08.08.2016 15:43, Maciej Sumiński wrote:
Hi Bernhard,

The case is similar to other libraries, so KiCad will work with any
ngspice dll available in the system. The problem is, there is a bug in
the current ngspice release that may cause the simulator to hang up in
certain situations. As currently libngspice is not provided anywhere
(but Arch Linux), we need to build it ourselves and it is better to pick
a newer version that has the bug fixed.

Regards,
Orson

On 08/08/2016 03:35 PM, Bernhard Stegmaier wrote:
Question for me is if a certain ngspice should be bundled with KiCad,
or if KiCad just uses some ngspice that maybe is floating around on
the machine.

The realdynamic loading of the library somehow suggest the latter,
but I don't know how it is intended to be (if it was not intended like
this, simply linking dynamically would have been enough?).

If it should be bundled, it more or less doesn't matter how the lib is
built (at least for those not building on their own)


Regards,
Bernhard

On 08.08.2016 14:41, Adam Wolf wrote:
It would be nice if upstream supports it.  On the other hand, I'm
going to use it for my nightlies server regardless of what upstream
says...

Thanks for your work and keep us posted as to how it goes!

Adam Wolf

On Mon, Aug 8, 2016 at 3:17 AM, Johannes Maibaum <jmaibaum@xxxxxxxxx>
wrote:

Ok, I got that point with the patch wrong then, sorry.

Well, I think that Homebrew usually does accept *-git or *-devel
formulas (or how they call them), but it seems that as long as the
ngspice devs are not willing to change their build system behaviour
it won’t get merged anyhow.

But, I have just asked the Homebrew devs if they think that a
separate „libngspice“ formula that just builds the library would
be OK for them.  Let’s see what comes out of this…

Best,
Johannes

Am 08.08.2016 um 10:03 schrieb Maciej Sumiński
<maciej.suminski@xxxxxxx>:

Hi Johannes,

Fortunately we do not need any KiCad-specific patches for ngspice,
but
just a newer revision from the master repository. The only problem
now
is the required revision is not available in the current ngspice
release, so anyway we are forced to build the library from source.
On
the other hand, we need to do so, as the library is not provided
by
default anywhere (almost), so there is no easier solution at the
moment.

Perhaps msys2 would accept another package (ngspice-git) that
builds
using the official repository, but still we need the script for
other
platforms.

Regards,
Orson

On 08/08/2016 09:39 AM, Johannes Maibaum wrote:
Hi,

just FYI, the Homebrew devs decided not to merge my PR for shared
library support of ngspice.

They say it’s a bug that should be fixed upstream, as the build
system that ngspice uses should be able to handle the case of
building the shared library and the executable in one go.  So they
consider the „fix“ that Arch Linux (and MSYS2 as well by now?)
of building two times in a row a „hack“ that is not acceptable
for them.

The ngspice devs say that it’s not a bug and that they won’t
fix it, so everything will stay as before.

But, if I understand Orson right, as the integration now needs at
least one patch not included in the ngspice stable release, I think
that now it is better to use his build script than continue to
fiddle with the Homebrew formula.


Best,
Johannes

Am 01.08.2016 um 16:01 schrieb Adam Wolf
<adamwolf@xxxxxxxxxxxxxxxxxxxx>:

I'll make sure it works on the build server regardless of what
homebrew does :)

On Mon, Aug 1, 2016 at 8:29 AM, Maciej Sumiński
<maciej.suminski@xxxxxxx> wrote:
Hi Johannes,

Cool! I am really grateful for your fixes - they are already
merged and
I am going test them with Linux and Windows. I really hope
homebrew
developers will accept your formula soon, as it would make
getting
ngspice library so much simpler.

Regards,
Orson

On 08/01/2016 12:40 PM, Johannes Maibaum wrote:
Hi,

Bernhard’s hint gave me a working wx installation again, and
I now got the
simulator running on OSX (see attached screenshot). Yay!

I did some initial clicking around in the GUI after loading the
rectifier
example and so far it seems that all functionality is there and
does work as
intended.

And it seems that I was guessing right, the wxCursor
construction process needs
the same codepath on OSX as on MSW.  Both the “probe” and
the “tune” cursors
work here (unfortunately not visible in the screenshot).

Here’s a final wrap-up so far:

- The patch I sent to the list yesterday for Adam contains all
the needed
changes to get Tom’s ngspice branch to work on OSX (except
for possible bugs I
did not yet encounter).  I created a pull-request on Github for
Tom to merge. [1]

- libngspice needs to be compiled and installed manually to one
of the usual
library locations at the moment.  As it seems that this is the
same on Windows
and Linux for now, I did no further investigations how to
modify the CMAKE
scripts to bundle and link libngspice into the app bundle (as
I’m no expert with
build systems).  I have a hacky but working patch to
Homebrew’s ngspice formula
that builds the shared library, which got not yet merged into
homebrew-core [2].


Best,
Johannes

[1] https://github.com/twlostow/kicad-dev/pull/2 [1]
[2] https://github.com/Homebrew/homebrew-core/pull/3367 [2]


Am 31.07.2016 um 23:13 schrieb Johannes Maibaum
<jmaibaum@xxxxxxxxx
<mailto:jmaibaum@xxxxxxxxx>>:

Am 31.07.2016 um 23:02 schrieb Adam Wolf
<adamwolf@xxxxxxxxxxxxxxxxxxxx
<mailto:adamwolf@xxxxxxxxxxxxxxxxxxxx>>:

Thanks!  This is good work! I'll start working with it on my
test machine,
and it will be first in line after the cvpcb crash in the
nightlies (which is
first in line after 4.0.3) :)

Adam Wolf

Thanks a lot, Adam!

As Bernhard has just pointed me towards the wx patch I
obviously missed to
include in my build, I might be able to test my own patch on
my machine later
tomorrow.  I will report back here how it turns out.


Best,
Johannes



_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers [3]
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers [3]
More help   : https://help.launchpad.net/ListHelp [4]




_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers [3]
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers [3]
More help   : https://help.launchpad.net/ListHelp [4]






_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers [3]
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers [3]
More help   : https://help.launchpad.net/ListHelp [4]



Links:
------
[1] https://github.com/twlostow/kicad-dev/pull/2
[2] https://github.com/Homebrew/homebrew-core/pull/3367
[3] https://launchpad.net/~kicad-developers
[4] https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



References