Re: [Rd] Optimization in R

From: Christophe Pouzat <>
Date: Sun, 05 Aug 2007 12:57:30 +0200

Hi guys,

I ran into the same problem and solved it by changing one line in Andrew's Makefile:

instead of: vector.o multimin.o

    gcc -g -Wall -shared $^ -lgsl -o $@

use: vector.o multimin.o

    gcc -g -Wall -shared $^ -o $@ -lgsl -lgslcblas -lm


Thanks for the functions!
> I tried installing the multimin function. To get it to compile, I needed
> to change the Makefile to reflect my path and by adding the flags fPIC
> in response to the error: "/usr/bin/ld: vector.o: relocation R_X86_64_32
> against `a local symbol' can not be used when making a shared object;
> recompile with -fPIC"
> However, I get the following running test.R:
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
> unable to load shared library '/home/mmorales/Desktop
> /multimin/':
> /usr/lib64/ undefined symbol: cblas_ctrmv
> I'm running R-2.5.1 compiled for x86_64 with a custom built ATLAS.

A Master Carpenter has many tools and is expert with most of them. If you
only know how to use a hammer, every problem starts to look like a nail.
Stay away from that trap.
Richard B Johnson.

Christophe Pouzat
Laboratoire de Physiologie Cerebrale
UFR biomedicale de l'Universite Paris V
45, rue des Saints Peres
75006 PARIS

tel: +33 (0)1 42 86 38 28
fax: +33 (0)1 42 86 38 30

	[[alternative HTML version deleted]]

______________________________________________ mailing list
Received on Sun 05 Aug 2007 - 11:02:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 05 Aug 2007 - 11:37:32 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.