From hin-tak.leung at cimr.cam.ac.uk  Thu Jul 12 21:10:03 2007
From: hin-tak.leung at cimr.cam.ac.uk (Hin-Tak Leung)
Date: Thu, 12 Jul 2007 20:10:03 +0100
Subject: [Rd] cleanup and Makevars
In-Reply-To: <637BDDED-F9CD-48D1-A0C1-D982AAA9DA29@stat.Berkeley.EDU>
References: <A153F980-E93F-4623-B097-E7635151386B@stat.berkeley.edu>	<Pine.LNX.4.64.0707100553350.16628@gannet.stats.ox.ac.uk>
	<637BDDED-F9CD-48D1-A0C1-D982AAA9DA29@stat.Berkeley.EDU>
Message-ID: <46967C8B.5000300@cimr.cam.ac.uk>

Kasper Daniel Hansen wrote:
> On Jul 11, 2007, at 9:30 AM, Prof Brian Ripley wrote:
<snipped>
>>> The full Makevars file:
>>>
>>> MYCXXFLAGS=-O0
>> You do realize that is highly non-portable?
> 
> Yes, but I do not know of any other way to downgrade the optimization  
> level. The SDK I am using breaks (due to memory alignment issues if a  
> specific optimization flag for GCC is include - the flag is certainly  
> implied by -O2 and as far as I recall also -O1). I guess the solution  
> is to switch to an autoconfigure script. The main reason for not  
> doing this is 1) time and actually more 2) the fact that the SDK does  
> not come with an ac script.
> 
> Thanks for the feedback, Kasper
<snipped>

I think I probably know about the breakage - gcc 4.x mis-compiles
the Affymetrix toolkit at the default optimization (-02) shipped with 
the toolkit. (Prof Ripley's comment was spot-on - why the reluctance
to just call it the Affymetrix toolkit bundled with the bioconductor
package affyparser?). I narrowed it down to the strict-aliasing
option... try '-O2 -fno-strict-aliasing' - it is not portable, but it
works around the funny way some part of the affy toolkit (actually one
particular file) is written.

I did report it in the Affy forum and also directly to my Affymetrix
dev contacts about a year ago; gcc 4 is the default on the mac these
days, I think?

On a related issue, I have some annoyance with cross-compiling leaving 
behind *.o files (and *.d, etc) which get in the way of native
compile and vice versa, and I have been wondering if there is a
recommended solution? What I am currently doing is to have a
"Makefile.utils" (I don't want or need a proper Makefile), and do
'make -f Makefile.utils clean' when I need to clean up - it is better
than typing
   rm -f  *.o *.so *~ *.rc *.d *.dll Makedeps *.def

(particularly with bash's file completion, all I am typing is
'make -f M<tab>f<tab> clean' to clean up). I am sure somebody will laugh
at this...

Hin-Tak



[Rd] cleanup and Makevars
Hin-Tak Leung