This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
deparse-skips.txt: skip undef.t, opcount.t for now
[perl5.git] / README.qnx
CommitLineData
ffe25ee3
B
1# vim: syntax=pod
2
a83b6f46
JH
3If you read this file _as_is_, just ignore the funny characters you see.
4It is written in the POD format (see pod/perlpod.pod) which is specially
5designed to be readable as is.
ff68c719 6
a83b6f46
JH
7=head1 NAME
8
de2902a6 9perlqnx - Perl version 5 on QNX
a83b6f46
JH
10
11=head1 DESCRIPTION
12
ecd6d377 13As of perl5.7.2 all tests pass under:
a83b6f46 14
a181ddb7 15 QNX 4.24G
a83b6f46
JH
16 Watcom 10.6 with Beta/970211.wcc.update.tar.F
17 socket3r.lib Nov21 1996.
18
6dea6691
NA
19As of perl5.8.1 there is at least one test still failing.
20
21Some tests may complain under known circumstances.
22
23See below and hints/qnx.sh for more information.
af23fe4d 24
8c499071 25Under QNX 6.2.0 there are still a few tests which fail.
ecd6d377 26See below and hints/qnx.sh for more information.
af23fe4d 27
ecd6d377 28=head2 Required Software for Compiling Perl on QNX4
a83b6f46
JH
29
30As with many unix ports, this one depends on a few "standard"
ecd6d377 31unix utilities which are not necessarily standard for QNX4.
a83b6f46
JH
32
33=over 4
34
35=item /bin/sh
36
37This is used heavily by Configure and then by
ecd6d377 38perl itself. QNX4's version is fine, but Configure
a83b6f46
JH
39will choke on the 16-bit version, so if you are
40running QNX 4.22, link /bin/sh to /bin32/ksh
41
42=item ar
43
44This is the standard unix library builder.
45We use wlib. With Watcom 10.6, when wlib is
46linked as "ar", it behaves like ar and all is
47fine. Under 9.5, a cover is required. One is
48included in ../qnx
49
50=item nm
51
52This is used (optionally) by configure to list
53the contents of libraries. I will generate
54a cover function on the fly in the UU directory.
55
56=item cpp
57
58Configure and perl need a way to invoke a C
59preprocessor. I have created a simple cover
60for cc which does the right thing. Without this,
022735b4 61Configure will create its own wrapper which works,
a83b6f46
JH
62but it doesn't handle some of the command line arguments
63that perl will throw at it.
64
65=item make
66
67You really need GNU make to compile this. GNU make
68ships by default with QNX 4.23, but you can get it
69from quics for earlier versions.
70
71=back
72
ecd6d377 73=head2 Outstanding Issues with Perl on QNX4
a83b6f46 74
af23fe4d
NA
75There is no support for dynamically linked libraries in QNX4.
76
3ed0a8dd
NA
77If you wish to compile with the Socket extension, you need
78to have the TCP/IP toolkit, and you need to make sure that
79-lsocket locates the correct copy of socket3r.lib. Beware
80that the Watcom compiler ships with a stub version of
81socket3r.lib which has very little functionality. Also
82beware the order in which wlink searches directories for
83libraries. You may have /usr/lib/socket3r.lib pointing to
84the correct library, but wlink may pick up
85/usr/watcom/10.6/usr/lib/socket3r.lib instead. Make sure
86they both point to the correct library, that is,
87/usr/tcptk/current/usr/lib/socket3r.lib.
88
ecd6d377 89The following tests may report errors under QNX4:
af23fe4d 90
2a6dc374 91dist/Cwd/Cwd.t will complain if `pwd` and cwd don't give
af23fe4d
NA
92the same results. cwd calls `fullpath -t`, so if you
93cd `fullpath -t` before running the test, it will
94pass.
95
96lib/File/Find/taint.t will complain if '.' is in your
97PATH. The PATH test is triggered because cwd calls
98`fullpath -t`.
99
6dea6691 100ext/IO/lib/IO/t/io_sock.t: Subtests 14 and 22 are skipped due to
a181ddb7 101the fact that the functionality to read back the non-blocking
6dea6691
NA
102status of a socket is not implemented in QNX's TCP/IP. This has
103been reported to QNX and it may work with later versions of
104TCP/IP.
105
106t/io/tell.t: Subtest 27 is failing. We are still investigating.
a83b6f46
JH
107
108=head2 QNX auxiliary files
ff68c719 109
110The files in the "qnx" directory are:
111
a83b6f46
JH
112=over 4
113
114=item qnx/ar
115
116A script that emulates the standard unix archive (aka library)
117utility. Under Watcom 10.6, ar is linked to wlib and provides the
118expected interface. With Watcom 9.5, a cover function is
119required. This one is fairly crude but has proved adequate for
37a78d01 120compiling perl.
ff68c719 121
a83b6f46
JH
122=item qnx/cpp
123
124A script that provides C preprocessing functionality. Configure can
125generate a similar cover, but it doesn't handle all the command-line
126options that perl throws at it. This might be reasonably placed in
127/usr/local/bin.
128
210b36aa
AMS
129=back
130
ecd6d377
NA
131=head2 Outstanding issues with perl under QNX6
132
8c499071 133The following tests are still failing for Perl 5.8.1 under QNX 6.2.0:
ecd6d377
NA
134
135 op/sprintf.........................FAILED at test 91
3ed0a8dd
NA
136 lib/Benchmark......................FAILED at test 26
137
138This is due to a bug in the C library's printf routine.
139printf("'%e'", 0. ) produces '0.000000e+0', but ANSI requires
8c499071 140'0.000000e+00'. QNX has acknowledged the bug.
ecd6d377 141
dab7d471
BF
142=head2 Cross-compilation
143
144Perl supports cross-compiling to QNX NTO through the
145Native Development Kit (NDK) for the Blackberry 10. This means that you
146can cross-compile for both ARM and x86 versions of the platform.
147
148=head3 Setting up a cross-compilation environment
149
150You can download the NDK from
151L<http://developer.blackberry.com/native/downloads/>.
152
153See
154L<http://developer.blackberry.com/native/documentation/cascades/getting_started/setting_up.html>
155for instructions to set up your device prior to attempting anything else.
156
157Once you've installed the NDK and set up your device, all that's
158left to do is setting up the device and the cross-compilation
159environment. Blackberry provides a script, C<bbndk-env.sh> (occasionally
160named something like C<bbndk-env_10_1_0_4828.sh>) which can be used
161to do this. However, there's a bit of a snag that we have to work through:
162The script modifies PATH so that 'gcc' or 'ar' point to their
163cross-compilation equivalents, which screws over the build process.
164
165So instead you'll want to do something like this:
166
167 $ orig_path=$PATH
168 $ source $location_of_bbndk/bbndk-env*.sh
169 $ export PATH="$orig_path:$PATH"
170
171Besides putting the cross-compiler and the rest of the toolchain in your
172PATH, this will also provide the QNX_TARGET variable, which
173we will pass to Configure through -Dsysroot.
174
175=head3 Preparing the target system
176
177It's quite possible that the target system doesn't have a readily
f1460a66 178available /tmp, so it's generally safer to do something like this:
dab7d471 179
02257115
KW
180 $ ssh $TARGETUSER@$TARGETHOST 'rm -rf perl; mkdir perl; mkdir perl/tmp'
181 $ export TARGETDIR=`ssh $TARGETUSER@$TARGETHOST pwd`/perl
182 $ export TARGETENV="export TMPDIR=$TARGETDIR/tmp; "
dab7d471
BF
183
184Later on, we'll pass this to Configure through -Dtargetenv
185
186=head3 Calling Configure
187
188If you are targetting an ARM device -- which currently includes the vast
189majority of phones and tablets -- you'll want to pass
190-Dcc=arm-unknown-nto-qnx8.0.0eabi-gcc to Configure. Alternatively, if you
191are targetting an x86 device, or using the simulator provided with the NDK,
192you should specify -Dcc=ntox86-gcc instead.
193
194A sample Configure invocation looks something like this:
195
196 ./Configure -des -Dusecrosscompile \
197 -Dsysroot=$QNX_TARGET \
198 -Dtargetdir=$TARGETDIR \
199 -Dtargetenv="$TARGETENV" \
200 -Dcc=ntox86-gcc \
201 -Dtarghost=... # Usual cross-compilation options
202
a83b6f46 203=head1 AUTHOR
ff68c719 204
ff68c719 205Norton T. Allen (allen@huarp.harvard.edu)
a83b6f46 206