From aferris at mrl.ubc.ca  Fri Mar 16 18:41:08 2007
From: aferris at mrl.ubc.ca (Andrew Ferris)
Date: Fri, 16 Mar 2007 10:41:08 -0700
Subject: [Rd] compile 2.4.1 for linux on power cpus SOLVED
In-Reply-To: <dc41e1260703151901x46c366b1ha74f73e547500741@mail.gmail.com>
References: <45F7CB380200007B0004C384@mail.mrl.ubc.ca>
	<45F7D4C20200007B0004C3BF@mail.mrl.ubc.ca>
	<45F7D4C2.0211.007B.0@mrl.ubc.ca> <45F85C4D.9080005@biostat.ku.dk>
	<45F80DF7.0211.007B.0@mrl.ubc.ca> <45F88D63.2000704@biostat.ku.dk>
	<45F83A25.0211.007B.0@mrl.ubc.ca> <45F8F040.6070907@biostat.ku.dk>
	<Pine.LNX.4.64.0703150709370.30980@gannet.stats.ox.ac.uk>
	<45F94F49.0211.007B.0@mrl.ubc.ca>
	<dc41e1260703151901x46c366b1ha74f73e547500741@mail.gmail.com>
Message-ID: <45FA7444.0211.007B.0@mrl.ubc.ca>

Thank you Ei-ji, 

That seems to have done it.

> .Machine$sizeof.pointer
[1] 8

So in total I've done the following to get it work:

Installed these readline rpms from the SLES10 media:

readline-devel-64bit-5.1-24.4
readline-devel-5.1-24.4

This is the configure command:

./configure CC="gcc -m64" /
CXX="gxx -m64" /
F77="gfortran -m64" / 
FC="gfortran -m64" /
CFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2" /
FFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2" /
LDFLAGS=-L/usr/lib64 /
--without-x

which gets this:

R is now configured for powerpc64-unknown-linux-gnu

  Source directory:          .
  Installation directory:    /usr/local

  C compiler:                gcc -m64 -std=gnu99  -mminimal-toc -fno-optimize-sibling-calls -g -O2
  Fortran 77 compiler:       gfortran -m64  -mminimal-toc -fno-optimize-sibling-calls -g -O2

  C++ compiler:              gxx -m64
  Fortran 90/95 compiler:    gfortran -m64 -g -O2

  Interfaces supported:
  External libraries:        readline
  Additional capabilities:   iconv, MBCS, NLS
  Options enabled:           shared BLAS, R profiling

  Recommended packages:      yes

configure: WARNING: I could not determine CXXPICFLAGS.
configure: WARNING: I could not determine SHLIB_CXXLDFLAGS
configure: WARNING: I could not determine CXXPICFLAGS.
configure: WARNING: you cannot build DVI versions of the R manuals
configure: WARNING: you cannot build PDF versions of the R manuals
configure: WARNING: I could not determine a PDF viewer

And that gets through make with no errors. That's R 2.4.1 on SLES10 on a power5 CPU server. 

Thank-you to Peter Dalgaard and Prof. Ripley for their help with this.

Andrew Ferris
Network Support Analyst
iCAPTURE Research Centre
University of British Columbia

>>> "Ei-ji Nakama" <nakama at ki.rim.or.jp> 3/15/2007 7:01 PM >>>
2007/3/16, Andrew Ferris <aferris at mrl.ubc.ca>:
> I'm closer but still not quite there. Here's the configure command I'm using:
>
>  ./configure 'CC=gcc -m64' 'CXX=g++ -m64 -mminimal-toc' 'FC=gfortran -mc64 -fno-optimize-sibling-calls' 'F77=gfortran -m64 -fno-optimize-sibling-calls' 'LDFLAGS=-L/usr/lib64' R_PAPERSIZE='letter'

$ uname -a
Linux macg5 2.6.18-3-powerpc64 #1 SMP Mon Dec 4 15:40:16 CET 2006
ppc64 GNU/Linux

$ gcc -v
Using built-in specs.
Target: powerpc-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-mpfr --disable-softfloat
--enable-targets=powerpc-linux,powerpc64-linux --with-cpu=default32
--enable-checking=release powerpc-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)

$ gcc -print-multi-lib
.;@fPIC at mstrict-align
64;@m64 at fPIC@mstrict-align

$ ./configure CC="gcc -m64" \
                   CXX="gxx -m64" \
                   F77="gfortran -m64" \
                   FC="gfortran -m64" \
                   CFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2" \
                   FFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2" \
                   --without-x

$ file bin/exec/R
bin/exec/R: ELF 64-bit MSB executable, PowerPC 64-bit or cisco 7500,
version 1 (SYSV), for GNU/Linux 2.6.0, dynamically linked (uses shared
libs), for GNU/Linux 2.6.0, not stripped

-- 
EI-JI Nakama  <nakama at ki.rim.or.jp>
"\u4e2d\u9593\u6804\u6cbb"  <nakama at ki.rim.or.jp>



***CONFIDENTIALITY NOTICE***
This electronic message is intended only for the use of the addressee and may contain information that is privileged and confidential.  Any dissemination, distribution or copying of this communication by unauthorized individuals is strictly prohibited. If you have received this communication in error, please notify the sender immediately by reply e-mail and delete the original and all copies from your system.



[Rd] compile 2.4.1 for linux on power cpus SOLVED
Andrew Ferris