Re: [R-SIG-Mac] [Caution: Message contains Suspicious URL content] R 3.0.1 build from sources: Wrong library paths

2013-09-13 Thread Anirban MUKHERJEE
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.

Best, Anirban

On Sep 13, 2013, at 2:16 AM, Simon Zehnder 
szehn...@uni-bonn.demailto: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.
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.demailto: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 

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

2013-09-13 Thread Simon Zehnder
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

2013-09-13 Thread Prof Brian Ripley

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


Re: [R-SIG-Mac] R on Mac: framework or homebrew?

2013-09-13 Thread Rainer M Krug
Prof Brian Ripley rip...@stats.ox.ac.uk writes:

 On 12/09/2013 17:15, MacQueen, Don wrote:
 I've been using R on OS X probably ever since there was an R on OS X, and
 like you I use it from the command line. In the early days I installed R
 from sources, but quite a few years ago I switched to using the framework
 version. I can't think of any disadvantage I've encountered.

 It is harder to have multiple versions of the framework in use at
 once.  And that is an issue now the R release rate is slower:
 package developers probably want both the release version and a
 current R-devel.

That is what I was thinking as well - in homebrew, I simply have to use

,
| brew switch R version  
`

to switch to another installed version.


 If I were to not use the framework version, I think I would prefer to
 install directly from sources, not use a package management system. There
 might be more initial work installing various prerequisites (things like
 tcl/tk, png, maybe readline, who knows what all) but it would probably be
 better in the long run.

 Some packages, such as a number of spatial packages, require installing
 other libraries such as rgdal, proj, and others. Currently, these are also
 available as frameworks, and installing those packages in a framework R is
 now well-supported. It might be considerably more difficult to install
 such packages in a non-framework R. I don't know how much would be
 involved, so I just suggest it as an aspect to consider.

 Almost nothing.  Simon provides binaries for those at
 http://r.research.att.com/libs/ and if you want later ones they
 compile simply from the sources.  in any case, whether R is a
 framework or not does not affect installing packages from sources, as
 you still need to tell the toolchain where to look for the headers and
 libraries.

That is good to know.


 On my office iMac have almost all of CRAN installed (more than Simon
 provides as binaries) compiling from source.  The exceptions are those
 10 or so which are too broken to install on OS X and those depending
 on Qt, MySQL (I haven't bothered) or BRugs (i386 Windows/Linux only)

Thanks a lot for all of your input. I will then, for the moment, stick
to the framework (as it works), but keep the homebrew option in mind.

Thanks,

Rainer

-- 
Rainer M. Krug

email: RMKrugatgmaildotcom

___
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

2013-09-13 Thread Simon Zehnder
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] [Caution: Message contains Suspicious URL content] R 3.0.1 build from sources: Wrong library paths

2013-09-13 Thread Prof Brian Ripley

On 13/09/2013 11:16, Simon Zehnder wrote:

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?


I was not asking about the clang in Xcode ... my point was that not all 
non-Apple versions of clang can compile quartz().


As for your question about CRAN package checks: CRAN does it daily so it 
must be possible.




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





--
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


Re: [R-SIG-Mac] [Caution: Message contains Suspicious URL content] R 3.0.1 build from sources: Wrong library paths

2013-09-13 Thread Simon Urbanek

On Sep 13, 2013, at 6:16 AM, Simon Zehnder wrote:

 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.

That's not true - Intel OpenMP RTL (http://www.openmprtl.org/ ) is free (BSD 
license), goes even up to OpenMP 4.0 features and has much better performance. 
GOMP has terrible performance on OS X (one of the two reasons why we disable it 
in the binaries), so if you care about OMP you probably don't want to use gcc 
anyway (or plug out GOMP for the Intel one).


 Is there a possibility to install, check and reinstall all CRAN packages in 
 R? 
 

Install is easy - you feed install.packages() with package list from 
available.packages() and you can even use Ncpus. Check is annoying since there 
is no equivalent R function (AFAIK). All of us have their own functions they 
use for this. But what's more complicated is that you'll need to install all 
dependent libraries in the system - and there are a lot of them.

Cheers,
Simon



 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
 
 

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