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