I have downloaded f2cl (comprising f2cl[0-8].l and
macros.l) from CLOCC CVS. I am running clisp 2.31 on
Linux (RH 7.1).
I executed (load 'f2cl0.l), etc to load the f2cl functions.
I have a Fortran function /tmp/my.f. Executing
(f2cl:f2cl 'my.f :verbose t) yields an error message,
*** - no file name given: #P"/tmp/.p"
The message is coming from the function preprocess in
f2cl6.l. The problem is that at line 117 there is an
assignment to outfile-name which uses
translate-pathname to construct a file name.
The arguments to translate-pathname are, effectively,
(translate-path #P"/tmp/my.f #P"/tmp/my.f" #".p")
I am guessing the intent is to construct #P"/tmp/my.p"
but what is returned by translate-pathname is just
#P".p", which leads to an error when an attempt is made
to open the file. (Actually since ".p" is a valid
filename, I don't see why it fails, but if we fix the
name construction that's no longer an issue.)
It doesn't seem necessary to use translate-pathname. I
think the outfile-name could be set to
(make-pathname :host (pathname-host compiled-path)
:directory (pathname-directory compiled-path)
:name (pathname-name compiled-path)
or something like that.
If I hard code a value for outfile-name (say
"/tmp/tmp.p") then f2cl works as expected.
The Lisp reference manual at CMU (HyperLisp, I believe
it's called) states (Sec 19.4) that translate-pathname
is implementaton dependent. So I can believe that
f2cl6.l was developed using some version of Lisp that
makes it work correctly.
For what it's worth,