Rev 42165 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
Notes for Windows Maintainers=============================1) fixed/h/config.h can be made automatically. Some of this isachieved by overrides in the configure script.You will need a copy of sh.exe in /bin. Then with the R sources in/R/R-2.6.0, I used in /TEMP/R (any other directory will do, except thesources)sh /R/R-2.6.0/configure --build=i386-pc-mingw32 --with-readline=no --with-x=no --without-iconvThis ran fairly slowly, currently producing a src/include/config.hthat differs only in that- it does not find the declarations of siglongjmp/sigsetjmp (inpsignal.h)- SUPPORT_UTF8 is defined, but that is not true on Windows.- HAVE_VASPRINTF is true thanks to the trio library.- In mingw-runtime >= 3.10 it finds gettimeofday, but that isless accurate than the GetSystemTime used already.Also, watch out for versions of the header files. For example,<strings.h> was in mingw-runtime-1.2 and later, but not in theMingw-1.1 bundle. These days we tend to insist on a current MinGW.BDR 2002-04-15, 2003-02-10, 2004-06-28, 2005-11-25, 2006-07-062) The Makefiles for building a distribution have been reorganized. Nowall of the decisions about what files go into the distributables are madein installer/Makefile; the decisions about which component of the setupprogram each file goes into are made in installer/JRins.pl.DJM 2003-02-253) Making Tcl/Tk.See the directory R-Tcl-win in the R-packages SVN repository.4) Linking to DLLs.Mingw's ld.exe takes the internal name of the DLL as the object tolink to, and hence for DLLs which are to be linked to (rather thanloaded), the internal names need to be dllname.dll. This was not beingdone by the %.dll rule used in 2.2.1, which builds via a .def filewith first lineLIBRARY $*[The example in ld.info isLIBRARY "xyz.dll"whereas that in the MSDN documentation(http://msdn2.microsoft.com/en-us/library/d91k01sh.aspx) isLIBRARY BTREEso MinGW is inconsistent with MSDN here.]It would seem that this should just be replaced by $*.dll, but thereis another problem: ld.exe rejects .def files whose LIBRARY namecontains more than one dot, and so this is unable to cope withpackages with a dot in their name. (We already document that two ormore dots are not allowed.) So we have had to treat separately theDLLs which are designed to be linked to. These areR.dll : is special-cased, and as it wants to export entry points fromstatic libraries and exports variables, nothing else we tried worked.Rblas.dll : has a .def file, and the name was changed to Rblas.dllthere.Rlapack.dll : is simple, so gcc -shared with no .def file works.Rproxy.dll : is special-cased. (Linked against by rcom package.)The other DLLs which were in R_HOME/bin, Rbitmap.dll and Rchtml.dll,have been moved to R_HOME/modules. They are now made directly withgcc -shared. Rchtml.dll needs an import library as you cannot linkdirectly to a .ocx.However, whereas MSDN says there must be a LIBRARY statement, it seemsnot to be required for ld.exe. So the %.dll rule in MkRules as from2.3.0 does not have a LIBRARY statement, which circumvents the 'atmost one dot' rule.BDR 2006-02-15, 2006-02-245) Moving to gcc 4.xIt looks like just two things are needed:- change to BUILD=GCC4 in MkRules.- in fixed/h/config.h, comment out#define HAVE_F77_EXTRA_UNDERSCORE 1and change to one underscore in#define F77_FUNC_(name,NAME) name ## __BDR 2007-04-06