R-beta: R-beta Win95 glm

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
14 Jul 1998 12:39:24 +0200

Guido Masarotto <guido@sirio.stat.unipd.it> writes:

> > I'm currently summer-vacationing in my home. If the weather keeps
> > acting up, I might get myself up to speed on crosscompiling R for
> > Win32 with gcc on a Unix host. This has been a long-standing wish of
> > mine because it could potentially bring the versions in much better
> > sync.
>   BTW, I made a similar (small) attempt. 
>   On a Linux box, I installed gcc as a cross-compiler for mingw32
>   (gcc-2.8.1, g77-0.5.23, binutils-2.9.1, the 1July snapshot
>   of mingw32 and of WinApi (from the Colins Peters's site)).
>   Then I tried to recompile R.0.61.3 (my actual windows version).
>   And all seems to work. So, this seems a viable alternative.
>   Hence, I plan to modify my Makefile's so that cross-compiling
>   would be easy.
>   guido masarotto

Great! I'm almost there with a set of instructions for building the
egcs-1.0.2 as a cross-compiler. This is in some sense easier, although
proving a bit tricky because of makefile bugs (parts of the compiler
build - including "make cross" - seems to assume that the
cross-compiler is installed!) but I think I got it now.

The Tk project appears to be in deep coma. But you are quite right,
the R console slowness is *the* most annoying feature of the Win32
version. It is buggy too, characters are getting lost on long
printouts. Tk is doing similar stuff *much* faster, so either we
should peek at the Tk sources and see how it is done there or try
coding the console *in* Tcl/Tk.

(OK, so the lack of command recall and ugly graphics hardcopy are
close contenders to first place in annoyances).

Hey, presto! I seem to have a clean build of egcs-mingw-cross (was
running in another window as I typed this). Here's my makefile if you
want to try:

# Preliminaries: 
#	Unpack binutils-2.9.1 somewhere
#	Unpack egcs somewhere and PATCH IT with Mumit's patches
#	 if (and only if) it's version 1.0.2 
#	 [ cd to egcs dir and
#		gzip -dc egcs-1.0.2-mingw32.diff.gz | patch -p2
#	 ]
#	Get the zipped files for the *native* egcs-mingw32

prefix=$(shell pwd)# ... or e.g. /usr/local
wkdir=$(shell pwd)

# This name got a bit mangled by the Joliet CD "standard"
# Note that I'm not asking you to unpack it.


all: egcs-final

egcs-final: egcs
	export PATH=$(PATH):$(prefix)/bin ;\
	cd $(wkdir)/EGCS ;\
	$(egcs)/configure --srcdir=$(egcs)\
		--prefix=$(prefix) --target=i386-mingw32 ; \
	make &&\
	make install
	touch egcs-final
egcs: inc-install binutils-install
	mkdir -p $(wkdir)/EGCS
	cd $(wkdir)/EGCS ; \
	export PATH=$(PATH):$(prefix)/bin ;\
	$(egcs)/configure --srcdir=$(egcs)\
		--prefix=$(prefix) --target=i386-mingw32 ; \
	make info &&\
	make install LANGUAGES="c c++"
	touch egcs
binutils-install: binutils
	cd $(wkdir)/BINU ; make install
	touch binutils-install
binutils: inc-install 
	mkdir -p $(wkdir)/BINU
	cd $(wkdir)/BINU ; \
	$(binutils)/configure --srcdir=$(binutils) \
		--prefix=$(prefix) --target=i386-mingw32 ; \
	touch binutils
	unzip -o $(native) 'i386-mingw32/*' -d $(prefix) 
	touch inc-install

# This doesn't quite cut it, but I'm not going to  rm $(prefix)/bin/*, etc.
	rm -rf $(wkdir)/EGCS $(wkdir)/BINU
	rm egcs-final egcs binutils binutils-install inc-install

   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch