On 06/23/10 11:08 PM, Mathew Fox wrote:
Dear all,
I just changed from linux to a solaris server and I'm having trouble
building R from source.
First, you might be better posting on r-devel. I know this seems unuual, and
installation problems are usually handled on the help or support lists, but R
appars to want to do things differently.
R seems problematic on Solaris though I have personally managed to build it
(just) on Solaris 10 SPARC. This has been on
* Solaris 10 03/05 - the first release of Solaris 10
* Solaris 10 05/09 (update 7)
* Solaris 10 update 8 - the latest release of Solaris 10
but some of the recommended modules are not building, so whilst 'make' runs ok,
'make test /make check' fails.
R 10.2.1 is used as part of the Sage maths project. It's build with a
configuration file, the contents of which I've attached. 'SAGE_LOCAL' is a bit
like /usr/local, where things like iconv, readline etc are put. It's a directory
off of a users home directory, so he/she can write there.
I doubt it is the reason, but I'm surprised you are trying to build with a
mixture of GNU and Sun compilers.
The setup which semi-works for me (R at least builds) is
R 2.10.1
iconv-1.13.1
readline-6.0
disabled ICU
gcc 4.4.1, gcc 4.4.4 have both been used.
In each case gcc is configured to use the Sun linker and the Sun assembler - not
the GNU ones. I would suspect a gcc issue if you have the GNU linker in particular.
Configured with: /export/home/drkirkby/gcc-4.4.4/configure
--prefix=/usr/local/gcc-4.4.4-multilib --enable-languages=c,c++,fortran
--with-gmp=/usr/local/gcc-4.4.4-multilib
--with-mpfr=/usr/local/gcc-4.4.4-multilib --disable-nls
--enable-checking=release --enable-werror=no --enable-multilib
--with-system-zlib --enable-bootstrap --with-gnu-as
--with-as=/usr/local/binutils-2.20/bin/as --without-gnu-ld --with-ld=/usr/ccs/bin/ld
Thread model: posix
gcc version 4.4.4 (GCC)
R is now configured for sparc-sun-solaris2.10
Source directory: .
Installation directory: /export/home/drkirkby/sage-4.4.4.alpha1/local
C compiler: gcc -std=gnu99
-I/export/home/drkirkby/sage-4.4.4.alpha1/local/include
-L/export/home/drkirkby/sage-4.4.4.alpha1/local/lib/
Fortran 77 compiler: sage_fortran -g -O2
C++ compiler: g++ -g -O2
Fortran 90/95 compiler: sage_fortran -g -O2
Obj-C compiler:
Interfaces supported: X11, tcltk
External libraries: readline, BLAS(ATLAS), LAPACK(generic)
Additional capabilities: PNG, JPEG, TIFF, NLS
Options enabled: shared R library, R profiling, Java
Recommended packages: yes
configure: WARNING: you cannot build DVI versions of the R manuals
configure: WARNING: you cannot build DVI versions of all the help pages
configure: WARNING: you cannot build PDF versions of the R manuals
configure: WARNING: you cannot build PDF versions of all the help pages
make[2]: Entering directory
`/export/home/drkirkby/sage-4.4.4.alpha1/spkg/build/r-2.10.1.p2/src'
'sage_fortran' is an script which invokes the GNU fortran compiler. I wish Sage
did not do that, but it does.
I've noticed a few minor errors in the R manual for Solaris, and have posted
these once to r-help and twice to r-devel, and so far have had little feedback,
other than to post them to r-devel when I posted first to r-help.
There's a couple of R bug-releated things in Sage
Solaris 10 on SPARC
There's a build log:
http://sage.math.washington.edu/home/mpatel/trac/8306/r-2.10.1.p2.log
http://trac.sagemath.org/sage_trac/ticket/9201
OpenSolaris on x64
http://trac.sagemath.org/sage_trac/ticket/9040
If you manage to get any further, please let us know.
If any serious R developer needs access to a SPARC, I can arrange access on a 16
core Sun T5240. Drop me a private email.
Dave
#!/usr/bin/env bash
if [ "$SAGE_LOCAL" = "" ]; then
echo "SAGE_LOCAL undefined ... exiting";
echo "Maybe run 'sage -sh'?"
exit 1
fi
if [ "x$SAGE64" = xyes ]; then
echo "Building R 64 bit."
CFLAGS="-O2 -g -m64 "; export CFLAGS
LDFLAGS="-m64 "; export LDFLAGS
fi
if [ `uname` = "Darwin" ]; then
echo "Copying fake java and javac compiler on OSX"
cp patches/java "$SAGE_LOCAL"/bin
cp patches/javac "$SAGE_LOCAL"/bin
fi
CUR=`pwd`
# set CPPFLAGS so that Sage's readline & iconv are picked up
CPPFLAGS="-I$SAGE_LOCAL/include $CPPFLAGS"; export CPPFLAGS
# Hack to get around dumb hardcoding.
cp patches/R.sh.in src/src/scripts/
# Note by David Kirkby, Feb 16th 2010. /usr/include/X11/Xwindows.h does
# not exist on Solaris, but R configures OK with X support. Hence I've added
# a more specific test on Solaris, by testing for a library. That library
# exists both on Solaris 10 03/2005 (SPARC) and on OpenSolaris.
if [ -f /usr/include/X11/Xwindows.h ]; then
XSUPPORT=yes
else
if [ "x`uname`" = xSunOS ] && [ -f /usr/X11/lib/libXv.so ] ; then
XSUPPORT=yes
# Note by Karl-Dieter Crisman, April 12th 2010. X support would be nice
# to have in OSX, but see
#
http://CRAN.R-project.org/bin/macosx/RMacOSX-FAQ.html#X11-window-server-_0028optional_0029
# for how differently this would have to be handled on different OSX
# versions, none trivially. In any case, aqua, which we enable,
# performs the same function on OSX.
else
XSUPPORT=no
fi
fi
# we don't want to install R as a library framework on OSX
if [ `uname` = "Darwin" ]; then
OSXFW="--enable-R-framework=no"; export OSXFW
else
OSXFW=""; export OSXFW
fi
if [ "x`uname`" = xSunOS ]; then
# Note by David Kirkby, 16th Feb 2010. Even after adding the iconv library
# R would not build properly on Solaris 10, complaining of undefined
symbols
# uiter_setUTF8 and ucol_strcollIter
# After an email to r-help@r-project.org, Ei-ji Nakama
(rim.nak...@gmail.com)
# emailed me and said the option --without-ICU might help, which it did. I
don't see
# this option documented, but for now at least, it does allow R to build.
echo "Disabling ICU on Solaris, using an undocumented option --without-ICU"
echo "since the ICU library is not included on Solaris."
SUN_FLAGS="--without-ICU"; export SUN_FLAGS
fi
# let's remove old install, even the wrongly installed ones
rm -rf "$SAGE_LOCAL"/lib/r
rm -rf "$SAGE_LOCAL"/lib/R
rm -rf "$SAGE_LOCAL"/lib64/R
rm -rf "$SAGE_LOCAL"/lib64/r
# and let's also nuke some leftovers on SAGE_LOCAL/lib
rm -rf "$SAGE_LOCAL"/lib/libRblas.so "$SAGE_LOCAL"/lib/libRlapack.so
"$SAGE_LOCAL"/lib/libR.so
rm -rf "$SAGE_LOCAL"/lib/libRblas.dylib "$SAGE_LOCAL"/lib/libRlapack.dylib
"$SAGE_LOCAL"/lib/libR.dylib
cd src
# make sure the prefix is always lib, not lib64 on 64 bit linux
LIBnn="lib"; export LIBnn
FC=sage_fortran; export FC
F77=sage_fortran; export F77
# These flags are *critical* so that R will be built against Sage's
# copy of readline and ATLAS.
CFLAGS="-I$SAGE_LOCAL/include -L$SAGE_LOCAL/lib/ $CFLAGS"; export CFLAGS
LDFLAGS="-L$SAGE_LOCAL/lib/ $LDFLAGS"; export LDFLAGS
# FreeBSD needs the path to libiconv to be explicitly specified. In theory,
# --with-libiconv-prefix should work but configure script is broken and
# ignores that path when looking for libiconv. Hard-wire via xxFLAGS.
# Note by David Kirkby, 16th Feb 2010. The option --with-libiconv-prefix
# is not documented in the latest R manual, neither is it an option if you
# type 'configure --help'. Since there is an iconv library going to be
# integrated into Sage - see http://trac.sagemath.org/sage_trac/ticket/8191
# it is likely these FreeBSD specific lines can be removed, but I'll leave
# them here for a FreeBSD developer to address.
if [ `uname` = "FreeBSD" ]; then
CPPFLAGS="$CPPFLAGS -I/usr/local/include"
CFLAGS="$CFLAGS -I/usr/local/include"
LDFLAGS="$LDFLAGS -L/usr/local/lib"
fi
if [ `uname` = "Darwin" ]; then
echo "Configuring R for OSX"
./configure --prefix="$SAGE_LOCAL" --enable-R-shlib --with-x=$XSUPPORT
--with-readline="$SAGE_LOCAL" $OSXFW
else
echo "Configuring R with ATLAS"
./configure --prefix="$SAGE_LOCAL" --enable-R-shlib --with-x=$XSUPPORT
--with-readline="$SAGE_LOCAL" --with-blas="-L$SAGE_LOCAL/lib -lf77blas -latlas"
--with-lapack="-L$SAGE_LOCAL/lib -llapack -lcblas" $SUN_FLAGS
fi
if [ $? -ne 0 ]; then
echo "Configuring R with fallback options"
./configure --prefix="$SAGE_LOCAL" --enable-R-shlib --with-x=no
--with-readline="$SAGE_LOCAL" $OSXFW $SUN_FLAGS
fi
if [ $? -ne 0 ]; then
echo "Error configuring R."
exit 1
fi
$MAKE R
if [ $? -ne 0 ]; then
echo "Error building R."
exit 1
fi
#parallel make install is broken
export MAKE=make
$MAKE vignettes #needed for help system
$MAKE install
if [ $? -ne 0 ]; then
echo "Error installing R."
exit 1
fi
#$MAKE install-libR
#if [ $? -ne 0 ]; then
# echo "Error installing libR."
# exit 1
#fi
# Fix hardcoding problems.
cd "$CUR"/patches
python fix_hardcode
echo "Now install rpy"
cd "$CUR"
RPY_VER=rpy2-2.0.8
sage -f "$RPY_VER".spkg
if [ ! -f "$SAGE_ROOT"/spkg/installed/"$RPY_VER" ]; then
echo "Error installing rpy."
exit 1
fi
if [ `uname` = "Darwin" ]; then
echo "Copying fake java and javac compiler on OSX"
rm -f "$SAGE_LOCAL"/bin/java
rm -f "$SAGE_LOCAL"/bin/javac
fi
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.