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
|
NOTES ON BUILDING TLPERL 2020
BUILD PLATFORM
64-bits Windows 10 1909 running under KVM on Linux.
GETTING THE PERL SOURCE
I downloaded the latest stable Perl source 5.30.1 from CPAN.
THE COMPILER
The file README.win32 in the root of the distribution contains
compilation instructions and lists various supported MinGW
distributions. I went with the 32-bits compiler from
http://strawberryperl.com/package/kmx/32_gcctoolchain/ version 8.3.0
BUILDING PERL
I went to the win32 subdirectory of the Perl source. In GNUmakefile
I adjusted relevant settings to my build environment. A diff for
this GNUmakefile is included.
I prepended the mingw bin directory to the searchpath and compiled with
gmake
gmake test
There were some test failures:
Test Summary Report
-------------------
../cpan/Win32/t/GetShortPathName.t (Wstat: 0 Tests: 5 Failed: 1)
Failed test: 2
../cpan/Win32/t/Unicode.t (Wstat: 0 Tests: 11 Failed: 8)
Failed tests: 1-3, 5, 8-11
Parse errors: Bad plan. You planned 12 tests but ran 11.
../dist/Net-Ping/t/450_service.t (Wstat: 256 Tests: 26 Failed: 1)
Failed test: 9
Non-zero exit status: 1
../ext/IPC-Open3/t/IPC-Open3.t (Wstat: 0 Tests: 45 Failed: 0)
TODO passed: 25
Files=2661, Tests=1144786, 1844 wallclock secs (79.75 usr + 7.64 sys = 87.39 CPU)
Result: FAIL
gmake: *** [GNUmakefile:1947: test] Error 10
but I hope that these will not impact us.
Installation with:
gmake installbare
`installbare' omits the generation of html.
MAKING PERL PORTABLE
There were hard-coded paths in lib/Config.pm and
lib/Config_heavy.pl, which might cause problems.
I edited lib/Config.pm and lib/Config_heavy.pl to compute Perl's
location dynamically. To both I add the code
my $rootdir = __FILE__;
$rootdir =~ s![\\/][^\\/]*[\\/][^\\/]*$!!;
$rootdir =~ s!/!\\!g;
and used this in Config.pm for the definition of %Config, taking
care to replace single-quoted strings with double-quoted ones and
escaping backslashes and other characters where necessary. I also
parameterized the location of the mingw compiler.
Config_heavy.pl got a similar treatment, in particular the
single-quoted here-documents with markers !END! (very long) and
EOVIRTUAL.
The original versions are still present in the lib directory under
the names Config.pm.orig and Config_heavy.pl.orig.
INSTALLING MODULES
When adding modules, I prepended the new Perl bin directory to the
searchpath. I downloaded needed modules from CPAN and added them
with
perl Makefile.PL && gmake && gmake test && gmake install
All modules for which tests were defined got a pass. They are, in
order of processing:
Math::Int64 0.54
IO::String 1.08
File::Which 1.23
Digest::SHA1 2.13
Encode::compat 0.07
Encode::Locale 1.05
Windows-specific:
Win32::API 0.84
Win32::WinError 0.04 (just copying WinError.pm to site/lib/Win32)
Win32API::Registry 0.33
Win32::Console 0.10 (no tests)
Win32::TieRegistry 0.30
Win32::Shortcut 0.08 (no tests)
LWP and dependencies, in order of compilation/installation:
Socket 2.029
HTTP::Date 6.05
File::Listing 6.04
IO::HTML 1.001
Try::Tiny 0.30
Test::Fatal 0.014
Test::Needs 0.002006
LWP::MediaTypes 6.04
URI 1.76
HTTP::Message 6.22
HTML::Tagset 3.20
HTML::Parser 3.72
WWW::RobotRules 6.02
HTTP::Negotiate 6.01
Net::HTTP 6.19
Mozilla::CA 20180117
HTTP::Daemon 6.06
HTTP::Cookies 6.08
Test::RequiresInternet 0.05
LWP 6.43 (file libwww-perl-6.43.tar.gz)
JSON support
Cpanel::JSON::XS 4.19
JSON::MaybeXS 1.004000
Compared to the 2019 release, the Date::Parse and Win32::OLE modules
could be dropped.
MODIFICATIONS FOR TEXLIVE
- As explained above: our versions of lib/Config.pm and lib/Config_heavy.pl
compute the location of tlperl dynamically. These files still
contain a hard-coded path for mingw.
- The lib/pods directory has been removed, to save some space.
- The bin subdirectory now only contains exe- and dll files;
batch files and Perl scripts have been removed.
- Copied from mingw32/bin to tlperl/bin:
libgcc_s_dw2-1.dll, libstdc++-6.dll and libwinpthread-1.dll
TESTING WITH TEXLIVE
For testing the new Perl with the installer, I unpacked the net
installer and replaced its tlperl with the new one.
For testing the new Perl with tlshell.exe from the installed TeX
Live, I copied it into the fresh installation.
Both tests were done with 32-bits Windows 7 Home Premium as regular
user and 64-bits Windows 10 Professional as admin user.
tlshell, with its tlmgr Perl backend, appeared to work as intended.
I also successfully ran the uninstaller.
Siep Kroonenberg
Last revision: March 2020
|