Operating System - HP-UX
1755035 Members
3075 Online
108828 Solutions
New Discussion юеВ

Compile perl 5.6.1 on hpux 11.0 - make test fails

 
SOLVED
Go to solution
Raymond Cordoni
Occasional Advisor

Compile perl 5.6.1 on hpux 11.0 - make test fails

I am compiling perl 5.6.1 on hpux 11.0 using the HP ANSI C compiler and PA-RISC2.0 architecture and my make test fails in two places - op/grent and op/pwent. These tests generate a core dump on my system. A forum search comes up with a couple of people having the same problem - but no solution. Perl 5.6.0 did not have this problem. Does anybody know of a solution?

I also did a google group seach and found more information about this problem, but again no solution. Thanks to Jim Garner for the following:

If you succeed in compiling on HP-UX 11.0, let me know your experience with the
following: I've had a problem with the perl-5.6.1 getpwent() function when
compiled under HP-UX 11.0 -- it dumps core if I call it at eof. The pwent()
test that comes with perl calls the function a fixed number of times (25), so
if your /etc/passwd is 25 or more entries, the test appears to pass. I can
write a C program to call getpwent() past eof and it returns properly, so the
problem is not with the HP library call. I'd like confirmation of this problem
before reporting it as a bug.
10 REPLIES 10
harry d brown jr
Honored Contributor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails


Have you tried to load a precompiled version? Try this:

http://hpux.connect.org.uk/hppd/hpux/Languages/perl-5.6.1/

Live Free or Die
Raymond Cordoni
Occasional Advisor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

I am not able to use the binary distribution for perl because it does not work with the DBD-Oracle module. In order to install DBD-Oracle, you have to compile perl with additional linker flags -lpthread -lcl.
Mike Hassell
Respected Contributor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

Ray,

You might try using 'gcc' to compile perl 5.6.1 on your 11.0 machine. I've had success in compiling perl from the source using gcc instead of the default HP C compiler. You can find a binary distribution here:

http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-2.95.3/

Be sure to download binutils as well and have both of these in your PATH when compiling perl 5.6.1. Hope that helps.

- Mike
The network is the computer, yeah I stole it from Sun, so what?
harry d brown jr
Honored Contributor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

I believe that you will also need the gmake utility from GNU also.
Live Free or Die
David Lieberman_1
Frequent Advisor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

Mike,

the default C compiler is only for the kernel. It shouldn't be used for programming (or building anything).

I've used gcc and gmake with 5.6.0 it works fine.

I have an Admin here who built 5.6.0 on 11.0 with HP C/ANSIC. He had to tweak something in the ./Configure script to make it work. I'm sure that 5.6.1 isn't much different from that perspective. I'll ask him in the morning (9am PST). Email me if I haven't posted anything shortly thereafter.

David Lieberman
david.lieberman@i21.com
David Lieberman_1
Frequent Advisor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

Mike,

I meant to say that if HP C/ANSIC isn't available, something else like gcc must be used since the default compiler is for the kernel.

After reading my earlier response, it kinda came out pretty sukky. Sorry 'bout that.

David Lieberman
Raymond Cordoni
Occasional Advisor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

Thanks for all the input. I have the HP Ansi C compiler so I don't need gcc and I am not trying to use the braindead kernel compiler. I suspect that there is a bug in the pwent() and grent() routines in perl 5.6.1 that wasn't there in 5.6.0. I don't really need (as of this writing) either of these routines - I just wanted a clean "make test". I have since installed all the perl modules I use and done some basic testing and all looks OK.
Steven Schladale
Occasional Advisor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

You may be able to get around this by having the libraries (-lpthread -lcl) first and then the default libraries. This works on our N class running HP-UX 11.00. You can set the order of the libraries when running the configure program. When asked for libraries use -lpthread -lcl $*. This solution is bothersome since the order of the libraries should not make any difference. Possibly a word boundary problem.
Steve
Raymond Cordoni
Occasional Advisor

Re: Compile perl 5.6.1 on hpux 11.0 - make test fails

I did try -lpthread -lcl at the beginning and it made no difference. Interestingly enough, putting it in reverse order "-lcl -lpthread" makes the DBD-Oracle install fail - so order is important!