Personal computing discussed

Moderators: renee, Dposcorp

 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

SPICE 2 for a modern OS

Wed Jul 06, 2016 10:58 pm

Hey gerbils,

Does anyone know if any subversion of SPICE 2 is available for any modern OS? I can't seem to find anything myself so I thought I might as well ask here.

Thanks (Sorry for the terrible looking format of this, but how else are you supposed to format a three liner post)
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
slowriot
Gerbil XP
Posts: 388
Joined: Wed Apr 03, 2013 10:57 am

Re: SPICE 2 for a modern OS

Wed Jul 06, 2016 11:47 pm

http://ngspice.sourceforge.net/

Closest I could find.
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 5:22 am

Yup, ngspice seems to be the modern-day descendant.

If you really want to use legacy SPICE 2 (which seems to have not been maintained since the 1980s) for some reason, there's apparently source code available here: https://embedded.eecs.berkeley.edu/pubs ... /index.htm

I took a quick peek at the SPICE 2 for UNIX one... it's a single 18,000+ line FORTRAN module. Yikes! I imagine you could probably get that to compile under Linux though.
Nostalgia isn't what it used to be.
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 11:27 am

slowriot wrote:
http://ngspice.sourceforge.net/

Closest I could find.

Thanks. That one looks like the best modern derivative I've seen.

just brew it! wrote:
Yup, ngspice seems to be the modern-day descendant.

If you really want to use legacy SPICE 2 (which seems to have not been maintained since the 1980s) for some reason, there's apparently source code available here: https://embedded.eecs.berkeley.edu/pubs ... /index.htm

I took a quick peek at the SPICE 2 for UNIX one... it's a single 18,000+ line FORTRAN module. Yikes! I imagine you could probably get that to compile under Linux though.

I was thinking about getting DOSBox or a different DOS emulator to run the DOS version available from that site. At this point, however, I think I'm going to try to use ngspice. I'll compile SPICE 3 if this doesn't work.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
meerkt
Gerbil Jedi
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 12:33 pm

Why this specific version?
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 12:47 pm

meerkt wrote:
Why this specific version?

It wouldn't have particularly mattered to me if it was SPICE 3 because they are compatible (I would have just preferred SPICE 2), but it doesn't matter anyway because no one has distributed a complied version for a modern OS. Apparently there was a bug in the C code that prevented stock SPICE 3 from compiling the last time there was a documented attempt back in the 2004.
Last edited by DrDominodog51 on Thu Jul 07, 2016 1:12 pm, edited 2 times in total.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
meerkt
Gerbil Jedi
Posts: 1754
Joined: Sun Aug 25, 2013 2:55 am

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 12:48 pm

 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 12:56 pm

Wait wait wait I found it. Someone patched the last version of SPICE 3 and distributed it. GSpeakers (A no longer maintained program for loudspeaker design that was last updated in 2004) has a dependency on SPICE 3 and included a link to the patched version and instructions on how to install. It was last tested on Red Hat 7.3 though :o. I'll include links and instructions here after I see if I can compile it.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 1:21 pm

Compiling isn't *that* scary. On Linux, all of the tools required to do it are typically in the distro's repository -- even for "legacy" languages like FORTRAN and COBOL. Best case, it "just works". Worst case it throws a bunch of compile errors, at which point you either say "oh well, that didn't work" and move on, or start a deep dive to figure out how to get it to compile.
Nostalgia isn't what it used to be.
 
Redocbew
Minister of Gerbil Affairs
Posts: 2495
Joined: Sat Mar 15, 2014 11:44 am

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 1:23 pm

Plus, then you can do this.

Image
Do not meddle in the affairs of archers, for they are subtle and you won't hear them coming.
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 2:18 pm

just brew it! wrote:
Compiling isn't *that* scary. On Linux, all of the tools required to do it are typically in the distro's repository -- even for "legacy" languages like FORTRAN and COBOL. Best case, it "just works". Worst case it throws a bunch of compile errors, at which point you either say "oh well, that didn't work" and move on, or start a deep dive to figure out how to get it to compile.

