Re: [R-SIG-Mac] Compiling a portable binary that includes Fortran code
Diego, if you compiled the binary on your Mac with gfortran installed the library created still links to the libgfortran.3.dylib library. In your package shared object file there is now a link to the libgfortran.3.dylib library and when installing to R, this link is searched for but cannot be found, as it is on your Mac and not on the user’s Mac. I guess, if you include the static library instead of the dynamic things work. First look into the shared object file of your package: On the Shell type: otool -L yourpackagename.so There should be a link to libgfortran.3.dylib Second, check if libgfortran.a exists: On The shell type: locate libgfortran Now if it does, try the following: Open your Makevars and add the line PKG_LIBS = -L/path/to/your/libgfortran.a Then recompile and try to install the binary. Also look again into the shared object file with tool -L and check if libgfortran is still in there. May it helps Simon On 05 Nov 2013, at 22:13, Diego M Salvanha dinarus...@gmail.com wrote: Hello- I am facing issues generating my package binary for MacOS. The generated binary doesn't work on another Macs :( It is missing the libgfortran.3.dylib once it's the binary, I'd expect my user doesn't need to have fortran installed ! Could you please help me ? sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-apple-darwin10.8.0 (64-bit) locale: [1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base * installed but doesn't load: Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/Library/Frameworks/R.framework/Versions/3.0/Resources/library/ProbMetab/libs/ProbMetab.so': dlopen(/Library/Frameworks/R.framework/Versions/3.0/Resources/library/ProbMetab/libs/ProbMetab.so, 6): Library not loaded: /usr/local/lib/libgfortran.3.dylib Referenced from: /Library/Frameworks/R.framework/Versions/3.0/Resources/library/ProbMetab/libs/ProbMetab.so Reason: image not found In addition: Warning messages: 1: package ‘ProbMetab’ was built under R version 3.0.2 2: package ‘Rcpp’ was built under R version 3.0.2 3: In fun(libname, pkgname) : mzR has been built against a different Rcpp version than is installed on your system. This might lead to errors when loading mzR. If you encounter such issues, please send a report, including the output of sessionInfo() to the Bioc mailing list -- http://www.bioconductor.org/help/mailing-list. 4: package ‘igraph’ was built under R version 3.0.2 On Tue, Nov 5, 2013 at 12:19 PM, Diego M Salvanha dinarus...@gmail.com wrote: OPSS the right command is: install.packages(ProbMetab_1.0.tgz, repos=NULL) without the type=source Cheers., Diego M Salvanha Grad. Student Inter-institutional Grad Program on Bioinformatics - University of Sao Paulo Member of LabPIB - http://labpib.fmrp.usp.br | Dr. Ricardo Z. N. Vencio Visiting Grad Student | Dr. Nitin Baliga's Group Institute for Systems Biology +1 (206) 732-1415 | +1 (206) 407-8560 On Nov 5, 2013, at 12:16 PM, Diego M Salvanha dinarus...@gmail.com wrote: ProbMetab_1.0.tgz you can install with command: install.packages(ProbMetab_1.0.tgz, repos=NULL, type=source) it should be ok now. then, library(ProbMetab) and let me know it you get any error. sorry to bother but I don't have another mac to try :( Cheers., Diego M Salvanha Grad. Student Inter-institutional Grad Program on Bioinformatics - University of Sao Paulo Member of LabPIB - http://labpib.fmrp.usp.br | Dr. Ricardo Z. N. Vencio Visiting Grad Student | Dr. Nitin Baliga's Group Institute for Systems Biology +1 (206) 732-1415 | +1 (206) 407-8560 Cheers., Diego M Salvanha Grad. Student Inter-institutional Grad Program on Bioinformatics - University of Sao Paulo Member of LabPIB - http://labpib.fmrp.usp.br | Dr. Ricardo Z. N. Vencio Visiting Grad Student | Dr. Nitin Baliga's Group Institute for Systems Biology +1 (206) 732-1415 | +1 (206) 407-8560 [[alternative HTML version deleted]] ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Build R with Intel Compiler
Where does R in make install get its libraries/library paths from to be installed? I set DYLD_LIBRARY_PATH and libiomp5.dylib is on that path … Is there another variable to be set (DYLD_FALLBACK_LIBRARY_PATH I want to use only, if no other possibility remains). Best Simon On 07 Nov 2013, at 19:52, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 7, 2013, at 1:30 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Your and Brian’s guesses were right: the -openmp linker flag was it. It compiles now fine, though I get errors in make check-all and make install: Running a make check-all gives me (with and without flag -ipo) Running examples in 'mgcv-Ex.R’ failed ... Loading required package: splines plot(b,pages=1) b-gamm(y~s(x0,bs=tr,m=2)+s(x1,bs=ps,m=c(1,3))+ + s(x2,bs=tr,m=3)+s(x3,bs=tr,m=2),data=dat) plot(b$gam,pages=1) Warning in sqrt(rowSums((P$X %*% x$Vp[first:last, first:last, drop = FALSE]) * : NaNs produced Error in if (se pd[[i]]$se) { : missing value where TRUE/FALSE needed Calls: plot - plot.gam Execution halted A sudo make install gives me: /opt/intel/composer_xe_2013_sp1.1.103/bin/intel64/icc -std=gnu99 -I. -I../../src/include -I../../../R-3.0.2/src/include -I/usr/X11/include/ -D__ACCELERATE__ -DHAVE_CONFIG_H-fPIC -O3 -ipo -openmp -xHost -DR_HOME='/usr/local/R/R-intel/R.framework/Versions/3.0/Resources' -o Rscript \ ../../../R-3.0.2/src/unix/Rscript.c installing packages ... building HTML index ... dyld: Library not loaded: libiomp5.dylib ^^ your Intel libs (or at least libiomp5) are missing paths in the id string - probably not installed properly? You can hack around that using DYLD_FALLBACK_LIBRARY_PATH but it's better to fix the issue in libiomp5 directly. Referenced from: /Users/simonzehnder/Downloads/build/bin/exec/R Reason: image not found /bin/sh: line 1: 87375 Doneecho utils:::make.packages.html(.Library, verbose=FALSE, docdir=\/usr/local/R/R-intel/R.framework/Versions/3.0/Resources/doc\) 87376 Trace/BPT trap: 5 | R_DEFAULT_PACKAGES=NULL LC_ALL=C ../../bin/R --vanilla --slave /dev/null make[2]: *** [install] Error 133 make[1]: *** [install] Error 1 make: *** [install] Error 1 It seems that it is connected with the MKL. I have in my MKL variable “-lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread. It seems that libiomp5 is not linked to correctly. I uploaded also my config.log to https://gist.github.com/simonsays1980/7359508 Best Simon On 07 Nov 2013, at 15:33, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 7, 2013, at 7:56 AM, Simon Zehnder szehn...@uni-bonn.de wrote: I am trying to build R with an Intel Compiler (14.0.3). Has anyone before done it and could give me a hint for the configuration? I am sourcing the compilervars.sh for Intel and then configure R with ./R-3.0.2/configure OBJC=clang --enable-R-framework=/usr/local/R/R-intel --x-includes=/usr/X11/include/ --x-libraries=/usr/X11/lib/ --enable-memory-profiling --with-blas=$MKL --with-lapack Further Variables are: CFLAGS=“-O3 -ipo -openmp -xHost” CXXFLAGS=“-O3 -ipo -openmp -xHost” MKL=“-lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread”! I get always the same error: /opt/intel/composer_xe_2013_sp1.1.103/bin/intel64/icc -std=gnu99 -I../../../R-3.0.2/src/extra/zlib -I../../../R-3.0.2/src/extra/bzip2 -I../../../R-3.0.2/src/extra/pcre -I../../../R-3.0.2/src/extra -I../../../R-3.0.2/src/extra/xz/api -I. -I../../src/include -I../../../R-3.0.2/src/include -I/usr/local/include -DHAVE_CONFIG_H -fPIC -O3 -ipo -openmp -xHost -c ../../../R-3.0.2/src/main/Rmain.c -o Rmain.o /opt/intel/composer_xe_2013_sp1.1.103/bin/intel64/icc -std=gnu99 -L/usr/local/lib -o R.bin Rmain.o -L../../lib -lR Undefined symbols for architecture x86_64: ___kmpc_begin, referenced from: _main in ipo_icc4xtjyH.o ___kmpc_end, referenced from: _main in ipo_icc4xtjyH.o ld: symbol(s) not found for architecture x86_64 Any clue what this could be? The above certainly won't work, because you're missing linker flags - I'm pretty sure that you must use -openmp in the linker for it to work, I'm not sure about -ipo -- but doesn't R detect all those automatically? I don't think you should put them in manually. The actual error comes from missing libguide link flags, but they may be implicit if you fix the other problem. Cheers, S ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Build R with Intel Compiler
The DYLD_LIBRARY_PATH gets set by the compilervars.sh from intel and it resolves to: echo $DYLD_LIBRARY_PATH /opt/intel/composer_xe_2013_sp1.1.103/compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib/intel64:/opt/intel:/opt/intel/composer_xe_2013_sp1.1.103/ipp/../compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/ipp/lib:/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib:/opt/intel/composer_xe_2013_sp1.1.103/tbb/lib The first path points directly into the directory with the libiomp5.dyiib. So theoretically when following https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryUsageGuidelines.html it should be founded during linking. Though looking into libR.dylib with otool -L I see, that the libraries from Intel are referred to only by name not by path. I think this information gets lost as soon as the dynamic library libR.dylib is build. So, I hope I understand “fix the id in the iomp library” correctly: I change via install_name_tool change @executable_path/ … the relative path to an absolute one? Best Simon On 08 Nov 2013, at 15:19, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 8, 2013, at 4:05 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Where does R in make install get its libraries/library paths from to be installed? I set DYLD_LIBRARY_PATH and libiomp5.dylib is on that path … Is there another variable to be set (DYLD_FALLBACK_LIBRARY_PATH I want to use only, if no other possibility remains). Well, you really don't want to set DYLD_LIBRARY_PATH since it breaks dependencies, but that's another topic. However, the error tells you that you don't have it on the path, otherwise you wouldn't get image not found. Either way, as I said, what you really want is to fix the id in the iomp library so you don't get into the path troubles in the first place. Another way to go about it is to put the Intel dependencies into $R_HOME/lib - I wouldn't do that for development but that's a good option if you want to distribute the build to other machines. Cheers, Simon Best Simon On 07 Nov 2013, at 19:52, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 7, 2013, at 1:30 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Your and Brian’s guesses were right: the -openmp linker flag was it. It compiles now fine, though I get errors in make check-all and make install: Running a make check-all gives me (with and without flag -ipo) Running examples in 'mgcv-Ex.R’ failed ... Loading required package: splines plot(b,pages=1) b-gamm(y~s(x0,bs=tr,m=2)+s(x1,bs=ps,m=c(1,3))+ + s(x2,bs=tr,m=3)+s(x3,bs=tr,m=2),data=dat) plot(b$gam,pages=1) Warning in sqrt(rowSums((P$X %*% x$Vp[first:last, first:last, drop = FALSE]) * : NaNs produced Error in if (se pd[[i]]$se) { : missing value where TRUE/FALSE needed Calls: plot - plot.gam Execution halted A sudo make install gives me: /opt/intel/composer_xe_2013_sp1.1.103/bin/intel64/icc -std=gnu99 -I. -I../../src/include -I../../../R-3.0.2/src/include -I/usr/X11/include/ -D__ACCELERATE__ -DHAVE_CONFIG_H-fPIC -O3 -ipo -openmp -xHost -DR_HOME='/usr/local/R/R-intel/R.framework/Versions/3.0/Resources' -o Rscript \ ../../../R-3.0.2/src/unix/Rscript.c installing packages ... building HTML index ... dyld: Library not loaded: libiomp5.dylib ^^ your Intel libs (or at least libiomp5) are missing paths in the id string - probably not installed properly? You can hack around that using DYLD_FALLBACK_LIBRARY_PATH but it's better to fix the issue in libiomp5 directly. Referenced from: /Users/simonzehnder/Downloads/build/bin/exec/R Reason: image not found /bin/sh: line 1: 87375 Doneecho utils:::make.packages.html(.Library, verbose=FALSE, docdir=\/usr/local/R/R-intel/R.framework/Versions/3.0/Resources/doc\) 87376 Trace/BPT trap: 5 | R_DEFAULT_PACKAGES=NULL LC_ALL=C ../../bin/R --vanilla --slave /dev/null make[2]: *** [install] Error 133 make[1]: *** [install] Error 1 make: *** [install] Error 1 It seems that it is connected with the MKL. I have in my MKL variable “-lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread. It seems that libiomp5 is not linked to correctly. I uploaded also my config.log to https://gist.github.com/simonsays1980/7359508 Best Simon On 07 Nov 2013, at 15:33, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 7, 2013, at 7:56 AM, Simon Zehnder szehn...@uni-bonn.de wrote: I am trying to build R with an Intel Compiler (14.0.3). Has anyone before done it and could give me a hint for the configuration? I am sourcing the compilervars.sh for Intel and then configure R with ./R-3.0.2/configure OBJC=clang --enable-R-framework=/usr/local/R/R-intel --x-includes=/usr/X11/include/ --x-libraries=/usr/X11/lib/ --enable-memory-profiling --with-blas=$MKL --with-lapack
Re: [R-SIG-Mac] Build R with Intel Compiler
Couldn’t I just tell R to use xild the intel linker instead of ld? On 08 Nov 2013, at 16:26, Simon Zehnder szehn...@uni-bonn.de wrote: The DYLD_LIBRARY_PATH gets set by the compilervars.sh from intel and it resolves to: echo $DYLD_LIBRARY_PATH /opt/intel/composer_xe_2013_sp1.1.103/compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/compiler/lib/intel64:/opt/intel:/opt/intel/composer_xe_2013_sp1.1.103/ipp/../compiler/lib:/opt/intel/composer_xe_2013_sp1.1.103/ipp/lib:/opt/intel/composer_xe_2013_sp1.1.103/mkl/lib:/opt/intel/composer_xe_2013_sp1.1.103/tbb/lib The first path points directly into the directory with the libiomp5.dyiib. So theoretically when following https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryUsageGuidelines.html it should be founded during linking. Though looking into libR.dylib with otool -L I see, that the libraries from Intel are referred to only by name not by path. I think this information gets lost as soon as the dynamic library libR.dylib is build. So, I hope I understand “fix the id in the iomp library” correctly: I change via install_name_tool change @executable_path/ … the relative path to an absolute one? Best Simon On 08 Nov 2013, at 15:19, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 8, 2013, at 4:05 AM, Simon Zehnder szehn...@uni-bonn.de wrote: Where does R in make install get its libraries/library paths from to be installed? I set DYLD_LIBRARY_PATH and libiomp5.dylib is on that path … Is there another variable to be set (DYLD_FALLBACK_LIBRARY_PATH I want to use only, if no other possibility remains). Well, you really don't want to set DYLD_LIBRARY_PATH since it breaks dependencies, but that's another topic. However, the error tells you that you don't have it on the path, otherwise you wouldn't get image not found. Either way, as I said, what you really want is to fix the id in the iomp library so you don't get into the path troubles in the first place. Another way to go about it is to put the Intel dependencies into $R_HOME/lib - I wouldn't do that for development but that's a good option if you want to distribute the build to other machines. Cheers, Simon Best Simon On 07 Nov 2013, at 19:52, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 7, 2013, at 1:30 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Your and Brian’s guesses were right: the -openmp linker flag was it. It compiles now fine, though I get errors in make check-all and make install: Running a make check-all gives me (with and without flag -ipo) Running examples in 'mgcv-Ex.R’ failed ... Loading required package: splines plot(b,pages=1) b-gamm(y~s(x0,bs=tr,m=2)+s(x1,bs=ps,m=c(1,3))+ + s(x2,bs=tr,m=3)+s(x3,bs=tr,m=2),data=dat) plot(b$gam,pages=1) Warning in sqrt(rowSums((P$X %*% x$Vp[first:last, first:last, drop = FALSE]) * : NaNs produced Error in if (se pd[[i]]$se) { : missing value where TRUE/FALSE needed Calls: plot - plot.gam Execution halted A sudo make install gives me: /opt/intel/composer_xe_2013_sp1.1.103/bin/intel64/icc -std=gnu99 -I. -I../../src/include -I../../../R-3.0.2/src/include -I/usr/X11/include/ -D__ACCELERATE__ -DHAVE_CONFIG_H-fPIC -O3 -ipo -openmp -xHost -DR_HOME='/usr/local/R/R-intel/R.framework/Versions/3.0/Resources' -o Rscript \ ../../../R-3.0.2/src/unix/Rscript.c installing packages ... building HTML index ... dyld: Library not loaded: libiomp5.dylib ^^ your Intel libs (or at least libiomp5) are missing paths in the id string - probably not installed properly? You can hack around that using DYLD_FALLBACK_LIBRARY_PATH but it's better to fix the issue in libiomp5 directly. Referenced from: /Users/simonzehnder/Downloads/build/bin/exec/R Reason: image not found /bin/sh: line 1: 87375 Doneecho utils:::make.packages.html(.Library, verbose=FALSE, docdir=\/usr/local/R/R-intel/R.framework/Versions/3.0/Resources/doc\) 87376 Trace/BPT trap: 5 | R_DEFAULT_PACKAGES=NULL LC_ALL=C ../../bin/R --vanilla --slave /dev/null make[2]: *** [install] Error 133 make[1]: *** [install] Error 1 make: *** [install] Error 1 It seems that it is connected with the MKL. I have in my MKL variable “-lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread. It seems that libiomp5 is not linked to correctly. I uploaded also my config.log to https://gist.github.com/simonsays1980/7359508 Best Simon On 07 Nov 2013, at 15:33, Simon Urbanek simon.urba...@r-project.org wrote: On Nov 7, 2013, at 7:56 AM, Simon Zehnder szehn...@uni-bonn.de wrote: I am trying to build R with an Intel Compiler (14.0.3). Has anyone before done it and could give me a hint for the configuration? I am sourcing the compilervars.sh for Intel and then configure R with ./R-3.0.2/configure OBJC=clang
[R-SIG-Mac] Build R with Intel Compiler
I am trying to build R with an Intel Compiler (14.0.3). Has anyone before done it and could give me a hint for the configuration? I am sourcing the compilervars.sh for Intel and then configure R with ./R-3.0.2/configure OBJC=clang --enable-R-framework=/usr/local/R/R-intel --x-includes=/usr/X11/include/ --x-libraries=/usr/X11/lib/ --enable-memory-profiling --with-blas=$MKL --with-lapack Further Variables are: CFLAGS=“-O3 -ipo -openmp -xHost” CXXFLAGS=“-O3 -ipo -openmp -xHost” MKL=“-lmkl_gf_lp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread”! I get always the same error: /opt/intel/composer_xe_2013_sp1.1.103/bin/intel64/icc -std=gnu99 -I../../../R-3.0.2/src/extra/zlib -I../../../R-3.0.2/src/extra/bzip2 -I../../../R-3.0.2/src/extra/pcre -I../../../R-3.0.2/src/extra -I../../../R-3.0.2/src/extra/xz/api -I. -I../../src/include -I../../../R-3.0.2/src/include -I/usr/local/include -DHAVE_CONFIG_H-fPIC -O3 -ipo -openmp -xHost -c ../../../R-3.0.2/src/main/Rmain.c -o Rmain.o /opt/intel/composer_xe_2013_sp1.1.103/bin/intel64/icc -std=gnu99 -L/usr/local/lib -o R.bin Rmain.o -L../../lib -lR Undefined symbols for architecture x86_64: ___kmpc_begin, referenced from: _main in ipo_icc4xtjyH.o ___kmpc_end, referenced from: _main in ipo_icc4xtjyH.o ld: symbol(s) not found for architecture x86_64 Any clue what this could be? Best Simon ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Forking issues in Mavericks
Still, I do not get any error with package parallel in my Mavericks. I compiled though R with a gcc 4.8.2. On 30 Oct 2013, at 18:26, Jeroen Ooms jeroen.o...@stat.ucla.edu wrote: On Wed, Oct 30, 2013 at 10:08 AM, Simon Urbanek simon.urba...@r-project.org wrote: I didn't have time to look (will do later today), but a wild guess is that Apple was moving away from some common libraries like OpenSSL and replacing them with their own which could be CF-based and thus unsafe. Again, that's wild guess, I'll have to look at the trace to confirm that. Thanks. It's unfortunate though, these developments are limiting the usefulness of the parallel package on the mac, because a lot of basic functionality is now considered unsafe to use in a forked process, even though on Linux there is no problem at all. I also don't get why osx decides to kill both the parent and child process when the child attempt to do something unsafe. That doesn't seem the most graceful way of dealing with things. ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] no title bar on mavericks X11 windows
For me the same … Have you installed the Command Line Tools for Mavericks? The Tcl framework location has changed and following http://cran.r-project.org/bin/macosx/RMacOSX-FAQ.html the X11 implementation of Tcl/Tk is used. On 30 Oct 2013, at 19:08, Marc Schwartz marc_schwa...@me.com wrote: On Oct 30, 2013, at 12:11 PM, Andy Jacobson (NOAA Affiliate) andy.jacob...@noaa.gov wrote: Hi, Since upgrading to Mavericks, all X11 windows created by R are without title bar (no maximize/minimize/close buttons, no title)...just a blank white canvas placed in the upper-left corner of my primary display. R draws into this just fine, but I can't move, close, or otherwise manipulate the window. This occurs with X11() called from remote machines (an older R-2.14.1), and from R-3.0.0 and R-3.0.2 locally. Other X applications, both locally- and remotely-executed, do not suffer from this issue. I also upgraded Xquartz to the 2.7.5-rc3 recommended for Mavericks users by the Xquartz team, but it had no effect on this issue. I don't know if this is an R issue or an Xquartz issue...any ideas? Thanks, Andy Hi, I am running 3.0.2 on Mavericks (CRAN binary install) and when I use X11() running R in a terminal session, I get a full window with title bar on my MacBook Pro. I re-installed XQuartz (2.7.4) after upgrading from 10.8 to 10.9. See the attached screen capture PNG. I tested it via R.app as well, with the same result. Regards, Marc Schwartz Screen Shot 2013-10-30 at 1.03.09 PM.png ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Forking issues in Mavericks
Same system, no error (on the shell). Debugging parallel processes is in general not easy - here is a thread on this using lldb: http://stackoverflow.com/questions/14746315/how-to-attach-to-child-process-in-lldb. But first hope for an answer of a more experienced list user, who possibly knows how the processes are actually forked. Are you sure, that you call just these commands? Or did you use these for a simple example? Usually the error comes up from the Core Foundation library, if a child process tries to fork unsafely. Regarding the your problems with X11 though the answer from Steve sounds like a very good guess. Best Simon On 29 Oct 2013, at 20:08, Jeroen Ooms jeroen.o...@stat.ucla.edu wrote: The following works in Linux and OSX 10.8 but in OSX 10.9 it results in a __THE_PROCESS_HAS_FORKED_AND_YOU_CANNOT_USE_THIS_COREFOUNDATION_FUNCTIONALITY___YOU_MUST_EXEC__(): library(parallel) library(httr) myfork - mcparallel(GET(https://api.github.com/users/hadley/repos;)) out - mccollect(myfork) I've seen this error before when trying to access X11 from inside a forked process. In this case it seems to be related to SSL, but I'm not quite sure how to further debug this in 10.9 (lldb anyone?). What exactly might be triggering this error? ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Compiling against the Accelerate framework on OS X 10.9
Just for the record, I install the gcc binaries from http://hpc.sourceforge.net (no MacPorts anymore) and with these I compile R from sources. Before I used the gcc4.8 from Macports - but never used R from MacPorts. And yes, with Apple installation of any open-source software including a compilation via configure/make becomes complicated and it will always be. On 28 Oct 2013, at 11:27, peter dalgaard pda...@gmail.com wrote: On Oct 27, 2013, at 22:33 , Simon Zehnder wrote: P.S.: I would consider the gcc4.8.2 binary from http://hpc.sourceforge.net for Mavericks and ML; I worked before with the macports alternative and found it easier to use these binaries. They are always up to date… --- except that MacPorts had R unbuildable for weeks with an internal compiler error in Fortran. This sort of instability is what happens when a distribution treats the build tools as just another set of applications. But, yes, it is currently a bit of a conundrum whether to head towards doing things the Open Source Way or the Apple Way. (And there isn't really an Open Source Way. There are eminent examples of well-managed Open Source distributions in the Linux world, both on a professional and on a volunteer basis. However, whenever people try retrofitting the idea of maintained distributions onto commercial platforms, it seems that amateurism kicks in.) -- Peter Dalgaard, Professor Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Email: pd@cbs.dk Priv: pda...@gmail.com ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] Compiling against the Accelerate framework on OS X 10.9
Thanks for the link! Something new for me. On 28 Oct 2013, at 12:11, Federico Calboli f.calb...@imperial.ac.uk wrote: On 27 Oct 2013, at 21:33, Simon Zehnder szehn...@uni-bonn.de wrote: P.S.: I would consider the gcc4.8.2 binary from http://hpc.sourceforge.net for Mavericks and ML; I worked before with the macports alternative and found it easier to use these binaries. They are always up to date… Please note that http://r.research.att.com/tools/ explicitly warns about using the Fortran compiler from http://hpc.sourceforge.net, in case you need Fortran for building a package from source. Unfortunately the Fortran compiler especially supplied for R use is ancient and will not properly compile stuff that depends on a more modern Fortran compiler version (such as Julia). On 24 Oct 2013, at 13:33, Jon Clayden jon.clay...@gmail.com wrote: Dear all, After upgrading to Mavericks, I seem to be unable to compile either R 3.0.2 or the current R-patched against the Accelerate framework cleanly. I'm using homebrewed gcc 4.8.2, and configuring the build with ./configure --with-blas=-framework Accelerate --with-lapack --with-system-zlib --enable-memory-profiling --with-tcl-config=/System/Library/Frameworks/Tcl.framework/tclConfig.sh --with-tk-config=/System/Library/Frameworks/Tk.framework/tkConfig.sh CC=gcc-4.8 CXX=g++-4.8 OBJC=clang F77=gfortran-4.8 FC=gfortran-4.8 CFLAGS=-mtune=native -g -O2 CXXFLAGS=-mtune=native -g -O2 FFLAGS=-mtune=native -g -O2 FCFLAGS=-mtune=native -g -O2 The error is at the bottom of this e-mail. Adding -flax-vector-conversions to CFLAGS, as suggested early in the output, does seem to allow the build to continue, but I'm not sure how safe this is. The gcc man page says that this option should not be used for new code. Could anyone advise further, please? Thanks in advance, Jon -- making Lapack.d from Lapack.c making vecLibg95c.d from vecLibg95c.c gcc-4.8 -std=gnu99 -I. -I../../../src/include -I../../../src/include -I/usr/local/include -DHAVE_CONFIG_H -fopenmp -fPIC -mtune=native -g -O2 -c Lapack.c -o Lapack.o gcc-4.8 -std=gnu99 -I. -I../../../src/include -I../../../src/include -I/usr/local/include -DHAVE_CONFIG_H -fopenmp -fPIC -mtune=native -g -O2 -c vecLibg95c.c -o vecLibg95c.o In file included from /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:31:0, from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20, from vecLibg95c.c:8: /System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h: In function ‘vU16HalfMultiply’: /System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:352:3: note: use -flax-vector-conversions to permit conversions between vectors with differing element types or numbers of subparts vUInt16 __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); } ^ /System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:352:3: error: incompatible type for argument 1 of ‘_mm_mullo_epi16’ In file included from /usr/local/Cellar/gcc48/4.8.2/gcc/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/include/xmmintrin.h:1246:0, from /System/Library/Frameworks/vecLib.framework/Headers/vecLibTypes.h:90, from /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:27, from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20, from vecLibg95c.c:8: /usr/local/Cellar/gcc48/4.8.2/gcc/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/include/emmintrin.h:1097:1: note: expected ‘__m128i’ but argument is of type ‘vUInt16’ _mm_mullo_epi16 (__m128i __A, __m128i __B) ^ In file included from /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:31:0, from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20, from vecLibg95c.c:8: /System/Library/Frameworks/vecLib.framework/Headers/vBasicOps.h:352:3: error: incompatible type for argument 2 of ‘_mm_mullo_epi16’ vUInt16 __vbasicops_vB) { return _mm_mullo_epi16(__vbasicops_vA, __vbasicops_vB); } ^ In file included from /usr/local/Cellar/gcc48/4.8.2/gcc/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/include/xmmintrin.h:1246:0, from /System/Library/Frameworks/vecLib.framework/Headers/vecLibTypes.h:90, from /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:27, from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20, from vecLibg95c.c:8: /usr/local/Cellar/gcc48/4.8.2/gcc/lib/gcc/x86_64-apple-darwin13.0.0/4.8.2/include/emmintrin.h:1097:1: note: expected ‘__m128i’ but argument is of type ‘vUInt16’ _mm_mullo_epi16 (__m128i __A, __m128i __B) ^ In file included from /System/Library/Frameworks/vecLib.framework/Headers/vecLib.h:31:0, from /System/Library/Frameworks/Accelerate.framework/Headers/Accelerate.h:20, from
Re: [R-SIG-Mac] Trouble installing R packages from source on Mavericks
After updating to Mavericks you need the new Xcoe developer tools under Xcode - Xcode Developer tools - Other Xcode Developer tools. Have you done this? Best Simon On 27 Oct 2013, at 23:05, Claymore M c1aym...@hotmail.com wrote: ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] R 3.0.1 build from sources: Wrong library paths
Berend, I retried the command pdflatex without the extra export and it does not work. Assumably, this is due to the fact, that I had /usr/local/bin and /usr/local/sbin in my PATH variable and I used export PATH=/usr/bin:/bin:/usr/sbin:/sbin to get it out of my PATH (inside my .profile file). In regard to XQuartz: True, I did and I will ad it to the sequence. Thanks for the comment, I have fully overseen this! Best Simon On Sep 13, 2013, at 10:19 AM, Berend Hasselman b...@xs4all.nl wrote: On 12-09-2013, at 20:16, Simon Zehnder szehn...@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 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] [Caution: Message contains Suspicious URL content] R 3.0.1 build from sources: Wrong library paths
Dear Brian, if it is able to test the compilation of the quartz device by calling quartz() in R - this works. Calling xcodebuild -version gives me: Xcode 4.6.3 and clang --version gives me LLVM 3.2svn indeed. My prime target was to be able to use OpenMP 3.1 which is actually only available (freely) in gcc = 4.7. Is there a possibility to install, check and reinstall all CRAN packages in R? Best Simon On Sep 13, 2013, at 10:52 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On 13/09/2013 07:52, Anirban MUKHERJEE wrote: Hi Simon, On a related note, there has been progress on openmp in llvm/clang: http://www.phoronix.com/scan.php?page=news_itempx=MTQ0NjQ http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-August/065169.html http://clang-omp.github.io/ That might be an alternative route to consider if needed. Clang (I have not openmp/clang) usually builds easily on Mac OS. We know (I believe it has been mentioned here before). But please remember that only the Apple clang is easy to use (does your self-build compile the quartz device? -- mine did not), and Apple lags a long way behind. The current Xcode version says it is '3.2svn' but lacks even 3.1 features such as AddressSanitizer. We will see what Xcode 5 brings when it is released. I don't think people appreciated Simon's comments about the stability needed. If you can check all of CRAN with no more than 10 issues with gcc 4.7 or 4.8, then let us know. That is about where we are with llvm-gcc 4.2 and clang 3.2- from Xcode 4.6.3. When I tried 4.7.x prior to R 3.0.0 I had over 50 failures (and CRAN is reqularly checked with 4.7.x on other platforms). And we are only in that good a state because a lot of (literally) thankless work has been done to get CRAN/BioC packages to compile with clang. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] R 3.0.1 build from sources: Wrong library paths
I did some progress on my problem: Using LDFLAGS and CPPFLAGS on the shell instead of in the config.site file changes the directories and make can find all the libraries. The next thing that came up, was the Mac-specific Cocoa issue. When I compile R sources with OBJC=gcc -arch x86_64 I get the following outputs: config.log: https://gist.github.com/anonymous/6534550 make.log: https://gist.github.com/anonymous/6534560 with errors starting in line 883 of the make.log. So it seems the gcc cannot handle the .m files properly. Then I used OBJC=clang and I get the following output: config.log: https://gist.github.com/anonymous/6534614 make.log: https://gist.github.com/anonymous/6534606 Here I get (see line 879 in the make.log) some weird warning. I know these are only warnings, they do not influence the way R works later on, but I am interested why gcc cannot handle the Cocoa files at all and clang has these warnings. Best Simon On Sep 11, 2013, at 11:08 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Dear R-Users and R-Devels, I made a brand new install of Mac OS X Mountain Lion 10.8.4 on a new hard drive and want to build R from sources. As I use OpenMP 3.1 in my C++ extensions I used MacPorts to get the gcc48 compiler collection. Installation run without a hassle and I set the mp-gcc48 active. I downloaded the R-3.0.1 tar.gz and extracted it. Then I changed the config.site to the following: https://gist.github.com/anonymous/6529767 Furthermore I had to change my PATH variable in the .profile as it included /usr/local/bin:/usr/local/sbin and I have not such a folder in my /usr. Now when I run configure I get the following config.log https://gist.github.com/anonymous/6529743 with the warning: ld: warning: directory not found for option '-L/usr/local/lib' on line 217. This warning becomes an error if running the make command. I still see the C linker using -L/usr/local/lib which does not exist. I changed the LDFLAGS in the config.site to -L/opt/local/lib but Rs configure script seems to be very resistant to my new proposal. I need some help. How should I proceed? Which FLAGS can change the directory the make script searches for libraries? What configure options should be used with R-3.0.1 on OS X 10.8.4 using gcc-4.8.1? Best Simon ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] R 3.0.1 build from sources: Wrong library paths
I compiled R and made a check-all without errors (only for the PDF manuals - but this is ok). Then I used sudo make install to install it to the R.framework. Now, when I want to use R on the shell no command can be found, as the installation has not installed the binaries in /usr/bin. If I try to change my PATH variable and add /Library/Frameworks/R.framework/Ressources/bin it does not change a thing, I still get the error: -bash: R: command not found. The only thing to make it work is to go into the folder /Libraries/Frameworks/R.framework/Ressources/bin/ and start it via ./R. I remember no such behaviour for prior builds of R. It seems Mac has changed something since my last compilation of R sources. Can anyone help? Best Simon On Sep 12, 2013, at 10:49 AM, Simon Zehnder szehn...@uni-bonn.de wrote: I did some progress on my problem: Using LDFLAGS and CPPFLAGS on the shell instead of in the config.site file changes the directories and make can find all the libraries. The next thing that came up, was the Mac-specific Cocoa issue. When I compile R sources with OBJC=gcc -arch x86_64 I get the following outputs: config.log: https://gist.github.com/anonymous/6534550 make.log: https://gist.github.com/anonymous/6534560 with errors starting in line 883 of the make.log. So it seems the gcc cannot handle the .m files properly. Then I used OBJC=clang and I get the following output: config.log: https://gist.github.com/anonymous/6534614 make.log: https://gist.github.com/anonymous/6534606 Here I get (see line 879 in the make.log) some weird warning. I know these are only warnings, they do not influence the way R works later on, but I am interested why gcc cannot handle the Cocoa files at all and clang has these warnings. Best Simon On Sep 11, 2013, at 11:08 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Dear R-Users and R-Devels, I made a brand new install of Mac OS X Mountain Lion 10.8.4 on a new hard drive and want to build R from sources. As I use OpenMP 3.1 in my C++ extensions I used MacPorts to get the gcc48 compiler collection. Installation run without a hassle and I set the mp-gcc48 active. I downloaded the R-3.0.1 tar.gz and extracted it. Then I changed the config.site to the following: https://gist.github.com/anonymous/6529767 Furthermore I had to change my PATH variable in the .profile as it included /usr/local/bin:/usr/local/sbin and I have not such a folder in my /usr. Now when I run configure I get the following config.log https://gist.github.com/anonymous/6529743 with the warning: ld: warning: directory not found for option '-L/usr/local/lib' on line 217. This warning becomes an error if running the make command. I still see the C linker using -L/usr/local/lib which does not exist. I changed the LDFLAGS in the config.site to -L/opt/local/lib but Rs configure script seems to be very resistant to my new proposal. I need some help. How should I proceed? Which FLAGS can change the directory the make script searches for libraries? What configure options should be used with R-3.0.1 on OS X 10.8.4 using gcc-4.8.1? Best Simon ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] R 3.0.1 build from sources: Wrong library paths
Simon, thanks for the help. This did make the work. I wonder why the --bindir and --sbindir options during configure did not let that happen. R runs on my system and here is what I precisely 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. 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 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) All seemed to work fine. I installed the package nloptr (which did not install in my last R app) and it did compile without a hassle (that's great!). But then with Rcpp I got the error: ld: library not found for -lintl. I looked into the files of the gcc48 of MacPorts under /opt/local/lib and I have three libraries in there: libintl.8.dylib, libintl.a, libintl.la. I do not know though if this error wrong linking via R's environment variables or I miss an export in my .profile. I also have now a warning when using MacPorts, which is already reported: http://openradar.appspot.com/11894054 Here is my config.log https://gist.github.com/anonymous/6539093 and here the output from Sys.getenv(): https://gist.github.com/anonymous/6539133 So, I cannot tell, if this should be considered a stable build on the Mac. But maybe everything can be solved quite easily. Best Simon On Sep 12, 2013, at 2:54 PM, Simon Urbanek simon.urba...@r-project.org wrote: On Sep 12, 2013, at 5:50 AM, Simon Zehnder wrote: I compiled R and made a check-all without errors (only for the PDF manuals - but this is ok). Then I used sudo make install to install it to the R.framework. Now, when I want to use R on the shell no command can be found, as the installation has not installed the binaries in /usr/bin. If I try to change my PATH variable and add /Library/Frameworks/R.framework/Ressources/bin it does not change a thing, I still get the error: -bash: R: command not found. The only thing to make it work is to go into the folder /Libraries/Frameworks/R.framework/Ressources/bin/ and start it via ./R. What the CRAN installer does is essentially sudo ln -s /Library/Frameworks/R.framework/Resources/bin/R /usr/bin/R Obviously, changing the PATH works as well - make sure you check the value of PATH in the session you're running (bash uses a cached lookup, but recent versions should have no trouble re-trying after PATH changes) -- assuming running /Libraries/Frameworks/R.framework/Ressources/bin/R works. If it doesn't then maybe check the version symlinks. Re you earlier post - FSF builds of gcc don't support ObjC with Apple runtime, so you have to use Apple's clang (as you did). In my tests few months ago gcc 4.7/4.8 was too unreliable - it was miscompiling R so things were breaking randomly at run-time. If your build seems reliable, please share with use the exact version and settings. Thanks, Simon I remember no such behaviour for prior builds of R. It seems Mac has changed something since my last compilation of R sources. Can anyone help? Best Simon On Sep 12, 2013, at 10:49 AM, Simon Zehnder szehn...@uni-bonn.de wrote: I did some progress on my problem: Using LDFLAGS and CPPFLAGS on the shell instead of in the config.site file changes the directories and make can find all the libraries. The next thing that came up, was the Mac-specific Cocoa issue. When I compile R sources with OBJC=gcc -arch x86_64 I get the following outputs: config.log: https://gist.github.com/anonymous/6534550 make.log: https://gist.github.com/anonymous/6534560
Re: [R-SIG-Mac] R 3.0.1 build from sources: Wrong library paths
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. 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 Thanks again for your help! Simon On Sep 12, 2013, at 5:16 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Simon, thanks for the help. This did make the work. I wonder why the --bindir and --sbindir options during configure did not let that happen. R runs on my system and here is what I precisely 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. 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 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) All seemed to work fine. I installed the package nloptr (which did not install in my last R app) and it did compile without a hassle (that's great!). But then with Rcpp I got the error: ld: library not found for -lintl. I looked into the files of the gcc48 of MacPorts under /opt/local/lib and I have three libraries in there: libintl.8.dylib, libintl.a, libintl.la. I do not know though if this error wrong linking via R's environment variables or I miss an export in my .profile. I also have now a warning when using MacPorts, which is already reported: http://openradar.appspot.com/11894054 Here is my config.log https://gist.github.com/anonymous/6539093 and here the output from Sys.getenv(): https://gist.github.com/anonymous/6539133 So, I cannot tell, if this should be considered a stable build on the Mac. But maybe everything can be solved quite easily. Best Simon On Sep 12, 2013, at 2:54
[R-SIG-Mac] R 3.0.1 build from sources: Wrong library paths
Dear R-Users and R-Devels, I made a brand new install of Mac OS X Mountain Lion 10.8.4 on a new hard drive and want to build R from sources. As I use OpenMP 3.1 in my C++ extensions I used MacPorts to get the gcc48 compiler collection. Installation run without a hassle and I set the mp-gcc48 active. I downloaded the R-3.0.1 tar.gz and extracted it. Then I changed the config.site to the following: https://gist.github.com/anonymous/6529767 Furthermore I had to change my PATH variable in the .profile as it included /usr/local/bin:/usr/local/sbin and I have not such a folder in my /usr. Now when I run configure I get the following config.log https://gist.github.com/anonymous/6529743 with the warning: ld: warning: directory not found for option '-L/usr/local/lib' on line 217. This warning becomes an error if running the make command. I still see the C linker using -L/usr/local/lib which does not exist. I changed the LDFLAGS in the config.site to -L/opt/local/lib but Rs configure script seems to be very resistant to my new proposal. I need some help. How should I proceed? Which FLAGS can change the directory the make script searches for libraries? What configure options should be used with R-3.0.1 on OS X 10.8.4 using gcc-4.8.1? Best Simon ___ R-SIG-Mac mailing list R-SIG-Mac@r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-mac
Re: [R-SIG-Mac] R compile from sources: error in make with gcc-4.7
Hi guys, I want to make a last comment on compiling R on a Mac OS with the GNU 4.7.1 compiler. I solved all my problems and I would like to present my way here for other users who may find it helpful. I am using Mountain Lion 10.8.2 and followed: http://solarianprogrammer.com/2012/02/20/living-on-the-edge-building-gcc-4-7-on-mac-osx-lion/ for the installation of gcc-4.7.1. Furthermore I downloaded the latest version of XQuartz (http://xquartz.macosforge.org/landing/). Next step: I downloaded the latest R-patched version 2.15.1 here (thanks for the tip Simon!): http://r.research.att.com. Then the following commands have been made: In the untared R-patched folder: mkdir build cd build ../configure CC=gcc-4.7 CXX=g++-4.7 F77=gfortran-4.7 FC=gfortran-4.7 OBJC=clang CFLAGS=-DOS_OBJECT_USE_OBJC=0 CPPFLAGS=-D__ACCELERATE__ --with-lapack --with-blas='-framework Accelerate' --with-x sudo make sudo make install Now R runs much faster on my Mac then before and without any problem. The only unsolved task yet is, that the R.framework - especially the library folder below Resources/ is not accessible by default. So installing a package results in an exception. I solved this task by simply changing the permissions on the folder. The solution to my problem has been brought up by a friend of mine in the HPC team at the Computing Center RWTH Aachen University (Germany), Hriesto Iliev (http://www.rz.rwth-aachen.de/aw/cms/rz/Themen/hochleistungsrechnen/hilfen_kurse_und_veranstaltungen/~svf/und_das_sind_wir/?lang=de or on stackoverflow: http://stackoverflow.com/users/1374437/hristo-iliev). In his words: The reason why compilation of aqua.c fails is due to a change possibly introduced in the 10.8 SDK. Several system header files now use by default some Obj-C constructs with extensions (code blocks), only supported by clang and Apple's version of GCC. The workaround is given via the C flag -DOS_OBJECT_USE_OBJC=0. The veLib problem can be used in two different ways: 1. Simon Urbanek suggests to use the CPP flag -D__ACCELERATE__ 2. Hriesto solved the problem via changing #includevecLib/vecLib.h to #includeAccelerate/Accelerate.h in ../src/modules/lapack/vecLib95c.c (relative to the build directory). As vecLib is deprecated it should also be used --with-blas=-framework Accelerate instead of --with-blas=-framework vecLib (but both options seem to work). Unfortunately there is another part that prevents one from building R with gcc-4.7: The Quartz graphics device must be compiled with the Objective-C compiler from Apple as (again) code blocks are used extensively in the OS X SDK and this time there is no workaround. Clang is a good candidate and as high performance libraries like OpenMP are not used in the graphics device, Xcode's default can be used without matters. So one simply changes the Obj-C compiler to clang: OBJC=clang. Following Hristo it is also unnecessary to specify -arch x86_64 as the compiler is already producing 64-bit code by default. We are still not sure if we need the X11 graph device, as the Quartz one should be more capable (graphics in R work fine). Any comments are welcome. As I use R either on the command line or in RStudio I have not installed the R.app. If one wants to install it, one have to build R as a dynamic library to be later used by R.app. Doing so one needs the --enable-R-framework directive in the configure step above following the manual, but we got it by default... With the building steps above one can now use R - or rather R extensions - with OpenMP 3.0 as well as other very helpful developments in the C++11 standard. I do not know other mathematical or hpc libraries, but as the compiler is the latest version everything should run. At the end I want to thank everyone here for his helpful comments and Hristo for his time - even if he is not connected to R (yet:)) Best Simon On Sep 16, 2012, at 3:10 PM, Simon Zehnder szehn...@uni-bonn.de wrote: Hi Simon, below you find my configure and my make output while building R from sources with gcc-4.7.1 and including aqua (I used the R-patched). 1. (Configure) Output: http://pastebin.com/GJ5DZncU 2. (Make) Output: http://pastebin.com/SHZWgA4P Best regards Simon On Sep 16, 2012, at 3:16 AM, Simon Urbanek simon.urba...@r-project.org wrote: Simon, On Sep 15, 2012, at 6:56 PM, Simon Zehnder wrote: That is correct! My fault! Simon, I didn't want to blame you with this one. It compiles know and it works perfectly on the console. I am still interested, why it does not compile with aqua. Can somebody explain me why? Can you sent me the full output? I don't have the time to compile gcc from scratch right now and none of the usual suspects supports ObjC - that alone is a sign that no one really uses gcc on OS X (other than for ports) since Apple has abandoned it. My guess would be that the ObjC support is not as complete