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