Perl/Tk build fails on HP-UX

Perl/Tk build fails on HP-UX

am 27.02.2006 22:58:30 von bjr

I am trying to build Perl/Tk so I can install the tcl-tk perl module
and I am having some difficulty. I see many others have had similar
problems with builds on HP-UX which I am somewhat new to.


OS: HP-UX 11.11
Installed: Perl 5.8.7 compiled with cc
tcltk program
HP's bundled cc compiler (non-ansi)
gcc 3.4.3


I had to add some X11 include files as HP-UX didn't have a full set. I
found the X11R5 files so I used those. After the Perl/Tk make failed I
changed to CC=gcc. This is the line I'm using:

perl Makefile.PL CC=gcc X11=/usr/lib/X11R5
X11INC=/usr/local/X11R5/include X11LIB=/usr/lib/X11R5

With this command (some of) the Makefile looks like this:
AR = ar
CC = gcc
CCCDLFLAGS = +Z
CCDLFLAGS = -Wl,-E -Wl,-B,deferred
DLEXT = sl
DLSRC = dl_hpux.xs
LD = /usr/bin/ld
LDDLFLAGS = -b +vnocompatwarnings -L/usr/local/lib
LDFLAGS = -L/usr/local/lib
LIBC = /lib/libc.sl
LIB_EXT = .a
OBJ_EXT = .o
OSNAME = hpux
OSVERS = 11.00
RANLIB = :
SITELIBEXP = /opt/perl5/lib/site_perl/5.8.7



In the Makefile I've tried changing the CCFLAGS from -Ae to -Aa for
ANSI but didn't work either. I also found a line like this:
cc -E -Aa -D__STDC_EXT__ -c $(PASTHRU_INC) $(INC) \
which I tried changing to gcc still to no avail. I tried putting the
gcc path in my PATH before the cc path still to no avail. The make
continues to fail (I think) because it continues to use HP's bundled cc
(errors are below).

Can anyone please tell me how to get the 'Tk make' to fully use gcc
instead of cc as I think this is the problem ?
Thank you very much for any feedback.
-bjr



cp tkPlatDecls_f.h ../blib/arch/Tk/pTk/tkPlatDecls_f.h
cp tkDecls.t ../blib/arch/Tk/pTk/tkDecls.t
cp tkImgPhoto.m ../blib/arch/Tk/pTk/tkImgPhoto.m
cp tkColor.h ../blib/arch/Tk/pTk/tkColor.h
cp Xlib.t ../blib/arch/Tk/pTk/Xlib.t
cp tkIntPlatDecls.t ../blib/arch/Tk/pTk/tkIntPlatDecls.t
cc -c -I.. -I/usr/local/X11R5/include -I. -Ibitmaps
-I/usr/local/X11R5/include +z -Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 +O2 +Onolimit -DVERSION=\"804.027\"
-DXS_VERSION=\"804.027\" +Z "-I/opt/perl5/lib/5.8.7/PA-RISC2.0/CORE"
ClientWin.c
(Bundled) cc: warning 480: The +z option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -A option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +O2 option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with
the C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Z option is available only with the
C/ANSI C product; ignored.
cc -c -I.. -I/usr/local/X11R5/include -I. -Ibitmaps
-I/usr/local/X11R5/include +z -Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 +O2 +Onolimit -DVERSION=\"804.027\"
-DXS_VERSION=\"804.027\" +Z "-I/opt/perl5/lib/5.8.7/PA-RISC2.0/CORE"
Lang_f.c
(Bundled) cc: warning 480: The +z option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The -A option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +O2 option is available only with the
C/ANSI C product; ignored.
(Bundled) cc: warning 480: The +Onolimit option is available only with
the C/ANSI C

(Bundled) cc: "tcl.h", line 702: error 1000: Unexpected symbol: "*".
(Bundled) cc: "tcl.h", line 702: error 1000: Unexpected symbol: ")".
(Bundled) cc: "tcl.h", line 704: error 1616: Unable to open intrinsic
file "/usr/local/lib/sysintr".
(Bundled) cc: "tcl.h", line 704: error 1000: Unexpected symbol:
"clientData".
(Bundled) cc: "tcl.h", line 704: error 1506: Parameters allowed in
function definition only.
(Bundled) cc: "tcl.h", line 705: error 1000: Unexpected symbol:
"clientData".
(Bundled) cc: "tcl.h", line 705: error 1000: Unexpected symbol:
"Tcl_Obj".
(Bundled) cc: "tcl.h", line 705: warning 5: "const" will become a
keyword.
(Bundled) cc: "tcl.h", line 705: error 1000: Unexpected symbol: "*".
(Bundled) cc: "tcl.h", line 705: error 1705: Function prototypes are an
ANSI feature.
(Bundled) cc: "tcl.h", line 705: error 1573: Type of "interp" is
undefined due to an illegal declaration.
(Bundled) cc: "tcl.h", line 705: error 1573: Type of "const" is
undefined due to an illegal declaration.
(Bundled) cc: "tcl.h", line 707: error 1000: Unexpected symbol: "*".
(Bundled) cc: "tcl.h", line 708: warning 5: "const" will become a
keyword.
(Bundled) cc: "tcl.h", line 707: error 1506: Parameters allowed in
function definition only.
(Bundled) cc: "tcl.h", line 708: error 1000: Unexpected symbol: "char".
(Bundled) cc: error 2017: Cannot recover from earlier errors,
terminating.
*** Error exit code 1

Stop.
*** Error exit code 1

Re: Perl/Tk build fails on HP-UX

am 28.02.2006 19:23:47 von Juha Laiho

"bjr" said:
>I am trying to build Perl/Tk so I can install the tcl-tk perl module
>and I am having some difficulty. I see many others have had similar
>problems with builds on HP-UX which I am somewhat new to.
>
>OS: HP-UX 11.11
>Installed: Perl 5.8.7 compiled with cc
> tcltk program
> HP's bundled cc compiler (non-ansi)
> gcc 3.4.3

I heartily advise to not mix compilers - so, when compiling modules
for Perl, use the same compiler that was used for compiling the base
perl.

>I had to add some X11 include files as HP-UX didn't have a full set. I
>found the X11R5 files so I used those.

Looks like your HP-UX installation didn't include the development
filesets. It's some time since I've worked on HP-UX, so I don't
remember any more whether you can install the header filesets
without installing the compiler -- and the compiler is an extra
cost product.

>(Bundled) cc: warning 480: The +z option is available only with the
>C/ANSI C product; ignored.

These (and the later C syntax errors) arise from the fact that the
HP-UX bundled C compiler is a rather braindead thing. It's only
included as it's needed for recompiling/relinking some small
parts of HP-UX kernel when doing kernel customization. For all
"real" C compiling you'll pretty much need either the HP-UX
payware aCC, or gcc.

If you end up with gcc, you still need the development filesets
(dev. libraries, include files) installed.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)

Re: Perl/Tk build fails on HP-UX

am 28.02.2006 21:59:15 von bjr

Thanks for your reply, Wolf, and you're right - I should stick with the
same compiler for Perl mods. I'm new to this server site but today I
found the server where this Perl was built.

Thanks again!
-bjr