[MacPorts] #71124: ngspice @43: Lacking xspice support

MacPorts noreply at macports.org
Fri Oct 18 20:35:19 UTC 2024


#71124: ngspice @43: Lacking xspice support
----------------------+----------------------
 Reporter:  hughsonm  |      Owner:  bpdegnan
     Type:  defect    |     Status:  assigned
 Priority:  Normal    |  Milestone:
Component:  ports     |    Version:  2.10.2
 Keywords:            |       Port:  ngspice
----------------------+----------------------
 == Problem

 I upgraded from ngspice-36 to ngspice-43 recently, by updating my
 macports.
 After upgrading, I started getting errors in my circuits due to the use of
 s_xfer, which is a model from xspice.

 == Steps to Reproduce

 I've attached a circuit file that tries to use s_xfer. With ngspice-36, it
 succeeds. With ngspice-43, it fails.

 Run these commands to reproduce the issue:
 {{{
 port info ngspice
 # Check the version of ngspice. If less than 43, then sudo port selfupdate

 sudo port install ngspice
 # Run the example circuit from this ticket

 ngspice -b example.cir
 }}}
 At the time of writing, ngspice-36 is unavailable on macports.
 I have ngspice-36 on my computer, so I will show the different results I
 get from the 2 ngspice versions.
 Here is the text, copy-pasted from my terminal:
 {{{
 Maxs-MacBook-Pro:ng-versions max$ sudo port activate ngspice at 36
 --->  Computing dependencies for ngspice
 --->  Deactivating ngspice @43_0+lib+manual
 --->  Cleaning ngspice
 --->  Activating ngspice @36_0+lib+manual
 --->  Cleaning ngspice
 Maxs-MacBook-Pro:ng-versions max$ ngspice -b ./example.cir

 No compatibility mode selected!


 Circuit: *spara analysis

 Reducing trtol to 1 for xspice 'A' devices
 Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

 Warning: vpulse1: no DC value, transient time 0 value used

 Initial Transient Solution
 --------------------------

 Node                                   Voltage
 ----                                   -------
 in                                           0
 xsubckt.int_a1_a1_0                          0
 out                                          0
 e.xsubckt.es_1_1_n1#branch                   0
 vpulse1#branch                               0
 a.xsubckt.ags_2_2_n1#branch_1_0               0


 No. of Data Rows : 201
 ERROR: (internal)  This operation is not defined for display type
 PrinterOnly.
 Can't open viewport for graphics.
 ERROR: (internal)  This operation is not defined for display type
 PrinterOnly.
 Can't open viewport for graphics.
 ASCII raw file "rc.raw"
 Note: No ".plot", ".print", or ".fourier" lines; no simulations run
 Maxs-MacBook-Pro:ng-versions max$ sudo port activate ngspice at 43
 --->  Computing dependencies for ngspice
 --->  Deactivating ngspice @36_0+lib+manual
 --->  Cleaning ngspice
 --->  Activating ngspice @43_0+lib+manual
 --->  Cleaning ngspice
 Maxs-MacBook-Pro:ng-versions max$ ngspice -b ./example.cir
 Warning: can't find the initialization file spinit.

 Note: No compatibility mode selected!


 Circuit: *spara analysis

 Error on line 3 or its substitute:
   a.xsubckt.ags_2_2_n1 in xsubckt.int_a1_a1_0 xsubckt:filter_ags_2_2_n1
  MIF-ERROR - unable to find definition of model xsubckt:filter_ags_2_2_n1
     Simulation interrupted due to error!

 Note: No ".plot", ".print", or ".fourier" lines; no simulations run
 Maxs-MacBook-Pro:ng-versions max$
 }}}


 == My Investigation

 1. Activating the ngspice-36 port and deactivating the ngspice-43 port
 fixes the issue, but is not a long-term solution.
 2. I deactivated all my versions of ngspice from macports. Then, I pulled
 the code with git and followed the build instructions in INSTALL for
 macos/Clang.
   * If I configure with --enable-xspice=no, then the xspice models are
 inaccessible.
   * If I configure with --enable-xspice, then the xspice models are
 accessible.
 I suspect that the macports build instructions are disabling xspice,
 though I do not know how they would be disabled. The
 [https://github.com/macports/macports-
 ports/blob/master/science/ngspice/Portfile portfile] sets the correct
 configuration flags, as far as I can tell.

-- 
Ticket URL: <https://trac.macports.org/ticket/71124>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list