Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 531 forks source link

Build Problems With 5.6.0 On OS/2 #1836

Closed p5pRT closed 11 years ago

p5pRT commented 24 years ago

Migrated from rt.perl.org#3099 (status was 'rejected')

Searchable as RT3099$

p5pRT commented 24 years ago

From @EmJayFry

Although I can configure\, build and install version 5.6.0 (latest stable) on my OS/2 system\, there are one or two problem areas that seem to be present. At least\, I consider them to be problem areas.

Configuring

To configure perl\-5\.6\.0 for OS/2\, I ran these two steps from an OS/2
command line
   sh Configure \-de \-D prefix=d​:/perl
   Configure\.cmd \-de \-D prefix=d​:/perl 2>&1 | tee myperl\.configure

Following this process\, I examined the myperl\.configure file\, and now
have the following comments

a\) Throughout the Configure script\, there are extensive references to
files that are expected to be in the /etc directory\. On OS/2\, the way
to locate this directory is to use the ETC environment variable\. For
example\, the following is an extract from myperl\.configure

Figuring out host name\.\.\.
Maybe "hostname" will work\.\.\.
Your host name appears to be "minitower"\. Right? \[y\]  
awk​: cmd\. line​:3​: fatal​: cannot open file \`hosts' for reading \(No such
file or directory\)
awk​: cmd\. line​:2​: fatal​: cannot open file \`hosts' for reading \(No such
file or directory\)
\(You do not have fully\-qualified names in /etc/hosts\)
\(No help from resolv\.conf either \-\- attempting clever guess\)
\(Lost all hope \-\- silly guess then\)

I DO have a hosts file\, and it lives in c​:\\mptn\\etc which is defined in
the ETC environment variable\. Also\, OS/2 does not have resolv\.conf\, it
has resolv and resolv2\, both of which can be found by way of the same
environment variable\. As far as I can make out\, the script should be
using the resolv file\.

Not being a Unix programmer\, I have no idea how to change Configure to
make this fix\, so I'll just report it and leave it to the perl\-porters\.

b\) Another area of concern in the configuration process relates to the
following myperl\.configure extract

Checking for optional libraries\.\.\.
\[snip\]
Found \-lndbm\.
Found \-lgdbm\.
Found \-ldbm\.
Found \-ldb\.
\[snip\]
dbmclose\(\) NOT found\.
We won't be including \<dbm\.h>
\[snip\]
\<ndbm\.h> found\.
dbm\_open\(\) NOT found\.
We won't be including \<ndbm\.h>
\[snip\]
\<gdbm\.h> found\.
gdbm\_open\(\) NOT found\.
We won't be including \<gdbm\.h>
\[snip\]

I can't for the life of me\, work out why this is happening\. \<dbm\.h>
\<ndbm\.h> and \<gdbm\.h> contain function prototypes for the functions
that Configure claims are missing\. Could it be that this is a result of
using GNU GDBM 1\.7\.3 which is the \_only\_ version \(of any DBM\) that I
have been able to locate?

c\) To even use Perl on an OS/2 system requires that EMX is installed\.
This I have\, and at the latest availble version and level \(emx 09d\)\.
Again\, this myperl\.configure extract shows a further problem

Checking how to flush all pending stdio output\.\.\.
Your fflush\(NULL\) isn't working \(contrary to ANSI C\)\.
All is futile\.  Even fflush\(stdin\) clobbers input pipes\!
OK\, I give up\.  I cannot figure out how to flush pending stdio output\.
We won't be flushing handles at all before fork/exec/popen\.

According to the EMX documentation\, fflush\(\) on an input pipe will
discard any pending data\. I assume that this is what is causing
Configure to say that fflush\(stdin\) 'clobbers input pipes'\. It is not
apparent from the source disribution for Perl what this Configure
sequence is trying to achieve\, or whether the actions of EMX are a
problem or not\.

d\) There appears to be a problem in Configure with the attempt to
assign a default pager\.

What pager is used on your system? \[/usr/ucb/more\]  
File /usr/ucb/more doesn't exist\.  Use that name anyway? \[y\]  

Even if I run Configure interactively\, I am unable to specify that my
pager is\, in fact\, d&#8203;:/emx/bin/less\.exe

e\) This also shows a slight problem with Configure

Guessing which symbols your C compiler and preprocessor define\.\.\.
awk&#8203;: cmd\. line&#8203;:1&#8203;: \\EOSH
awk&#8203;: cmd\. line&#8203;:1&#8203;: ^ backslash not last character on line
\./Cppsym\.try&#8203;: \./Cppsym\.try\[20\]&#8203;: here document \`EOSH' unclosed
Your C compiler defines the following cpp symbols&#8203;:
\_\_32BIT\_\_
\_\_EMX\_\_
\_\_GNUC\_MINOR\_\_=8
\_\_GNUC\_\_=2
\_\_i386
\_\_i386\_\_
cpu=i386
i386
machine=i386
system=emx
system=unix

In my case\, awk is GNU Awk 3\.0\.22 with gawk\.exe renamed as awk\.exe

Building

To build Perl 5.6.0 for OS/2\, I used the following command   make 2>&1 | tee myperl.make

Examination of myperl.make following completion of the command\, revealed the following\, single\, area of concern

f) This\, to me\, is mystifying. All the README.* files exist in the base source directory for Perl 5.6.0

make​: [extra.pods] Error 1 (ignored) cp​: ../README.amiga​: No such file or directory cp​: ../README.cygwin​: No such file or directory cp​: ../README.dos​: No such file or directory cp​: ../README.hpux​: No such file or directory cp​: ../README.machten​: No such file or directory cp​: ../README.os2​: No such file or directory cp​: ../README.os390​: No such file or directory cp​: ../README.win32​: No such file or directory cp​: ../vms/perlvms.pod​: No such file or directory make​: [extra.pods] Error 1 (ignored)

The extra.pods file contains the following

pod/perlamiga.pod pod/perlcygwin.pod pod/perldos.pod pod/perlhpux.pod pod/perlmachten.pod pod/perlos2.pod pod/perlos390.pod pod/perlwin32.pod

These pod files don't exist in the pod subdirectory. What's wrong here? Is make in the wrong directory at this stage?

Other than this\, the build process went very smoothly - apart from the *DBM modules that weren't built because of previous configuration problems.

Testing

I used the following command to retain a record of the make test step
&nbsp;  make test 2>&1 | tee myperl\.test

The results of this showed that two test scripts failed\, namely

io/pipe\.\.\.\.\.\.\.\.\.\.\.\.\.\.open failed&#8203;: No such file or directory at
io/pipe\.t line 100\.
FAILED at test 9

op/exec\.\.\.\.\.\.\.\.\.\.\.\.\.\.
Process terminated by SIGPIPE
FAILED at test 4

Further examination using the test harness showed the following

Failed Test  Status Wstat Total Fail  Failed  List of
failed

---

---
io/pipe\.t         2   512    15    7  46\.67%  9\-15
op/exec\.t                     8    1  12\.50%  4
16 tests and 114 subtests skipped\.
Failed 2/246 test scripts\, 99\.19% okay\. 8/11759 subtests failed\, 99\.93%
okay\.

This seems be reasonable considering the problems encountered during
the configuration stages\.  Tests have been skipped for a variety of
reasons\, the main ones being 'inappropriate platform'\, 'file
permissions' and 'module not built' and seem\, on further inspection\, to
be valid\.

The test scripts that failed cause me a modicum of concern\.

io/pipe\.\.\.\.\.\.\.\.\.\.\.\.\.open failed&#8203;: No such file or directory at io/pipe\.t
line 100\.
dubious
&nbsp;    Test returned status 2 \(wstat 512\, 0x200\)
DIED\. FAILED tests 9\-15
&nbsp;    Failed 7/15 tests\, 53\.33% okay

Looking at the pipe\.t script\, I can not see why test 9 fails\. Could it
be related to the fflush\(\) problem identified during the configuration
step \(see above\)?

op/exec\.\.\.\.\.\.\.\.\.\.\.\.\.FAILED test 4
&nbsp;    Failed 1/8 tests\, 87\.50% okay \(\-1 skipped test&#8203;: 6 okay\, 75\.00%\)

This appears\, to me\, to be a problem more with t/op/exec\.t than with
Perl\. Shouldn't this test \(4\) be making some allowances for OS/2?

Installation

In general\, installation appeared to go very well - apart from one or two little niggles\, such as

g) LD_LIBRARY_PATH=E​:/perl-5.6.0 ./perl installperl WARNING​: You've never run 'make test'!!! (Installing anyway.) mkdir d​:/perl/bin   cp perl.exe d​:/perl/bin/perl5.6.0.exe   chmod 755 d​:/perl/bin/perl5.6.0.exe

I _did_ run 'make test' (see above)\, so why the WARNING?

h) Perl won't run directly after installation\, and updating config.sys with the correct entries. The dll created by 'make' hasn't been copied to the installation directory. Did this manually!

i) Following instructions (mentioned many times in comp.lang.perl.misc) I tried to read the documentation e.g. 'perldoc perldoc' - won't run! It turns out that the installation directory contains a perldoc shell script\, but not a perldoc.cmd file. There are sundry other shell scripts present as well.

D​:\perl\bin\c2ph D​:\perl\bin\dprofpp D​:\perl\bin\find2perl D​:\perl\bin\h2ph D​:\perl\bin\h2xs D​:\perl\bin\perlbug D​:\perl\bin\perlcc D​:\perl\bin\perldoc D​:\perl\bin\pl2pm D​:\perl\bin\pod2html D​:\perl\bin\pod2latex D​:\perl\bin\pod2man D​:\perl\bin\pod2text D​:\perl\bin\pod2usage D​:\perl\bin\podchecker D​:\perl\bin\podselect D​:\perl\bin\pstruct D​:\perl\bin\s2p D​:\perl\bin\splain

Looking around the source distribution\, I see a perl script called perl2cmd.pl in the os2 subdirectory. This looks as though it should create OS/2 cmd files from shell scripts contained in the installation directory. So\, I ran the following command (from the source distribution base directory)

  perl os2/perl2cmd.pl -n d​:/perl/bin

and was pleasantly surprised to find that I now have the missing cmd files and that 'perldoc perl doc' now runs - although it complains that 'Superuser must not run perldoc.cmd without security audit and taint checks.'

I discovered that the easiest(?) way of eliminating this was to patch the perldoc.cmd file so that the test for this didn't include OS/2\, i.e.

if (!($Is_VMS || $Is_MSWin32 || $Is_Dos) && ($> == 0 || $\< == 0)

becomes

if (!($Is_VMS || $Is_MSWin32 || $Is_Dos || $^O eq 'os2') && ($> == 0 || $\< == 0)

NOW it runs!

Conclusion


Apologies for the length of this message\, but I decided to detail
everying that I could find that appears to be amiss\. Hope this helps in
achieving the goal of truly makeing Perl compile 'out\-of\-the\-box' for
OS/2\. As it says in the README\.os2 file

&nbsp;  "The target is to make OS/2 the best supported platform for"
&nbsp;  "using/building/developing Perl and I\<Perl applications>\, as well as"
&nbsp;  "make Perl the best language to use under OS/2\. The secondary target
is"
&nbsp;  "to try to make this work under DOS and Win\* as well \(but not B\<too>
hard\)\."

P\.S The README\.os2 file could do with a certain amount of revamping\. It
seems to me that a lot of what has been written really only applies to
past releases\.

Regards\,
MIKE FRY

Computer Software Consultants \(Pty\) Ltd\.
&nbsp;  Tel&#8203;: \+27 \(011\) 793 6300
&nbsp;  Fax&#8203;: \+27 \(011\) 792 8662
 Cell&#8203;: \+27 083 286 7896
email&#8203;: mikefry@&#8203;iafrica\.com
p5pRT commented 21 years ago

From @ask

[mikefry@​iafrica.com - Fri Apr 14 01​:57​:09 2000]​:

http​://bugs6.perl.org/rt2/Ticket/Display.html?id=3099

Is this still an issue with 5.6.1 or 5.8.0?

- ask

p5pRT commented 21 years ago

@ask - Status changed from 'open' to 'stalled'

p5pRT commented 21 years ago

From fredbonzo@iafrica.com

On Sun\, 27 Apr 2003 21​:07​:52 +0000\, Ask Bjoern Hansen (via RT) wrote​:

[mikefry@​iafrica.com - Fri Apr 14 01​:57​:09 2000]​:

http​://bugs6.perl.org/rt2/Ticket/Display.html?id=3099

Is this still an issue with 5.6.1 or 5.8.0?

I'm not sure - this was all reported THREE YEARS AGO!

So far as I can recall\, I haven't attempted to rebuild any version of Perl for OS/2 some time. I sort off 'lost interest' in the concept on OS/2\, although I had been responsible for getting one or two things in preldoc fixed by the author.

Guess the reason for the present email is that you want to 'sign-off' on the original bug report. As so much time has passed\, that's fine by me. i can always get back to it again with a newer version. -- Regards\, MIKE FRY

Knavesmire Consultants Ltd.   Tel​: +27 (011) 793 6300   Fax​: +27 (011) 792 8662 Cell​: +27 083 380 3414 email​: mikefry@​iafrica.com

p5pRT commented 19 years ago

From @schwern

Gotten a chance to build 5.8.6 on OS/2 to see how it fairs?

p5pRT commented 19 years ago

@schwern - Status changed from 'open' to 'stalled'

p5pRT commented 12 years ago

From @doy

Unless more information is forthcoming (preferably on 5.16)\, I think this ticket can be closed.

p5pRT commented 12 years ago

The RT System itself - Status changed from 'stalled' to 'open'

p5pRT commented 11 years ago

From @jkeenan

On Sun Jun 24 10​:46​:54 2012\, doy wrote​:

Unless more information is forthcoming (preferably on 5.16)\, I think this ticket can be closed.

There has been no substantive correspondence in this ticket for more than 10 years. I am closing it now.

Thank you very much. Jim Keenan

p5pRT commented 11 years ago

@jkeenan - Status changed from 'open' to 'rejected'