Mail Archives: djgpp/1996/03/15/18:01:10
On Fri, 15 Mar 1996, Wolfram Brenig wrote:
> Hi,
> anybody out there who has succeeded to recompile the f2c95201 V1.x-app
> using djgpp's V2.x (on something like a 486PC). My V2.x setup chokes on
> virtually all of the related makefiles (which I am seemingly to inferior
> to get straight).
> Any help is very much appreciated. I am NOT subscribing to the djgpp
> mailing list so please mail your comments to:
>
As luck would have it, I just compiled F2c under V2 because I wanted to
build the SPICE circuit simulator. I assume your DJGPP setup is correct
(ie DJGPP variable points at your DJGPP.ENV file, etc), and you unpacked
f2c95201.zip in your DJGPP directory (for me, /lang/djgpp).
I just unpacked the ZIP file the usual way (with -d). Next, change to your
/djgpp/contrib/f2c95201/src/src
directory (or wherever you unpacked the files) and edit the Makefile,
like this:
replace the line saying
cat gram.head gram.dcl gram.expr gram.exec gram.io >>gram
(this is line 37 of the makefile) with
type gram.head >>gram
type gram.dcl >>gram
type gram.expr >>gram
type gram.exec >>gram
type gram.io >>gram
also replace the line saying
rm -f gram gram_tab.c
(this is line 48 of the original makefile, but once you change line 37,
it's going to change too) with
del gram
del gram_tab.c
An important caveat: do not use QEdit (damn that ^%$@#@#$!@ editor) for
editing the makefile! it strips tabs from the file and replaces them with
spaces, causing Make to whine endlessly. Use the DOS EDIT command, it
works for me, because any command (like `del gram') must be tabbed once
from the beginning of the line.
Once you have modified the makefile, change to the directory
/djgpp/contrib/f2c95201/src
and execute the script `mk.bat'
If you're lucky, everything will compile correctly (at least, it did for
me, and I've rebuilt everything while typing this mail to make sure I
got it right !!!)
When the build is complete, execute the script `install.bat'
That's it! (but I don't know if f2c works OK, I just know it got built
correctly)
FWIW: I built that stuff on an incredibly-buggy Pentium-100 with 16Meg of
RAM (I mean incredibly buggy 'cause it can't run Windoze for 10 minutes
without crashing -- some stupid hardware problem). But since DJGPP
compiled everything correctly with no problems, you should be able, too.
BTW: I *don't* know how to use f2c, I just needed the libf2c.a file and
f2c.h so that I could compile SPICE. I tried using the f2c binary on a
Fortran file I found on Netlib, but it doesn't work !!! :(
Here's what I did:
f2c <pchfd.f
pchfd:
Error on line 204: nondigit in statement label field ". "
Compiler error line 38 of : do_format: Unknown token type in
intermediate file
Do you know what's going on here? the line 204 of pchfd.f contains only a
single period. What's happening? not that I program in Fortran 8(
But I *did* get SPICE 2g6 to compile and execute correctly, so I must've
gotten at least half right!
Cheers,
Orly
------------------------
Orlando A. Andico
oandico AT eee DOT upd DOT edu DOT ph
------------------------
- Raw text -