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 (4) made R visible from the command line sudo ln -s /Library/Frameworks/R.framework/Resources/R /usr/local/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 I found a similar something similar on https://stat.ethz.ch/pipermail/r-help/2007-December/147771.html but it was not answered. 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
Installing R from source: "../i386/ldpaths: No such file or directory"
5 messages · Marius Hofert, Simon Urbanek, Charlie Sharpsteen
Okay, I found out that I have to start R via "R --arch=x86_64", then I can start R. I simply created a shell alias and I can now just use "R". See also the full post: http://www.mail-archive.com/r-sig-mac at stat.math.ethz.ch/msg02207.html Begin forwarded message:
From: Marius Hofert <marius.hofert at math.ethz.ch> Subject: Installing R from source: "../i386/ldpaths: No such file or directory" Date: 2011-10-02 15:11 To: Help R <r-sig-mac at r-project.org> 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 (4) made R visible from the command line sudo ln -s /Library/Frameworks/R.framework/Resources/R /usr/local/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 I found a similar something similar on https://stat.ethz.ch/pipermail/r-help/2007-December/147771.html but it was not answered. 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
Marius,
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
/Library/Frameworks/R.framework/Resources/bin/R
and replace
: ${R_ARCH=/`arch`}
with
: ${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 ...
Cheers,
Simon
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
1 day later
On Sunday, October 2, 2011 8:12:20 AM UTC-7, Simon Urbanek wrote:
The framework installation uses `arch` to determine the default
architecture which in your case is i386 but it is not installed. You can
edit
/Library/Frameworks/R.framework/Resources/bin/R
and replace
: ${R_ARCH=/`arch`}
with
: ${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 ...
Cheers,
Simon
I run 10.6.8 with an x86_64 kernel and `arch` still returns i386 which is a bit misleading. For the Homebrew package manager, we decide if 64 bit binaries are preferred by checking the return value of `/usr/sbin/sysctl -n hw.cpu64bit_capable`. -Charlie -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://stat.ethz.ch/pipermail/r-sig-mac/attachments/20111003/4ebd70d4/attachment.html>
On Oct 3, 2011, at 4:12 PM, Charlie Sharpsteen wrote:
On Sunday, October 2, 2011 8:12:20 AM UTC-7, Simon Urbanek wrote:
The framework installation uses `arch` to determine the default architecture which in your case is i386 but it is not installed. You can edit
/Library/Frameworks/R.framework/Resources/bin/R
and replace
: ${R_ARCH=/`arch`}
with
: ${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 ...
Cheers,
Simon
I run 10.6.8 with an x86_64 kernel and `arch` still returns i386 which is a bit misleading.
Yes, you can use `uname -m` to get the kernel preference.
For the Homebrew package manager, we decide if 64 bit binaries are preferred by checking the return value of `/usr/sbin/sysctl -n hw.cpu64bit_capable`.
Well, that is a bit misleading, too, because it assumes that 64-bit capable machines prefer 64-bit binaries, which is not always true (e.g. low-memory machines usually don't want the extra overhead). The `arch` idiom was designed to tell PowerPC and Intel apart, it was not designed to detect preference between 32 and 64-bit - in fact 32-bit is more safe in that it will work anywhere (so far, I would not surprised if Apple changes that, too ;)). Cheers, Simon