From p.dalgaard at biostat.ku.dk  Thu Mar 15 01:03:47 2007
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: Thu, 15 Mar 2007 01:03:47 +0100
Subject: [Rd] compile 2.4.1 for linux on power cpus
In-Reply-To: <45F80DF7.0211.007B.0@mrl.ubc.ca>
References: <45F7CB380200007B0004C384@mail.mrl.ubc.ca>	<45F7D4C20200007B0004C3BF@mail.mrl.ubc.ca>
	<45F7D4C2.0211.007B.0@mrl.ubc.ca><45F7D4C2.0211.007B.0@mrl.ubc.ca>
	<45F85C4D.9080005@biostat.ku.dk> <45F80DF7.0211.007B.0@mrl.ubc.ca>
Message-ID: <45F88D63.2000704@biostat.ku.dk>

Andrew Ferris wrote:
> Thank you for the reply Peter. 
>
> I've compiled R from source using the following:
>
> ./configure --host=powerpc64-power5-linux-gnu --build=powerpc64-power5-linux-gnu '--with-blas=-framework blas-3.1.0-11'
>
> and after I've made R I get this:
>
>   
>> .Machine$sizeof.pointer
>>     
> [1] 4
>
> meanwhile uname -a prints out this:
>
> Linux [hostname] 2.6.16.21-0.8-ppc64 #1 SMP Mon Jul 3 18:25:39 UTC 2006 ppc64 ppc64 ppc64 GNU/Linux
>
>   
So I was wrong in assuming that 64 bit SLES would be set up for 64 bit 
compiles.....

> and in the root filesystem there's a /lib and /lib64. I suspect that R needs to have the 64 bit libraries specified so is there a way to do that?
First check the toolchain:

which gcc
gcc -dumpmachine

You might need to revise your path and/or install 64 bit versions of the 
compilers.

Actually, looking at the package list for SLES 10, I see that some 
packages have a -64bit variant, e.g.

glibc-64bit 2.4 
<http://www.novell.com/products/linuxpackages/server10/ppc/glibc-64bit.html> 
(Standard Shared Libraries (from the GNU C Library))
glibc-devel-64bit 2.4 
<http://www.novell.com/products/linuxpackages/server10/ppc/glibc-devel-64bit.html> 
(Include Files and Libraries Mandatory for Development)

but the gcc package does not, and the gcc-fortran-64bit 4.1.0 
<http://www.novell.com/products/linuxpackages/server10/ppc/gcc-fortran-64bit.html> 
packages contains only libraries. So my guess is that there is one 
compiler that does both 32 bit and 64 bit compiling, but you need to set 
a compiler flag for the latter.

I don't think messing with --build and --host is likely to do any good.



[Rd] compile 2.4.1 for linux on power cpus
Peter Dalgaard