[Rd] configure on mac

roger koenker rkoenker at uiuc.edu
Tue Aug 15 21:21:08 CEST 2006


Apologies for my ignorance about these matters.

I think that the multiply defined symbols were probably my fault.  After
removing some lapack routines and using a
modified version of Makevars  suggested by Martin Maechler

## we use the BLAS and now also the LAPACK library:
PKG_LIBS= $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)

The multiple definitions problems don't appear, but instead I get  --  
trying to INSTALL
quantreg  --  the same problem with undefined _xerbla_ appears when I  
try to install
Matrix.  A variety of other source packages install without complaint.

gcc -dynamiclib -Wl,-macosx_version_min -Wl,10.3 -undefined  
dynamic_lookup -single_module
-multiply_defined suppress -L/sw/lib -L/usr/local/lib -o quantreg.so  
akj.o boot.o chlfct.o
cholesky.o dsel05.o extract.o kuantile.o mcmb.o penalty.o qrcens.o  
rls.o rq1.o rqbr.o rqf
n.o rqfnb.o rqfnc.o sparskit2.o srqfn.o srqfnc.o srtpai.o -L/Library/ 
Frameworks/R.framewor
k/Resources/lib -lRlapack -L/Library/Frameworks/R.framework/Resources/ 
lib -lRblas -L/usr/l
ocal/lib/gcc/powerpc-apple-darwin8/4.0.0 -L/usr/local/lib/gcc - 
lgfortran -lgcc_s -lSystemS
tubs -lmx -lSystem -L/usr/local/lib/gcc/powerpc-apple-darwin8/4.0.0 - 
L/usr/local/lib/gcc -
lgfortran -lgcc_s -lSystemStubs -lmx -lSystem -F/Library/Frameworks/ 
R.framework/.. -framew
ork R
ld: warning can't open dynamic library: libR.dylib referenced from: / 
Library/Frameworks/R.
framework/Resources/lib/libRlapack.dylib (checking for undefined  
symbols may be affected)
(No such file or directory, errno = 2)
ld: Undefined symbols:
_xerbla_ referenced from libRlapack expected to be defined in libR.dylib
/usr/bin/libtool: internal link edit command failed

_xerbla_  is in

yzzy: otool -Tv libR.dylib | grep xerbla
single module    _xerbla_

which doesn't appear to be part of the ld above.... should it be?   
Can this be arranged
by modifying Makevars?


url:    www.econ.uiuc.edu/~roger            Roger Koenker
email    rkoenker at uiuc.edu            Department of Economics
vox:     217-333-4558                University of Illinois
fax:       217-244-6678                Champaign, IL 61820

On Aug 15, 2006, at 1:08 AM, Prof Brian Ripley wrote:

> On Tue, 15 Aug 2006, stefano iacus wrote:
>
>> It seems that there are symbols defined in more than one header. This
>> causes problems on mac. You should define the symbol in one header
>> and declare elsewhere as extern. You can find examples in main.c (if
>> I remember well).
>> I'm not sure this is the problems, but it looks like
>
> One of the reasons given by Simon for this change was that was no  
> longer
> a problem: see the last sentence of
>
>     o   MacOS X 10.3 and higher now use two-level namespaces, single
>         module in a shared library and allow undefined symbols to be
>         resolved at run-time. This implies that common symbols are now
>         allowed in package libraries.
>
> What apparently is a problem is having the same entry point in  
> multiple
> dynamic libraries (we have had to deal with LSAME, NEWS item two  
> up).  I
> think this means that having arranged specially to satisfy symbols on
> MacOS, we now need to change it, so in src/extra/blas/Makefile.in
>
> Rblas_la_LIBADD = @RBLAS_LDFLAGS@ @DYLIB_UNDEFINED_ALLOWED_FALSE@ $ 
> (FLIBS)
>
> '@DYLIB_UNDEFINED_ALLOWED_FALSE@' needs to be '#'.
>
> and we may then need to link against $(FLIBS) elsewhere.
>
> We need Simon's input: to the rest of us the ever-increasing number of
> ways that MacOS needs special pampering is a mystery.
>
>> stefano
>>



More information about the R-devel mailing list