Use PERL=../miniperl
[p5sagit/p5-mst-13.2.git] / os2 / README
1 Current state of the patches here is with respect to perl5.002b1d ;-).
2
3 ========================================================
4
5 The OS/2 patchkit was submitted by ilya@math.ohio-state.edu.  I have
6 applied some parts that I suspect won't cause any problems.
7 Others do things that I haven't had time to fully consider.
8
9 Still other patches included here should perhaps be integrated with the
10 metaconfig package that generates Configure.
11
12         Andy Dougherty          <doughera@lafcol.lafayette.edu>
13
14 ========================================================
15
16 Notes on the patch:
17 ~~~~~~~~~~~~~~~~~~~
18 patches should be applied as
19         patch -p0 <.....
20 All the diff.* files and POSIX.mkfifo should be applied.
21
22 Additional files are available on
23         ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2
24 including patched pdksh and gnumake, needed for build.
25
26
27 Target:
28 ~~~~~~~
29
30 This is not supposed to make a perfect Perl on OS/2. This patch is
31 concerned only with perfect _build_ of Perl on OS/2. A lot of good
32 features from Andreas Kaiser port missed this patch.
33
34 Annotations of changes: (part of what is below is already included by Andy,
35 ~~~~~~~~~~~~~~~~~~~~~~~ thus there are skips below)
36 1) C files
37 2) Configure
38 3) MakeMaker
39 4) Build tools
40
41 1) C files
42         a) mkfifo macro added to Posix.c
43         b) Copyright notice for OS/2 port changed
44         c) MYMALLOC section in perl.h moved (why?)
45         d) setgrent grent and getgrent wrapped in ifdef
46         e) declarations for #if defined(MYMALLOC) && defined(HIDEMYMALLOC)
47                 added
48         f) some diagnostics added to tests
49
50 2) Configure 
51         b) Support for extraction from NE style libraries.
52         c) a lot of 
53                         cc -o whatever
54                 lines did not have $ldopts.
55         d) The above variables are used throughout the file for checks
56
57 3) Build tools and libraries
58
59         
60         a) ln changed to $ln in some places
61         b) Makefiles and related scripts made to use $(O), $(A), $(AR)
62                 using the vars found by Configure or defaulted to
63                 some reasonable value.
64         c) $firstmakefile is the file make looks onto before Makefile
65         d) $plibext is the extension for the perl library
66         e) $archobjs is the list of additional object files needed for
67                 local build.
68         l) Makefile.SH : added sh in front of some commands           
69            if $d_shrplib is 'custom', looks into                      
70                 $osname/Makefile.$osname.SH to construct the section  
71                 on shared Perl library.            
72                 !!!!!!  Also: installperl installman makedepend
73                 !!!!!!          added as dependencies to the corresponding 
74                 !!!!!!          targets.
75         m) clean target extended to delete some intermediate files    
76
77 Notes on build on OS/2:
78 ~~~~~~~~~~~~~~~~~~~~~~~
79 The change of C code in this patch is based on the ak port of 5.001+.
80
81 a) Make sure your sort is not the broken OS/2 one.
82
83 b) when extraction perl5.*.tar.gz you need to extract perl5.*/Configure
84 separately, since by default perl5.001m/configure overwrites it;
85         like this:
86                 tar vzxf perl5.004.tar.gz perl5.004/Configure
87
88 c) Necessary manual intervention when compiling on OS/2:
89
90         Need to put perl.dll on LIBPATH after it is created.
91
92 d) Compile summary:
93
94 # Look for hints/os2.sh and correct what is different on your system
95 # I have rather spartan configuration.
96
97         # Prefix means where to install:
98 sh Configure -des -D prefix=f:/perl5.005
99 make
100         # Will probably die after build of miniperl (unless you have DLL
101         # from previous compile). Need to move DLL where it belongs
102 make
103         # some warnings in POSIX.c
104 make test
105         # some tests fail, 9 on my system
106         #
107         # before this you should create subdirs bin and lib in the 
108         # prefix directory (f:/perl5.005 above):
109 make install
110         # man pages are not installed
111
112 e) At the end of August GNU make and pdksh were too buggy for compile.
113 Both maintainers have patches that make it possible to compile perl.
114 The binaries are included in
115         ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2
116 patches are available too.
117 Note that the beta of pdksh5.2.4 can run Configure, but not build, since
118         sh file
119 may actually call file.SH ! The maintainer is notified, I hope this will be
120 fixed before actual release.
121
122 !!!!!!!!!!!!!!!!!
123 If you see that some '/' became '\' in pdksh 5.2.3, you did not apply
124 my patches!
125 Same with segfaults in Make 3.74.
126 !!!!!!!!!!!!!!!!!
127
128 Problems reported: 
129
130 a) one of the latest tr is broken, get an old one :-(
131         1.11 works. (On compuserver?)
132 b) You need a perlglob.exe and link386.
133 c) Get rid of invalid perl.dll on your LIBPATH.
134
135
136 Send comments to ilya@math.ohio-state.edu.
137
138 ======================================================
139 Requires 0.9b (well, provision are made to make it build under 0.9a6,
140 but they are not tested, please inform me on success).
141 (earlier than 0.9b ttyname was not present, it is hard to maintain this
142 difference automatically, though I try).
143 ======================================================
144
145 You may try building with a.out style by using `-D emxaout' on the Configure
146 line (dynamic extensions should not use CRT (and/or any perl API) in this
147 case, which prohibits most buildin extensions). Probably no extension is
148 possible, since boot code should return the amount on stack.
149
150 The reason why compiling with a.out style executables leads to problems
151 with dynamic extensions is:
152         a) OS/2 does not export symbols from executables;
153         b) Thus if extension needs to import symbols from an application
154                 the symbols for the application should reside in a .dll.
155         c) You cannot export data from a .dll compiled with a.out style.
156 On the other hand, aout-style compiled extension enjoys all the 
157 (dis)advantages of fork().