Re: [Rd] cleanup and Makevars

From: Hin-Tak Leung <hin-tak.leung_at_cimr.cam.ac.uk>
Date: Thu, 12 Jul 2007 20:10:03 +0100

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



R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Thu 12 Jul 2007 - 20:00:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 12 Jul 2007 - 22:36:14 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.