[Bioc-devel] use -Wa, -mbig-obj -O3 when building package under Windows

Martin Maechler m@ech|er @end|ng |rom @t@t@m@th@ethz@ch
Tue May 28 17:50:13 CEST 2019


>>>>> Kasper Daniel Hansen 
>>>>>     on Fri, 24 May 2019 10:31:31 -0400 writes:

    > [ This is a crazy bug where you have to increase optimization. ]
    > I some to add here. I am involved in at least two packages which requires
    > overriding the optimization switch to downgrade optimization. You have an
    > additional problem where you need to add additional flags.

    > The solution in affxparser (see the source) is a custom compiler call where
    > we place -O0 before the system/package compiler flags. This is not a great
    > solution as it assumes that the compiler knows about -O notation (which is
    > true for GCC but not a true assumption everywhere).

    > In Rgraphviz I have the same problem (but not solved yet because of ...
    > time). The issue here is that recent GCCs (v8 and higher) cannot be used
    > with -O3 but needs -O2. I have started to think about a better solution
    > than affxparser, to be used by the community, but have been a bit stumped.
    > Preferably I would like to use autoconf macro for detecting GCC, but when
    > we compile a package we are using the compiler encoded in R (aka $CC). So
    > somehow I want to run autoconf "detect which compiler is used" but for a
    > specific compiler. This is probably possible, but I don't know how right
    > now.

    > Then, conditional on GCC I plan to do a regex which replaces -O3 with -O2.
    > This is not perfect either because the different -O3 optimizations can be
    > supplied as individual flags, and I don't know which flag it is which
    > breaks GCC. But it is must closer to the right solution. I don't know if
    > regex/sed'ing is better than overriding by changing the order as in
    > affxparser, but having the ability to do a conditional in Makevars would be
    > good. Of course, the autoconf route does not address Windows, but I think
    > we can assume / count on the fact that the RTools pipeline is used (aka, it
    > is always GCC).

    > I would be happy to communicate more on this, to get this sorted out. It
    > has been a todo list item for me, for a while, and I should really try to
    > resolve it.

    > But for a quick fix, look at affxparser.

    > Best,
    > Kasper

Dear Kasper,
maybe you could ask about this "over at"  the R-devel (or
R-package-devel ?) mailing list?
These problems are relevant to many R package authors not just
bioconductor ones, and so it may worth to expose this to even
more experts than here ...

(I'm interested myself, as you may remember, because of our need
 for a working 'Rgraphviz' ...)

Best,
Martin
--
Martin Maechler
ETH Zurich  and  R Core Team



More information about the Bioc-devel mailing list