[CMake] *** No rule to make target `SET.mod.proxy'

Alan W. Irwin irwin at beluga.phys.uvic.ca
Tue Sep 5 19:25:06 EDT 2006


On 2006-09-05 14:45-0700 Russell L. Carter wrote:

> Greetings,
> I am new to cmake and am encountering this error when
> I try to build a trivial Fortran library:
>
> rcarter at feyerabend [216] make
> Scanning dependencies of target hwode
> make[2]: *** No rule to make target `SET.mod.proxy', needed by 
> `hwode/CMakeFiles/hwode.dir/dop853.o.requires'.  Stop.
> make[1]: *** [hwode/CMakeFiles/hwode.dir/all] Error 2
> make: *** [all] Error 2

Our project (PLplot) has a similar issue with cmake-2.4.3.  I think what is
going on is the fortran 95 compiler (gfortran in our case, ifort in yours)
generates a fortran module.  In our case that is called plplot.mod and it is
generated by the fortran compiler in the top-level build tree.  Note, that
cmake also parses the fortran source trying to track module dependencies.
But it gets the fortran module name wrong so in our case there is an
incorrect dependency on plplot.mod.proxy rather than the correct plplot.mod.
We work around that cmake-2.4.3 bug by making a special rule to create a
top-level file (with arbitrary contents) called plplot.mod.proxy when our
fortran library is built.  This satisfies the incorrect make dependency
created by cmake.

To try the same workaround by hand in your case, run cmake, then "touch
SET.mod.proxy" (in the top-level build tree) then run make.  I think you
will find that temporarily works around the problem, and a custom build rule
will "permanently" work around it.

Of course, a better procedure than such workarounds is to find out why cmake
version 2.4.3 is generating a make dependency on modulename.mod.proxy rather
than modulename.mod, but I haven't been able to figure that out.  I haven't
made a bug report about this because I wanted to provide a solution at the
same time.  (cmake developers have fairly recently asked for fortran help
because they do not use fortran in their own work.)

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list