Luckily, SPICE 3 is in C not FORTRAN like the other versions so it should be a walk in the park. I'm going to wait until I get an SSD to boot my favorite Debian based distro from.
Redocbew wrote:
Plus, then you can do this.

Image

True, but it isn't that large a program unfortunately.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 2:30 pm

DrDominodog51 wrote:
Redocbew wrote:
Plus, then you can do this.
Image

True, but it isn't that large a program unfortunately.

Compile it on a Raspberry Pi!
Nostalgia isn't what it used to be.
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 2:41 pm

just brew it! wrote:
DrDominodog51 wrote:
Redocbew wrote:
Plus, then you can do this.
Image

True, but it isn't that large a program unfortunately.

Compile it on a Raspberry Pi!

I thought of that right after my first post about it being a small program. That actually isn't a bad idea considering what this originally ran on.
Edit: And SPICE dumps regular text files that are fairly small as well. The Pi might be a good choice for running this.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Thu Jul 07, 2016 11:40 pm

The good: The webpage that had the build instructions also linked to rpmfind.net. It included several rpms of SPICE 3. The latest version I could find was built in 2009 for Mandriva. The website also includes a list of dependencies.

The bad: The list of dependencies is missing version numbers. For example "libSM.so.6()(64bit) >=" is something on the screen without any version number following. This is primarily a concern for the package that needs a version below something but is missing the number after.

The mediocre: It wouldn't compile in a VM running Semplice 7.0.1, and I'm going to have to set up a Fedora VM.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Fri Jul 08, 2016 8:35 pm

After finding a download for Fedora Core 1, installing it, the compile failing, finding a repo still online for up2date, failing to find a repo still online for yum, and failing to find an iso of any version for Mandriva, I have given up trying to run this on Linux. The only thing left to try is a DOS emulator running the original program. If this fails, I'm downloading ngspice.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 12:59 am

Well... I need Microsoft C 5.1 to run it in DOS. Even if I had a copy, I would need to have a 5.25" drive to read it. This was a complete waste of my time. It appears there are only 4 ways to get SPICE 3 running these days:

1) If you get a copy of Microsoft C 5.1 and a computer running MS-DOS, you can download the Spice3f4 kit from here and compile the program according to the instructions in the readme text file.

2) If you get a legacy system running VAX, SunOS 4, DEC Alpha, Sun3, Sun4, OSF 1, or Ultrix 4, you can download the same file as above and compile it following the instructions in the readme.

3) If you download the RPM file from here and get all of the dependencies installed, you should be able to install the RPM and get SPICE 3.

4) If you download the rpm from above and view all of the dependencies, install those, and follow the instructions here, you should get it installed.

I'm downloading ngspice right now. Thanks for the help everyone.

Edit: I need to stop PUI
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 4:28 am

ngspice is probably your best bet, as it is still supported.

Alternatively, I'd try building one of the older source versions with a modern distro like Ubuntu and post the compilation errors here. It might be something simple.

Installing the FORTRAN compiler on Linux is trivial, so you could even try the UNIX version of SPICE 2. I can probably walk you through giving that a shot if you want.
Nostalgia isn't what it used to be.
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 10:06 am

just brew it! wrote:
ngspice is probably your best bet, as it is still supported.

Alternatively, I'd try building one of the older source versions with a modern distro like Ubuntu and post the compilation errors here. It might be something simple.

Installing the FORTRAN compiler on Linux is trivial, so you could even try the UNIX version of SPICE 2. I can probably walk you through giving that a shot if you want.

Would compiling without all of the dependencies would cause the compile to fail? Core 1 lacked of three dependencies according to the rpm. (On a completely unrelated note; Core 1's installer is the best installer I've ever seen)
The Ministry of Dependency Hell wrote:
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames)
libICE.so.6()(64bit)
libSM.so.6()(64bit) >= ??
libX11.so.6()(64bit)
libXaw.so.7()(64bit)
libXext.so.6()(64bit)
libXmu.so.6()(64bit)
libXt.so.6()(64bit)
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.7)(64bit)
libm.so.6()(64bit) >= ??
libm.so.6(GLIBC_2.2.5)(64bit) >= ??
libtermcap.so.2()(64bit) < ??
rtld(GNU_HASH)
rpmlib(PayloadIsLzma) < 4.4.6-1

