NOTES ON BUILDING TLPERL 2019 BUILD PLATFORM 64-bits Windows 7 running under VirtualBox on Linux. GETTING THE PERL SOURCE I downloaded the latest stable Perl source 5.28.1 from CPAN. THE COMPILER The file README.win32 in the root of the distribution contains compilation instructions, which lists various supported MinGW distributions. I went with the 32-bits compiler from www.mingw-w64.org, version 6.0.0, containing gcc version 8.1.0. BUILDING PERL I went to the win32 subdirectory of the Perl source. In makefile.mk I adjusted relevant settings to my build environment. A diff for this makefile.mk is included. I compiled with dmake dmake test There were some test failures: Test Summary Report ------------------- ../dist/IO/t/io_leak.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output ../dist/IO/t/io_poll.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output ../ext/IPC-Open3/t/IPC-Open3.t (Wstat: 0 Tests: 45 Failed: 0) TODO passed: 25 Files=2666, Tests=1083818, 2126 wallclock secs (95.45 usr + 4.91 sys = 100.36 CPU) Result: FAIL dmake: Error code 130, while making 'test' but I hope that these will not impact us. Installation with: dmake 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 added the new Perl bin directory to the searchpath. I downloaded needed modules from CPAN and added them with perl Makefile.PL && dmake && dmake test && dmake 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 526 => 528 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) Win32::OLE 0.1712 LWP and dependencies, in order of compilation/installation: Socket 2.029 Date::Parse 2.30 (file TimeDate-2.30.tar.gz) HTTP::Date 6.02 File::Listing 6.04 IO::HTML 1.001 LWP::MediaTypes 6.02 Test::Needs 0.002005 URI 1.76 Try::Tiny 0.30 HTTP::Message 6.18 HTML::Tagset 3.20 HTML::Parser 3.72 WWW::RobotRules 6.02 HTTP::Negotiate 6.01 Net::HTTP 6.18 Mozilla::CA 20180117 HTTP::Daemon 6.01 HTTP::Cookies 6.04 Test::Fatal 0.014 Test::RequiresInternet 0.05 LWP 6.37 (file libwww-perl-6.37.tar.gz) JSON support Cpanel::JSON::XS 4.09 JSON::MaybeXS 1.004000 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 2019