[R] Building package on Windows: No rule to make target '-llapack'
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Jun 10 08:40:38 CEST 2004
On Wed, 9 Jun 2004, Zhu Wang wrote:
> I have a problem to build a package on Windows XP while there is no
> problem on Linux. The Makefile is something like:
There would be a problem on Linux, if that Makefile were used. I suspect
it is not used.
> PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
(You should not need $(FLIBS) here.)
> OBJS=file1.o ... file20.o -llapack -lblas
The last two are not objects, and -llapack refers to something like
liblapack.a. I don't see how this can work anywhere. On the other hand,
you have lapack and blas selected in PKG_LIBS, but you are not using that
> $(LIBNAME)$(SHLIB_EXT): $(OBJS)
> $(SHLIB_LD) $(SHLIB_LDFLAGS) -o $@ $(OBJS) $(FLIBS)
> @rm -f *.o *.$(SHLIB_EXT)
> realclean: clean
> To build the package on Windows XP, I have followed the instructions to
> install tools/software required and it seems the 'make' worked fine,
> except for the error message:
> make: No rule to make target 'llapack', needed by 'cts.a'. stop.
> Now I think maybe two problems: one is that maybe I do not have Lapack and Blas installed
> on Windows XP and second is that I do not set up a correct file, something like 'configure'.
> Maybe there are more problems. I have read some files in \src\gnuwin32, but I did not find
> what I needed.
What are you actually trying to do? It is not normal for a package to
have a Makefile in its src directory, which is what I guess (but only
guess) you have presented. All that is normally needed is a Makevars
file. Take a look at e.g. that in mclust.
Is this your package or someone else's (in which case why are you not
asking the author)? Either you or that author needs to read `Writing R
Extensions' and look at some of the many examples in CRAN packages.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help