[R] problem installing quadprog

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Thu May 30 18:53:51 CEST 2002

On Thu, 30 May 2002 john_heumann at agilent.com wrote:

> When I try to build/install the quadprog package under R1.50 and NT4
> it seems to have trouble finding blas routines. I'm currently using the
> generic blas routines, rather than ATLAS or some other tuned implementation:

Although you do not say, I presume you installed from SetupR.exe rather
than building from the sources yourself?

>    > Rcmd INSTALL d:/temp/quadrprog
>    ...
>    gcc  --shared -s  -o quadprog.dll quadprog.def quadprog.a quadprog_res.o  -Lc:/a
>    pps/rw1050/src/gnuwin32  -lg2c -lR
>    quadprog.a(util.o)(.text+0x84):util.f: undefined reference to `dscal_'
>    quadprog.a(util.o)(.text+0xfa):util.f: undefined reference to `daxpy_'
>    quadprog.a(util.o)(.text+0x188):util.f: undefined reference to `ddot_'
>    quadprog.a(util.o)(.text+0x21f):util.f: undefined reference to `daxpy_'
>    make[2]: *** [quadprog.dll] Error 1
> rBlas.dll is present in <RHOME>/bin, but note that there is no "-L" directive
> for that directory. If I add it, the installation completes correctly.
> Is there something wrong with my installation, or has the <RHOME>/bin
> directory accidentally been left off the library search path?
> What's the easiest way for me to fix this, so I don't encounter the same
> problem when building other packages? (BTW, this is the first optional
> package I've had trouble with. Everything else has built/installed correctly).

You should not be linking against a DLL but against an import library.
I get

gcc  --shared -s  -o quadprog.dll quadprog.def quadprog.a quadprog_res.o
-Lc:/R/rw1051/src/gnuwin32  -lg2c -lRblas -lR

The best solution is to build R from the sources yourself.  Looks like the
Windows maintainer has not checked that the source packages in the binary
distribution can link against Rblas.

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 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list