1 From comp.lang.perl.misc. The included patch, perl5.005_02.patch, implements most of the suggestions below. My observations during the build process are commented within the body of Mr. Morlock's message, set off by ******CSW******
4 **************************************
5 Subject: HOWTO: Builiding Perl under Win95/98 using Cygwin32
6 Author: Steven Morlock <newspost@morlock.net>
8 Forum: comp.lang.perl.misc
10 If you have a desire to build Perl under Windows 95/98 using Cygnus'
11 Cygwin Win32 ports of the GNU development tools (Cygwin32) you might
12 get something out of my experience of building it.
14 An advantage of the versions Perl built with Cygwin32 is that Cygwin32
15 has a POSIX compatible library including support for the fork() function.
21 Foliage Software Systems
23 http://www.foliage.com
26 These are the steps I took to build the latest development
27 version of Perl (5.005.53) under the Windows 95 & Window 98
28 operating system using Cygnus' Cygwin Win32 ports of the GNU
31 The release of the Cygwin32 tools used was B20.1. These tools
34 http://sourceware.cygnus.com/cygwin
36 Install Cygwin32 as described on the Cygnus web site. Additionally
37 you should mount /bin as described in the following document:
39 http://sourceware.cygnus.com/cygwin/cygwin-ug-net/setup-mount.html
41 Note that the mount command shown in their example should appear on a
44 mount C:/cygnus/cygwin-b20/H-i586-cygwin32/bin /bin
46 You must run the described build process below under the Cygwin32
49 In the following <PERL> will refer to the perl source/build
50 directory. <INST> will refer to the perl target/install directory.
52 * Pre-build checklist:
54 - I found that building Perl on a unmounted partition/drive other than the
55 root will fail. It appears that the double forward slash that Cygwin32
56 uses to reference drives other than the root drive (typically C:) gets
57 converted to a single forward slash at several points in the build process.
58 I have not tried, but expect it would work, to mount the non-root drive.
59 This problem held true for both the drive where the perl source were and
60 the drive where the Cygwin32 binaries where located. In the build
61 described in these notes the Perl source and Cygwin32 binaries were located
64 - Following the instructions in <PERL>/README.cygwin32:
66 apply the patch, first
69 + Copy the contents of the <PERL>cygwin32 directory to <PERL>
71 + Edit the 'ld2' & 'gcc2' scripts to reflect the build path <PERL>
73 + Either move 'ld2' & 'gcc2' to a directory on your path or add
76 - Edit <PERL>/hints/cygwin32.sh:
78 + Add the following lines to the script:
85 This change allows us to pick up the right version of va_start().
86 Cygwin32 has both a signal and double parameter versions floating
87 around in their header files.
89 + Remove support for dynamic linking. I found that all DynaLoader'd
90 extensions crashed during the running of the test suite. Add or edit
91 'usedl' entry to read:
97 If there is enough push I will try to sort out the problems with
98 dynamic loading. I have made several unsuccessful attempts at
99 modifying <PERL>/perlld to fix this problem. If you are interested,
102 + Change the path to the Cygwin32 directories. This includes the
103 entries for 'usrinc', 'libpth', 'lddlflags', 'libc' and 'usrinc'.
105 the patch does this ^
108 - Edit makedepend.SH. The original version of makedepend.SH produces
109 dependencies that include double backslashes. This can not be processed
110 by Cygwin32's 'make'. Apply the following modification to makedepend.SH
111 to correct these unfortunate filenames:
116 *** makedepend.SH.ORIG Wed Sep 23 09:51:56 1998
117 --- makedepend.SH Mon Dec 21 09:27:30 1998
121 # for file in `cat /dev/null`; do
122 if [ "$osname" = uwin ]; then
123 uwinfix="-e s,\\\\\\\\,/,g -e s,\\([a-zA-Z]\\):/,/\\1/,g"
124 + elif [ "$archname" = cygwin32 ]; then
125 + uwinfix="-e s,\\\\\\\\,/,g"
130 - Edit config_h.SH. The original version of config_h.SH has an bogus
131 #include that gets propagated into the dependency list in Makefile
132 create from the makedepend script. The Apply the following modification
133 to config_h.SH to work around this unfortunate filename:
135 the patch does this, too
138 *** config_h.SH.ORIG Wed Oct 28 23:16:10 1998
139 --- config_h.SH Mon Dec 21 10:14:28 1998
143 #if $cpp_stuff != 1 && $cpp_stuff != 42
144 ! #include "Bletch: How does this C preprocessor catenate tokens?"
149 #if $cpp_stuff != 1 && $cpp_stuff != 42
150 ! #include "#Bletch: How does this C preprocessor catenate tokens?"
153 The real source of the problem appears that the 'make depend' in the
154 'x2p' directory has problems. The following messages are generated by
157 Finding dependencies for hash.o.
158 gcc2: Can't open gcc2
159 ... [similar messages to above]
160 You don't seem to have a proper C preprocessor. Using grep instead.
161 Updating GNUmakefile...
163 So the grep is pulling the bogus #include from the file. The patch
164 turns the #include'd message into a comment.
166 - Run the Configure in the <PERL> directory as described in the document
167 <PERL>/README.cygwin32
169 I receive the message "THIS PACKAGE SEEMS INCOMPLETE.". This does not
170 appear to be a problem.
172 When presented with the list of handy defaults, select 'cygwin32'
174 You can use the defaults for the remainder of the prompts.
178 - Issue the command 'make' in the directory <PERL>.
179 Cross fingers, wait and be patient.
182 I didn't see this problem \/
184 - I experience problems when building two files 'pp_sys.o' & 'doio.o'. The
185 build process will crash with a Windows dialog during the build of these two
186 files. The way I get by the problem is to control-C the make and issue
187 the build commands for the two files by hand. In the Perl directory issue
188 the following commands:
190 `sh cflags libperl.a pp_sys.o` pp_sys.c
191 `sh cflags libperl.a doio.o` doio.c
193 This appears to be a problem with Cygwin32's make.
195 Hopefully if you follow the instructions above you will experience no
196 problems building Perl.
200 I found that the majority of the tests passed. There were no errors
201 that I thought particularly scary. There were several unexpected results
202 such as a couple 'A required .DLL file, CYGWIN1.DLL, was not found' dialogs
203 and 'Perl perform an illegal operation' dialogs.
206 saw the "missing dll" during one test
209 As long as I can run all my own scripts, things are fine by me...
211 - Renamed or delete the file <PERL>/t/lib/io_sock.t so it will not be
212 executed. This test hangs the system. I have made no attempts to
213 fix the problem. From the <PERL> directory issue the following command:
216 I didn't do this, and saw no problems.
219 mv t/lib/io_sock.t t/lib/io_sock.t.ORIG
221 - Issue the command 'make test' in the directory <PERL>.
222 Cross fingers, wait and be patient.
226 The install seems to work okay. There are problems when install the man
227 pages, but we don't need any stinkin' man pages, right?
230 the man pages that didn't install were those that had "::" in their filename.
233 - Issue the command 'make install' in the directory <PERL>.
235 Configuration files available by request to perl@morlock.net