summaryrefslogtreecommitdiff
path: root/os2/README
blob: 5df90ce03d82d4fc2758f5d915374917c578ec6f (plain)
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
Current state of the patches here is with respect to perl5.002b1d ;-).

========================================================

The OS/2 patchkit was submitted by ilya@math.ohio-state.edu.  I have
applied some parts that I suspect won't cause any problems.
Others do things that I haven't had time to fully consider.

Still other patches included here should perhaps be integrated with the
metaconfig package that generates Configure.

	Andy Dougherty		<doughera@lafcol.lafayette.edu>

========================================================

Notes on the patch:
~~~~~~~~~~~~~~~~~~~
patches should be applied as
	patch -p0 <.....
All the diff.* files and POSIX.mkfifo should be applied.

Additional files are available on
	ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2
including patched pdksh and gnumake, needed for build.


Target:
~~~~~~~

This is not supposed to make a perfect Perl on OS/2. This patch is
concerned only with perfect _build_ of Perl on OS/2. A lot of good
features from Andreas Kaiser port missed this patch.

Annotations of changes: (part of what is below is already included by Andy,
~~~~~~~~~~~~~~~~~~~~~~~ thus there are skips below)
1) C files
2) Configure
3) MakeMaker
4) Build tools

1) C files
	a) mkfifo macro added to Posix.c
	b) Copyright notice for OS/2 port changed
	c) MYMALLOC section in perl.h moved (why?)
	d) setgrent grent and getgrent wrapped in ifdef
	e) declarations for #if defined(MYMALLOC) && defined(HIDEMYMALLOC)
		added
	f) some diagnostics added to tests

2) Configure 
	b) Support for extraction from NE style libraries.
	c) a lot of 
			cc -o whatever
		lines did not have $ldopts.
	d) The above variables are used throughout the file for checks

3) Build tools and libraries

	
	a) ln changed to $ln in some places
	b) Makefiles and related scripts made to use $(O), $(A), $(AR)
		using the vars found by Configure or defaulted to
		some reasonable value.
	c) $firstmakefile is the file make looks onto before Makefile
	d) $plibext is the extension for the perl library
	e) $archobjs is the list of additional object files needed for
		local build.
	l) Makefile.SH : added sh in front of some commands           
	   if $d_shrplib is 'custom', looks into                      
	        $osname/Makefile.$osname.SH to construct the section  
	        on shared Perl library.            
		!!!!!!	Also: installperl installman makedepend
		!!!!!!		added as dependencies to the corresponding 
		!!!!!!		targets.
	m) clean target extended to delete some intermediate files    

Notes on build on OS/2:
~~~~~~~~~~~~~~~~~~~~~~~
The change of C code in this patch is based on the ak port of 5.001+.

a) Make sure your sort is not the broken OS/2 one.

b) when extraction perl5.*.tar.gz you need to extract perl5.*/Configure
separately, since by default perl5.001m/configure overwrites it;
	like this:
		tar vzxf perl5.004.tar.gz perl5.004/Configure

c) Necessary manual intervention when compiling on OS/2:

	Need to put perl.dll on LIBPATH after it is created.

d) Compile summary:

# Look for hints/os2.sh and correct what is different on your system
# I have rather spartan configuration.

	# Prefix means where to install:
sh Configure -des -D prefix=f:/perl5.005
make
	# Will probably die after build of miniperl (unless you have DLL
	# from previous compile). Need to move DLL where it belongs
make
	# some warnings in POSIX.c
make test
	# some tests fail, 9 on my system
	#
	# before this you should create subdirs bin and lib in the 
	# prefix directory (f:/perl5.005 above):
make install
	# man pages are not installed

e) At the end of August GNU make and pdksh were too buggy for compile.
Both maintainers have patches that make it possible to compile perl.
The binaries are included in
	ftp://ftp.math.ohio-state.edu/pub/users/ilya/os2
patches are available too.
Note that the beta of pdksh5.2.4 can run Configure, but not build, since
	sh file
may actually call file.SH ! The maintainer is notified, I hope this will be
fixed before actual release.

!!!!!!!!!!!!!!!!!
If you see that some '/' became '\' in pdksh 5.2.3, you did not apply
my patches!
Same with segfaults in Make 3.74.
!!!!!!!!!!!!!!!!!

Problems reported: 

a) one of the latest tr is broken, get an old one :-(
	1.11 works. (On compuserver?)
b) You need a perlglob.exe and link386.
c) Get rid of invalid perl.dll on your LIBPATH.


Send comments to ilya@math.ohio-state.edu.

======================================================
Requires 0.9b (well, provision are made to make it build under 0.9a6,
but they are not tested, please inform me on success).
(earlier than 0.9b ttyname was not present, it is hard to maintain this
difference automatically, though I try).
======================================================

You may try building with a.out style by using `-D emxaout' on the Configure
line (dynamic extensions should not use CRT (and/or any perl API) in this
case, which prohibits most buildin extensions). Probably no extension is
possible, since boot code should return the amount on stack.

The reason why compiling with a.out style executables leads to problems
with dynamic extensions is:
	a) OS/2 does not export symbols from executables;
	b) Thus if extension needs to import symbols from an application
		the symbols for the application should reside in a .dll.
	c) You cannot export data from a .dll compiled with a.out style.
On the other hand, aout-style compiled extension enjoys all the 
(dis)advantages of fork().