/
Maintainers.notes
313 lines (213 loc) · 7.99 KB
/
Maintainers.notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
Notes for Windows Maintainers
=============================
1) fixed/h/config.h can be made automatically. Some of this is
achieved 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.10.0, I used in /TEMP/R (any other directory will do, except the
sources).
To test trio set
LIBS='<RHOME>/src/extra/trio/libtrio.a'
sh /R/R-2.10.0/configure --build=i386-pc-mingw32 --with-readline=no --with-x=no
This ran fairly slowly, currently producing a src/include/config.h
that differs only in that
- it does not find the declarations of siglongjmp/sigsetjmp (in
psignal.[ch])
- MinGW gcc 4.2.1 supports pthreads, but I left that undefined.
Also, watch out for versions of the header files. For example,
<strings.h> was in mingw-runtime-1.2 and later, but not in the
Mingw-1.1 bundle. These days we insist on a current MinGW.
BDR 2002-04-15, 2003-02-10, 2004-06-28, 2005-11-25, 2006-07-06, 2007-08-09,
2009-07-08
2) The Makefiles for building a distribution have been reorganized. Now
all of the decisions about what files go into the distributables are made
in installer/Makefile; the decisions about which component of the setup
program each file goes into are made in installer/JRins.pl.
DJM 2003-02-25
3) 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 to
link to, and hence for DLLs which are to be linked to (rather than
loaded), the internal names need to be dllname.dll. This was not being
done by the %.dll rule used in 2.2.1, which builds via a .def file
with first line
LIBRARY $*
[The example in ld.info is
LIBRARY "xyz.dll"
whereas that in the MSDN documentation
(http://msdn2.microsoft.com/en-us/library/d91k01sh.aspx) is
LIBRARY BTREE
so MinGW is inconsistent with MSDN here.]
It would seem that this should just be replaced by $*.dll, but there
is another problem: ld.exe rejects .def files whose LIBRARY name
contains more than one dot, and so this is unable to cope with
packages with a dot in their name. (We already document that two or
more dots are not allowed.) So we have had to treat separately the
DLLs which are designed to be linked to. These are
R.dll : is special-cased, and as it wants to export entry points from
static libraries and exports variables, nothing else we tried worked.
Rblas.dll : has a .def file, and the name was changed to Rblas.dll
there.
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 with
gcc -shared. Rchtml.dll needs an import library as you cannot link
directly to a .ocx.
However, whereas MSDN says there must be a LIBRARY statement, it seems
not to be required for ld.exe. So the %.dll rule in MkRules as from
2.3.0 does not have a LIBRARY statement, which circumvents the 'at
most one dot' rule.
BDR 2006-02-15, 2006-02-24
5) Rdll.hide
AllDevicesKilled
RConsole
RFrame
Rf_runcmd
RgetMDIheight
RgetMDIwidth
RguiMDI
Ri18n_wcwidth
Riconv
Riconv_close
Riconv_open
Rwin_graphicsx
Rwin_graphicsy
UserBreak
locale2charset
optclosefile
optfile
optline
optopenfile
optread
for grDevices
R_deferred_default_method
R_do_MAKE_CLASS
R_do_new_object
R_do_slot
R_do_slot_assign
R_execMethod
R_primitive_generic
R_primitive_methods
R_set_prim_method
R_set_quick_method_check
R_set_standardGeneric_ptr
R_subassign3_dflt
do_set_prim_method
for methods
set_R_Tcldo
unset_R_Tcldo
wtransChar
for tcltk
R_gl_tab_set
cmdlineoptions
getDLLVersion
gl_hist_init
gl_loadhistory
readconsolecfg
saveConsoleTitle
setupui
for rgui/rterm/Rscript
Rf_mbrtowc
Rf_strchr
localeCP
for graphapp.dll
R_cumsum
for package DCluster
fft_factor
fft_work
for package RandomFields
setup_term_ui
for package Rserve
Brent_fmin
R_tabulate
R_zeroin
for package ape
findInterval
for package eco
chol_
optif9
rs_
for package nlme
balanc_
balbak_
elmhes_
eltran_
hqr2_
for package panel
BDR 2007-08-20
6) Conversion to Unicode/UTF-8.
[Notes are a work in progress. This has been discussed since 2003.]
As from R 2.7.0, Rgui works internally in UCS-2. Currently key strokes are
recorded as bytes, but that could easily be changed if we had testers with CJK
keyboards. Input/output is converted to/from the current locale in
R_ReadConsole/R_WriteConsole.
The internal pager works in UCS-2.
History files are currently written in the locale's charset, for
compatibility with Rterm and past versions of R. We could perhaps
alleviate this by using a BOM when writing in UCS-2, and detecting
that when loading history files.
Chris Jackson's script editor is still MBCS. Quite a bit of work will
be needed to convert it, since e.g. GA_gettext() expects to work with
char *.
The only bar to converting Rterm to UCS-2 is the lack of CJK keyboards
to test on, but there would be little advantage in doing so.
6.1 Internal use of UTF-8
- Internal mbcs<->wchar/UCS translations would need to be modified to
use UTF-8 and not the locale charset. Several places
(e.g. Riconv_open) already have support for this. The
gettext-runtime (src/extra/intl) does not.
*All* I/O would need to be translated. This includes
- Rprintf and allies, error messaging.
[This one is really tricky: we don't want to be writing UTF-8 files
when sink() is in use, for example, and rterm/some embedded uses
run in environments that probably do not support UCS-2.
The current compromise is to encode UTF-8 character vector elements
in EncodeString, at least when called from printing and from cat(),
and if outputting to the Rgui console. This is done by surrounding
them by 3-byte escape sequences starting with STX/ETX.]
- file names. Since Windows NTFS can have file names not valid in the
current locale, this needs to use wfopen and similar interfaces, as
well as GetFullPathNameW ... also _w* versions of mkdir, rmdir,
unlink, open, popen, stat, system. Use with care, as not all file
systems use UCS-2 file names. [Done]
This needs to include bzlib and zlib, as well as file/folder
selection widgets. [Done]
- environment variables. Both values and names, since _wputenv is
needed to set name=value strings. It would be better to use wmain
and only ever use _wgetenv and _wputenv to avoid maintaining
parallel environments. [Done]
- graphics devices. Calls to text() and points() (with pch as a
string) need either to be translated or, preferably, the device
adjusted to accept UTF-8 (and we would need a flag to know if it
could). Note that this impacts third-party devices.
[Done for windows() family, postscript, pdf.]
- GetUserName, GetComputerName, [GS]etCurrentDirectory. [Done]
Also:
- There would be compatibility issues with saved workspaces, although
few for those working in CP1252 locales.
- It is not clear what to do with strings passed to packages. We
could force conversion in .C and .Fortran, but most
character-manipulation packages are likely to be using .Call.
BDR 2008-01-06
7) Changing the parser
By default the parser in gram.y is only processed in maintainer mode,
which isn't supported in Windows builds. Defining RUN_BISON will
cause src/main/Makefile.win to process it (and correct for the erroneous
line number records caused by our renaming of the output).
8) Making iconv.dll
In the past this was done from the libiconv sources using VC++ 6, but
as from version 1.12 that is no longer supported. It does not build
easily with MinGW (due to the overuse of libtool), but we used
setenv INSTALL cp
setenv INSTALL_DATA cp
sh configure --build=i386-pc-mingw32 --disable-nls
cd libcharset; make
cp include/localcharset.h ../lib
cd ../lib
make
gcc -shared .libs/iconv.o .libs/localcharset.o .libs/relocatable.o \
.libs/iconv-exports.o -export-all-symbols -o Riconv.dll
We now use a modified version of win-iconv, but the libiconv version
can still be use by replacing bin/Riconv.dll.
BDR 2009-02-08