I filled in the question marks where the web page is missing the version number following a sign. I'm going to try one last time with CentOS 7. I'll download the rpm and see what dependencies are missing from there.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 11:04 am

Just took a quick look at the FORTRAN version for you. I got the monster (18000+ lines) main program to compile (with some warnings), but it too seems to be depending on some library routines that are missing (undefined references at link time).

Looks like getting legacy SPICE up and running on a modern system is a non-trivial exercise.
Nostalgia isn't what it used to be.
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 11:30 am

just brew it! wrote:
Just took a quick look at the FORTRAN version for you. I got the monster (18000+ lines) main program to compile (with some warnings), but it too seems to be depending on some library routines that are missing (undefined references at link time).

Looks like getting legacy SPICE up and running on a modern system is a non-trivial exercise.

Yeah. I've given up all hope on SPICE 2 at this point. The C in SPICE 3 still holds some promise if I can get all of the dependencies installed.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 1:26 pm

Here are the errors I get from compiling SPICE 3 after following the instructions from here. It looks there is some syntax the compiler doesn't like. I included some warnings that follow some errors because they appear to be related.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 2:51 pm

Got a little present for you... I got SPICE 2 to compile and link on Linux! You can grab a copy of it at http://uchima.net/trstuff/spice2-for-linux.tar.gz

This is a slightly hacked up version of the "SPICE 2 for UNIX" linked in one of the previous posts. I added a README that explains the modifications which were required to get it to build, and how to recompile it.

An x86-64 binary is included (in the file "spice"), which should be runnable on any recent 64-bit x86 Linux distro.

I have no idea if it actually works, but it appears to expect you to supply a SPICE 2 simulation to it on standard input; if I feed it an empty input file, it spits out the error "INPUT DECK (FILE) CONTAINS NO DATA", so it is doing *something*! :wink:

Edit: Turns out the missing "library" routines were actually in the unix.c source file that was included in the original distribution. I had glanced at it previously, and thought it was just a test harness; but the missing functions were all in there. After disabling the VAX inline assembly code optimizations :lol: and modifying the code used to grab command line arguments to be compatible with Linux, I was able to get a clean(-ish) compile and link.

Edit 2: Quite amused at the use of the phrase "INPUT DECK" in the error message. Gives you an idea of the vintage of the code we're dealing with here! (As in, it is *almost* as old as I am...) :lol:

Edit 3: There were still quite a few compiler warnings; I did not dig into those, and some may in fact prevent proper operation. I only addressed the ones which were causing the compilation to fail. "It compiles... SHIP IT!"
Nostalgia isn't what it used to be.
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 3:01 pm

:D Thanks a lot JBI. I was just about to post an update on how 2 files needed for Spice 3 went missing from the face of this planet making it impossible to compile. I need to convince the job that it is worth the time and money to port some SPICE simulations to a modern program now.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 3:17 pm

Getting back to your ngspice (mis)adventure... those look like standard runtime, math, X11, etc. libraries. Whatever is shipped with the distro might work even if they are not the exact same version. Not sure what's up with the missing header file that seems to be part of the reason for your compilation difficulties... I think you might be able to get past some of the other errors by specifying compiler switches to make the compiler revert to something closer to "classic" (K&R) C.
Nostalgia isn't what it used to be.
 
DrDominodog51
Gerbil Elite
Topic Author
Posts: 716
Joined: Sat Jan 17, 2015 12:23 pm
Location: Silicon Valley

Re: SPICE 2 for a modern OS

Sat Jul 09, 2016 3:18 pm

just brew it! wrote:
Getting back to your ngspice (mis)adventure... those look like standard runtime, math, X11, etc. libraries. Whatever is shipped with the distro might work even if they are not the exact same version. Not sure what's up with the missing header file that seems to be part of the reason for your compilation difficulties...

Oh. That's from SPICE 3 not ngspice. I'm sure Cent OS has ngspice in the repos.
A10-7850K; GA-F2A88XN-WIFI, 16 GB of 2400MHz DDR3, 500 GB Team Group L5 SSD

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On