Operating System - HP-UX
1752413 Members
5786 Online
108788 Solutions
New Discussion юеВ

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

 
SOLVED
Go to solution
Lars Holowko_2
Occasional Contributor

Any success compiling perl >= 5.8.1 on hp-ux 11.23?

I tried to compile perl 5.8.1 and 5.8.2 on hp-ux 11.23 with gcc 3.3.1/2.

rm -f config.sh Policy.sh
sh Configure -de -O \
-Dcc=gcc \
-Duselargefiles \
-Dprefix='/opt/mfgperl' \
-Dstartperl='#!/opt/mfgperl/bin/perl' \
-Dperlpath='/opt/mfgperl/bin/perl' \
-Doptimize='-O3' \
-Dloclibpth="/opt/mfgdep/lib/hpux32 /usr/lib/hpux32" \
-Dlocincpth="/opt/mfgdep/include " \
-Dinstallusrbinperl='n' \
-Duseithreads='y' \
-Dusethreads \
-Duseperlio='y' \
-Duseshrplib='y' \
-A prepend:libswanted='cl pthread ' | tee ../mfgperl.configure

which reults in:

[...]
cp op.c opmini.c
`sh cflags "optimize='-O3'" opmini.o` -fPIC -DPERL_EXTERNAL_GLOB opmini.c
CCCMD = gcc -DPERL_CORE -c -D_POSIX_C_SOURCE=199506L -D_REENTRANT -D_HPUX_SOURCE -fno-strict-aliasing -I/opt/mfgd
ep/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O3 -Wall
rm -f opmini.c
LD_LIBRARY_PATH=/usr/local/src/perl-5.8.2 gcc -L/opt/mfgdep/lib/hpux32 -L/usr/lib/hpux32 -o miniperl \
miniperlmain.o opmini.o -L /usr/local/src/perl-5.8.2 -Wl,+s -Wl,+b/opt/mfgperl/lib/5.8.2/IA64.ARCHREV_0-thread-multi/COR
E -lperl -lcl -lpthread -lnsl -lnm -ldl -ldld -lm -lsec -lc
LD_LIBRARY_PATH=/usr/local/src/perl-5.8.2 ./miniperl -w -Ilib -MExporter -e '' || gmake minitest
/bin/sh: 13992 Memory fault(coredump)
gmake[1]: Entering directory `/usr/local/src/perl-5.8.2'
cp ext/re/re.pm ext/re/re.tmp && sh mv-if-diff ext/re/re.tmp lib/re.pm
gmake[2]: Entering directory `/usr/local/src/perl-5.8.2'
LD_LIBRARY_PATH=/usr/local/src/perl-5.8.2 ./miniperl -Ilib configpm configpm.tmp
/bin/sh: 14003 Memory fault(coredump)
gmake[2]: *** [lib/Config.pm] Error 139
gmake[2]: Leaving directory `/usr/local/src/perl-5.8.2'
gmake[1]: [minitest] Error 2 (ignored)

Lowering the optimization level does not have any effect.

Compilation with HP's ansic works. Gcc successfully compiles perl 5.8.0 as well. Did anyone have more success with newer versions?


Kind regards,

Lars
7 REPLIES 7
H.Merijn Brand (procura
Honored Contributor

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

1. useperlio, and uselargefiles are default, so you don't have to pass those
2. do you *need* a threaded build? If not, please could you test without it?

Enjoy, have FUN! H.Merijn [ who does not have access to itanium ]
Enjoy, Have FUN! H.Merijn
Vinnie Lima
Advisor

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

Lars,

Would you mind sharing your compilation options used for successfully building perl 5.8.0?

Thanks,
Vinnie Lima
vlima@csc.com
Lars Holowko_2
Occasional Contributor

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

Hi Vinnie,

actually I used the same options for perl 5.8.0. But I think I used the source depot from the hp-ux PD porting center. Maybe they have made relevant changes to the original distribution.

Neither did I try the original source distribution from CPAN nor did I give the resulting perl thorough testing. I was just amased that it was compiled successfully.

Hope this helps anyway.

About H.Merijn's suggestion:

Omitting the -Duseithreads='y' \
-Dusethreads \
flags does not change anything. Any more ideas?
H.Merijn Brand (procura
Honored Contributor
Solution

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

HTH, Got this back from the perl community.
Until I get access to 11.2x (and time to work with it) it's just a workaround, but it does not please me

> Someone is trying to build perl-5.8.2 on HP-UX 11.23 (itanium) and is
> facing problems. I don't have access to Itanium architecture machines
>
> http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=248415
>

[snip]

> E -lperl -lcl -lpthread -lnsl -lnm -ldl -ldld -lm -lsec -lc
> LD_LIBRARY_PATH=/usr/local/src/perl-5.8.2 ./miniperl -w -Ilib -MExporter
> -e '' || gmake minitest
> /bin/sh: 13992 Memory fault(coredump)
>
> Lowering the optimization level does not have any effect.

FWIW, I've been able to successfully compile perl-5.8.2 on HP-UX 11.22
using gcc-3.2. I ran into the same symptom as above, and found that
disabling gcc's optimization entirely, via -Doptimize=-O0 (or -Uoptimize),
got rid of the coredumps.

Hope this helps,
TJ

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Mehdi_1
Regular Advisor

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

Hi Lars

I strongly suggest you to download the source code from Porting Center, and check to see what changes has been made. I wrote a configure file. use that configure to compile your version. I compiled version 5.8.1 and 5.8.2 just before I leave Porting Center. The both version compiled OK on 11.22 and 11.23 platforms. I didn't have time to build the depot file.

Let me know if you need more help.

Mehdi
Lars Holowko_2
Occasional Contributor

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

Hi Mehdi,

I am a little bit confused. I could not find a source package on the Porting Center for perl 5.8.x (x > 0). So did you mean to incorporate the changes you have made to perl 5.8.0 to the 5.8.2 sources from CPAN? I looked at the files for which there exists a .cln version but I did not find anything relevant to my memory fault problem. So maybe I need more guidance from you (do you have a 11.23 perl 5.8.2 diffs file left?)

For something a little bit different:

Do you have an idea how I create a perl that does not depend on a libgcc.sl/so? It seems that the additional libraries like libz and libpng seem to depend on libgcc. How do I compile these that they do not contain any unresolved symbols?

Thanks so far,

Lars
Mehdi_1
Regular Advisor

Re: Any success compiling perl >= 5.8.1 on hp-ux 11.23?

Hi Lars

I am sorry, But I 've deleted all before I leave Porting Center!! (Stupid things to do ).

First: Why do you want threaded perl??
Second : Why you set the optimisation to -O3?

HP linker (ld) is sometimes plays funny when the source code compiled with gcc and optimised.

Yes: I ment check the "*.cln" files and see what changes has been made. Also the way that you have passed some options to "Configure" file I passed some options too. I did that through a file that I created myself ( and I called it configure).

Check The "configure" file to see what option I 've passed, Even you can just copy that file in to your 5.8.2 tree and run that to create "Makefile". I didn't have any problem to compile 5.8.1 and 5.8.2 on 11.22 and 11.23.

The only problem that I came across was when I tried to add some more modules to standard perl source code.

To have a perl free from "libgcc.so/sl" . depends on how you have built your gcc. If your gcc compiler have been linked to libgcc.so/sl, all the other program compiled with that gcc will depend on "libgcc.so/sl". For this reason, when I build gcc, I always disable the shared library. and link it with static library instead.


Please let me know, if you need anymore help.

Thanks

Mehdi