From Kurt.Hornik@wu-wien.ac.at  Sat Apr  6 23:09:19 2002
From: Kurt.Hornik@wu-wien.ac.at (Kurt Hornik)
Date: Sun, 7 Apr 2002 00:09:19 +0200
Subject: [Rd] packages in OS X
In-Reply-To: <6D12405D-4994-11D6-9787-000393860F3C@stat.ucla.edu>
References: <6D12405D-4994-11D6-9787-000393860F3C@stat.ucla.edu>
Message-ID: <15535.29199.962752.731527@mithrandir.hornik.net>

>>>>> Jan de Leeuw writes:

> =======================================================================
> Simple CRAN packages which do not compile without modifications (all 
> others do)
> =======================================================================
>      -- akima
> /usr/bin/ld: multiple definitions of symbol _idlc_

>      -- fracdiff
> /usr/bin/ld: multiple definitions of symbol _gammfd_
> (and others)

>      -- odesolve

>      -- princurve
>     lamix:
> Error on line 116: Declaration error for v: adjustable dimension on 
> non-argument

>     -- splancs
> /usr/bin/ld: multiple definitions of symbol _bounds_

>      -- wle
>   mleaic:
> Error on line 229: Declaration error for work: adjustable dimension on 
> non-argument

>    -- subselect
> configure: error: R was configured without a FORTRAN compiler
> ERROR: configuration failed for package `subselect'

> The multiple defined symbols are a well known OS X problem. There are
> ad hoc fixes using linker flags, but the best way to fix this is to
> use extern in the source code (although almost all these packages use
> f2c to translate the fortran into c). The "adjustable dimension" error
> is possibly an f2c problem. Ans subselect does not recognize f2c as a
> fortran compiler.

I recently added a shell script wrapper to compile/link FORTRAN 77 code
based on f2c, which for the purpose of Autoconf can be used as the
FORTRAN 77 compiler.  The configure script in subselect will need to be
modified to use R CMD config F77 (rather than grep/sed on etc/Makeconf)
for getting this.  But this will only make the configuration error go
away: the package will still not compile because the code, as wle and
princurve, use variable-sized arrays.  

> CRAN packages which compile and install, but do not work

>> library("Matrix")
> Error in dyn.load(x, as.logical(local), as.logical(now)) :
>          unable to load shared library 
> "/sw/lib/R/library/Matrix/libs/Matrix.so":
>    dlcompat: dyld: /sw/lib/R/bin/R.bin Undefined symbols:
> _ATL_cGetNB
> _ATL_dGetNB
> _ATL_sGetNB
> _ATL_zGetNB
> _cblas_dgemm
> _cblas_dscal
> _cblas_dswap
> _cblas_dsyrk
> _cblas_dtrsm
> _cblas_idamax
> _dsymv_
> Error in library("Matrix") : .First.lib failed

> If I use nm on Matrix.so, all these symbols are undefined.

[I assume there are in your Atlas and cblas libs?  What does ldd on
Matrix.so say?]

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[Rd] packages in OS X
Kurt Hornik