[R-SIG-Mac] R 3.0.1 build from sources: Wrong library paths

Berend Hasselman bhh at xs4all.nl
Fri Sep 13 10:19:08 CEST 2013


On 12-09-2013, at 20:16, Simon Zehnder <szehnder at uni-bonn.de> wrote:

> Simon,
> 
> I found the fix: I needed the configure option --with-included-gettext. This is now the whole sequence of processes I did: 
> 
> 1. Install XCode (newest version)
> 2. Install Command Line Tools (in XCode) 
> 3. On the shell I used sudo xcodebuild -license
> 4. I installed MacTex and MacPorts
> 5. In MacPorts I installed the ports: gcc48 (GCC 4-8-1 Compiler), valgrind-devel, gettext
> 6. I had to remove /usr/local/bin and /usr/local/sbin from my PATH variable, as these folders do not exist.
> 7. I had to add /usr/texbin to the PATH variable for R to find the pdflatex command. 

This bit I don't understand.
After installing MacTeX and either logging out and in or restarting /usr/texbin should have been in PATH (at least that is the intention of MacTeX).

Also I assume you have XQuartz installed. If so, that should also be mentioned in your recipe.

Berend


> 8. Then I installed the Oracle JDK and added this to the config.site file in the R-3.0.1 folder: 
> JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/HomeJAVA_CPPFLAGS="-I/${JAVA_HOME}/include -I/${JAVA_HOME}/include/darwin"
> JAVA_LD_LIBRARY_PATH="${JAVA_HOME}/jre/lib/server"
> JAVA_LIBS="-L/${JAVA_HOME}/jre/lib/server -ljvm"
> 9. On the shell I used:
> export LANG=en_US.UTF-8
> export PKG_CONFIG_PATH=/opt/X11/lib/pkgconfig:/usr/lib/pkgconfig
> 10. In a '~/Downloads/build' folder run:
> ../R-3.0.1/configure --bindir=/usr/bin --sbindir=/usr/bin --with-system-zlib --enable-memory-profiling --with-blas="-framework Accelerate" --with-lapack --x-includes=/usr/X11/include --x-libraries=/usr/X11/lib --with-valgrind-instrumentation=2 OBJC="clang" LDFLAGS=-L/opt/local/lib CPPFLAGS=-I/opt/local/include --with-included-gettext
> 11. make && make check && sudo make install 
> 12. I run on the shell (do not know why --bindir and --sbindir didn't make it) 
> sudo ln -s /Library/Frameworks/R.framework/Resources/bin/R /usr/bin/R
> 13. I had to add 
> export LANG=en_US.UTF-8 in .profile
> (defaults write org.R-project.R force.LANG en_US.UTF-8 did not work, did it several times with reopening the terminal)
> 
> I installed the packages nloptr (this still worked) and Rcpp (this worked now as well - the ld error: library not found: lintel, has gone)
> 
> So far this works quite nice. If there are some updates on stability I let you know. 
> 
> My config.log can be seen here: 
> 
> https://gist.github.com/anonymous/6541684 
> 



More information about the R-SIG-Mac mailing list