« first day (1281 days earlier)      last day (1894 days later) » 

12:23 AM
Anyone have experience building R to allow debugging on Windows? I've got it working so that I can run Rgui under gdb and inspect results, but when I ask for many variables' values, they return <optimized out>.
OK, so it looks like I need to set a gcc compiler flag -O0 or at least something less than the default -O3, but I can't figure out how to do that.
From the two references I've been mostly relying on, section 8.4 of the R for Windows FAQ and a semi-official description by Duncan Murdoch, I see how I can do this for packages, but not for a build of R itself.
 
It's been years... so bear with me.
On Unix, you do 'configure; make; make install' and choices for CFLAGS etc go into the files creates by configure.
Make, however, also listens to env.vars so you can always do CFLAGS="-O0 -Wall" make.
I have, however, forgotten what the pecularities for Windows are. But there will be a mega-config file somewhere which the main Makefile sources.
 
Sounds like I'm at least thinking along the right lines then. I just tried SET CFLAGS="-O0" before doing make all recommended, and it didn't work, but maybe I shouldn't have quoted the -O0.
 
The quoting does not matter. And (at least under bash) skip the SET. Just CFLAGS=-O0 CXXFLAGS=-O0 FCLAGS=-O0 make etc pp
 
Darn. I was hoping it'd be as simple as removing the quotes. Will still check that just in case, since I am running from Windows command line.
You're right that there must be some Makefile I could edit as well, and I even went looking for a huge one, but couldn't seem to find it. If I figure out which one works, I'll report back.
@DirkEddelbuettel -- Thanks at least for your confirmation that CFLAGS is one of the right environment variables. That reduces the moving parts by one, which is a big help!
 
12:39 AM
Looks for something called Makeconf or alike, and look in RHOME/etc.
Got it, methinks.
Just a little RTFM in the R Inst + Admin manual.
Quote: "Open a command window at 'R_HOME/src/gnuwin32'. Look at
'MkRules.dist' and if settings need to be altered, copy it to
'MkRules.local' and edit the settings there. In particular, this is
where a 64-bit build is selected. Then run ... "
 
Super. I had looked in there, and noticed that that's where G_FLAG=-gdwarf-2 is set, right under a comment reading "## == configuration macros for building R ==", so should've been able to figure that out. (I guess just 'cause I didn't see any CFLAGS= in there doesn't mean I can't add it myself.) Off to try this right away.
 
12:57 AM
Actually, it is even more obvious. Doh. In src/gnuwin32/Makefile ...
Just read the top of it. It includes all of these, and then vars.mk. That's your daddy.
 
Good, because that hadn't worked. And neither did R-exts' suggestion of MAKEFLAGS="CFLAGS=-O0", maybe (?) because mine is not a POSIX-compliant make.
 
 
6 hours later…
6:38 AM
@DirkEddelbuettel -- It looks like the simplest way to set the optimization level for both main R and the base R package, and for both C and Fortran code is to set EOPTS = -O0 -mtune=core2 in R_HOME/src/gnuwin/MkRules.local. $(EOPTS) gets appended to gcccalls throughout the build triggered by make all recommended and so overrides the default value of -O3 that's set earlier in the list of arguments.
For finer-grained control, directly edit CFLAGS and FFLAGS in R_HOME/src/gnuwin/Makefile (for main R) and in R_HOME/src/gnuwin/fixed/etc/MakeConf (for the base R packages).
For the base R packages, you can alternatively set the relevant environment variables via SET PKG_CFLAGS=-O0 etc. (Not that you need any of this ;) Thanks again helping me figure this out.
 
7:42 AM
Just got my 4th Yearling badge. </tappy dance>
 
8:14 AM
package 'openxlsx' is available as a source package but not as a binary, but I see the binary on CRAN.
 
8:25 AM
And of course there are problems with localized characters. @DirkEddelbuettel have you tried this, how do umlauted characters and sharfes s behave?
 
 
3 hours later…
11:16 AM
@RomanLuštrik Have not tried it at all.
 
 
3 hours later…
1:57 PM
@JoshO'Brien Might be worth a blog post or something to preserve for posterity.
 
 
2 hours later…
3:29 PM
 
 
3 hours later…
Talk on r-devel about "S4 zealots". Really? ;-)
 
 
4 hours later…
10:42 PM
When I type "brian ripley" into Google, its first suggestion is "brian ripley rude" followed by "brian ripley r". Seems harsh.
 
11:21 PM
In the top three for me is: "brian ripley plunge o meter" Make of that what you will
 
11:36 PM
"brian ripley is a jerk" rounds out the top 10 Google suggestions for me. Harsh. I also get the "plunge o meter" one, which apparently has something to do with Canadian house prices.
 

« first day (1281 days earlier)      last day (1894 days later) »