rtaylor
2013-Jan-10 02:58 UTC
[Rd] Cannot override default -O3 flag on Winodws, dll does not have symbols
In trying to compile a package with c code using Rtools, -O3 is added by default. This comes from Makeconf? Compiler flags (CFLAGS="-O0 -g" ) set in src/Makevars.win or src/Makevars appear before this. nm pkg.dll reveals no symbols! How can I compile a Windows package with "-O2 -g"? Thanks, RT -- View this message in context: http://r.789695.n4.nabble.com/Cannot-override-default-O3-flag-on-Winodws-dll-does-not-have-symbols-tp4655106.html Sent from the R devel mailing list archive at Nabble.com.
Dirk Eddelbuettel
2013-Jan-10 03:32 UTC
[Rd] Cannot override default -O3 flag on Winodws, dll does not have symbols
On 9 January 2013 at 18:58, rtaylor wrote: | In trying to compile a package with c code using Rtools, -O3 is added by | default. This comes from Makeconf? Compiler flags (CFLAGS="-O0 -g" ) set in | src/Makevars.win or src/Makevars appear before this. | | nm pkg.dll reveals no symbols! | | How can I compile a Windows package with "-O2 -g"? a) [long way] By locally building R with such a configure flag b) [shortcut] By editing the Makeconf file of the R installation used for compiling, eg in $R_HOME/etc/Makeconf (or maybe Makeconf.win) Dirk -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
Prof Brian Ripley
2013-Jan-10 07:55 UTC
[Rd] Cannot override default -O3 flag on Winodws, dll does not have symbols
On 10/01/2013 02:58, rtaylor wrote:> In trying to compile a package with c code using Rtools, -O3 is added by > default. This comes from Makeconf? Compiler flags (CFLAGS="-O0 -g" ) set in > src/Makevars.win or src/Makevars appear before this. > > nm pkg.dll reveals no symbols!That is not a function of using -O3, if there is useful code (as there needs to be in an R package since you need to link to entry points).> > How can I compile a Windows package with "-O2 -g"?By following the manuals. 'Writing R Extensions' points you to your local version of http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Customizing-package-compilation But it you want debug symbols, read about how to build a debug version of R in that manual (and use -gdwarf-2).> > Thanks, > RT > > > > -- > View this message in context: http://r.789695.n4.nabble.com/Cannot-override-default-O3-flag-on-Winodws-dll-does-not-have-symbols-tp4655106.html > Sent from the R devel mailing list archive at Nabble.com. > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >-- Brian D. Ripley, ripley at stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UK Fax: +44 1865 272595