[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-sig-mac
Subject:    Re: [R-SIG-Mac] Installing package from source
From:       Göran Broström <botstrp () gmail ! com>
Date:       2011-05-08 12:00:59
Message-ID: BANLkTikOjy5TNPV-POP+MX1zpRcOj5VTdQ () mail ! gmail ! com
[Download RAW message or body]

2011/5/8 Simon Urbanek <simon.urbanek@r-project.org>

> There is a lot of missing pieces, but I bet that your package links
> unversioned libatlas-MacPro.dylib instead of libRblas.dylib and you don't
> have the appropriate symlinks in x86_64.


Yes and No(?). In x86_64, there is a symlink

libRblas.dylib -> ../libRblas.dylib, and in ..: libRblas.dylib ->
libatlas-MacPro.dylib

And similarly in i386 and ppc. Shouldn't that work like your suggestion b)?
It doesn't.


> (Just for the record: this is "your mileage may vary" setup and is NOT what
> you get when you install R). There are several solutions:
>
> a) switch back to R BLAS when building your package (this is the default in
> "normal" R)
>
> This works.


> b) make a symlink from to all sub-arch directories (i386, x86_64 possibly
> ppc) to libatlas-MacPro.dylib. This is a just a hack - your binaries won't
> work on anyone else's machines.
>
> This doesn't work either; maybe I misunderstood? I did, in x86_64, ppc, and
i386:

ln -sfn ../libatlas-MacPro.dylib libRblas.dylib

I would prefer this to a) since it avoids switching back and forth; I don't
care about moving binaries.

Thanks for your help,

Göran


> c) add versioned path to your libatlas-MacPro.dylib using install_name_tool
> -id, preferably pointing to libRblas and NOT the MacPro variant, i.e. for R
> 2.13.x:
> install_name_tool -id
> /Library/Frameworks/R.framework/Versions/2.13/Resources/lib/libRblas.dylib
> libatlas-MacPro.dylib
>
> Cheers,
> Simon
>
>
>
> On May 7, 2011, at 6:07 PM, Göran Broström wrote:
>
> > I'm new to the Mac, but have used  R  under Linux for about 15 years. Now
> >
> > R CMD INSTALL skel_1.0-2.tar.gz
> >
> > fails with error message
> > ------------------------------------
> > Error in dyn.load(file, DLLpath = DLLpath, ...) :
> >  unable to load shared object
> >
> '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel/libs/x86_64/skel.so':
> >
>  dlopen(/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel/libs/x86_64/skel.so,
> > 6): Library not loaded: libatlas-MacPro.dylib
> >  Referenced from:
> >
> /Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel/libs/x86_64/skel.so
> >  Reason: image not found
> > Error: loading failed
> > Execution halted
> > ERROR: loading failed
> > * removing
> > '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel'
> > * restoring previous
> > '/Library/Frameworks/R.framework/Versions/2.13/Resources/library/skel'
> > ----------------------------------
> >
> > The 'libatlas-MacPro.dylib' seems to be the culprit, but who knows? I
> > installed it just before this, following Simon's recipe from a post to
> this
> > list in October 2010.
> > skel is a private package which installs under Linux and Windose without
> > problems.
> >
> >> sessionInfo()
> > R version 2.13.0 (2011-04-13)
> > Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
> >
> > locale:
> > [1] C/C/C/C/en_US.UTF-8/C
> >
> > attached base packages:
> > [1] stats     graphics  grDevices utils     datasets  methods   base
> >
> > I have also installed gfortran, Xcode, etc.
> >
> > Göran
> >
> >       [[alternative HTML version deleted]]
> >
> > _______________________________________________
> > R-SIG-Mac mailing list
> > R-SIG-Mac@r-project.org
> > https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>

	[[alternative HTML version deleted]]



_______________________________________________
R-SIG-Mac mailing list
R-SIG-Mac@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-mac


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic