General
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem compiling Perl 5.10 on 11.31

SOLVED
Go to solution
Kleener
Advisor

Problem compiling Perl 5.10 on 11.31

Hey,

Having a problem when attempting to compile Perl 5.10.0 on an Itanium 11.31 system. Run the sh Configure -de which completes and then when I run a make I get the following error

# make
`sh cflags "optimize='-g -O'" miniperlmain.o` miniperlmain.c
CCCMD = gcc -DPERL_CORE -c -D_HPUX_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -Wall
sh: gcc: not found.
*** Error exit code 127

Stop.


It is using gcc 4.2.3

If anyone has any ideas it would be much appreciated.

Thanks

Brian
5 REPLIES
Kleener
Advisor

Re: Problem compiling Perl 5.10 on 11.31

Apologies - Just started make to get the error without updating the PATH

The actual error I am seeing is

# make
`sh cflags "optimize='-g -O'" miniperlmain.o` miniperlmain.c
CCCMD = gcc -DPERL_CORE -c -D_HPUX_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -Wall
In file included from /usr/include/sys/stat.h:36,
from perl.h:1137,
from miniperlmain.c:36:
/usr/include/sys/_stat_body.h:63: error: expected specifier-qualifier-list before 'blksize_t'
*** Error exit code 1

Stop.


Sorry about that - Thanks
Dennis Handly
Acclaimed Contributor
Solution

Re: Problem compiling Perl 5.10 on 11.31

My 4.2.1 also fails the same way because /usr/local/lib/gcc/ia64-hp-hpux11.23/4.2.1/include/sys/types.h doesn't include blksize_t.

You may have to do mkheaders as mentioned by Steve in:
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1156581
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=886041
Kleener
Advisor

Re: Problem compiling Perl 5.10 on 11.31

dennis - Spot on -Thanks for that...Had a closer look at the gcc and it was for version 11.23. Have uninstalled the gcc and reinstalled the correct version which is getting me well past that error.

Latest make error is
In file included from HiRes.xs:749:
const-c.inc: In function 'constant_14':
const-c.inc:102: error: 'CLOCK_REALTIME' undeclared (first use in this function)
const-c.inc:102: error: (Each undeclared identifier is reported only once
const-c.inc:102: error: for each function it appears in.)
HiRes.c: In function 'XS_Time__HiRes_clock_gettime':
HiRes.c:1518: error: 'CLOCK_REALTIME' undeclared (first use in this function)
HiRes.c: In function 'XS_Time__HiRes_clock_getres':
HiRes.c:1595: error: 'CLOCK_REALTIME' undeclared (first use in this function)
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.


Thought I saw a post on this a while ago so will have a sniff around. If you know the problem then feel free to enlighten me and thanks again for your posts.

Brian
Kleener
Advisor

Re: Problem compiling Perl 5.10 on 11.31

Found this

http://forums12.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1222337007504+28353475&threadId=1218126

Mentions commenting out the following three lines from the file

perl-5.10.0/ext/Time/HiRes/HiRes.xs (line 74)

/* HP-UX has CLOCK_XXX values but as enums, not as defines.
* The only way to detect these would be to test compile for each. */
# ifdef __hpux
# define CLOCK_REALTIME CLOCK_REALTIME
# define CLOCK_VIRTUAL CLOCK_VIRTUAL
# define CLOCK_PROFILE CLOCK_PROFILE
# endif /* # ifdef __hpux */


Will give that a whirl - The other suggestion was an updated version of this file but the link doesn't seem to work
Kleener
Advisor

Re: Problem compiling Perl 5.10 on 11.31

Am closing off this thread as the above seemed to work fine for me