[R-SIG-Mac] Installing R from source: "../i386/ldpaths: No such file or directory"

Simon Urbanek simon.urbanek at r-project.org
Sun Oct 2 17:12:20 CEST 2011


On Oct 2, 2011, at 9:11 AM, Marius Hofert wrote:

> Hi,
> I tried to install R from source on a new MacBook Air running 10.7.1. I followed the steps in the R-Faq and did:
> (1) installed Xcode 4.1
> (2) installed a *corresponding* Fortran compiler from
> http://r.research.att.com/tools -> "Apple Xcode gcc-42 add-ons" [the
> correct version for Xcode 4.1 on Lion was gfortran-lion-5666-3.pkg]
> (3.1) downloaded and unpacked the latest R sources from CRAN (R-2.13.2.tar.gz)
> cd ~/Downloads
> (3.2) chose the architecture (x86_64, i386, ppc or ppc64):
> arch=x86_64
> (3.3) created a build directory 
> mkdir build
> cd build
> (3.4) configured R
> ../R-2.13.2/configure r_arch=$arch  CC="gcc -arch $arch" \
>     CXX="g++ -arch $arch" F77="gfortran -arch $arch" \
>     FC="gfortran -arch $arch" OBJC="gcc -arch $arch" \
>     --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib \
>     --with-blas='-framework vecLib' --enable-BLAS-shlib --with-lapack
> (3.5) built R
> make -j8
> (3.6) installed R in /Library/Frameworks
> sudo make install

(FWIW: you don't need sudo if you are admin. If you use sudo once, you have to use it always.)

> (4) made R visible from the command line
> sudo ln -s /Library/Frameworks/R.framework/Resources/R /usr/local/bin/R 

(FWIW: the canonical location is /Library/Frameworks/R.framework/Resources/bin/R)

> Executing R in the shell (even after restart) brought:
> bash-3.2$ R
> /usr/local/bin/R: line 229: /Library/Frameworks/R.framework/Resources/etc/i386/ldpaths: No such file or directory

The framework installation uses `arch` to determine the default architecture which in your case is i386 but it is not installed. You can edit


and replace 
: ${R_ARCH=/`arch`}
: ${R_ARCH=/x86_64}

The assumption is that if you use a framework the resulting R will be universal, but it your case it's not. I'll see if we can come up with something more robust ...


> I found a similar something similar on https://stat.ethz.ch/pipermail/r-help/2007-December/147771.html but it was not answered. 

wrong list ;)

> I check with the installation (from binaries) on another Mac. There the folder /Library/Frameworks/R.framework/Resources/etc contains "i386", "repositories", and "x86_64", but for the new installation, I only found subdirectories "repositories" and "x86_64". 
> Cheers,
> Marius
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac

More information about the R-SIG-Mac mailing list