Operating System - HP-UX
1833875 Members
1906 Online
110063 Solutions
New Discussion

Re: Perl compilation woes!

 
Barry O Flanagan
Respected Contributor

Perl compilation woes!

Hi all,

Having trouble compiling Perl 5.6.1 on 11.11 with gcc 3.0.1 (and DBI, but its the same problem). I keep getting an error in relation to /usr/lib/include/symbol.h as shown below. Anyone got any "pearls" of wisdom?!

Heres the error:
Checking to see on how many bits at a time your select() operates...
In file included from try.c:23:
/usr/include/sys/socket.h:439: parse error before "sendfile"
/usr/include/sys/socket.h:439: parse error before "bsize_t"
/usr/include/sys/socket.h:441: parse error before "sendpath"
/usr/include/sys/socket.h:441: parse error before "bsize_t"
8 REPLIES 8

Re: Perl compilation woes!

Hi!

Does this error prevents you from compiling/linking perl?
Could you attach the complete listing of you compilation?

Andre
Barry O Flanagan
Respected Contributor

Re: Perl compilation woes!

Hi Andre,

This is actually happening at configure time rather than compile time plus I'm getting the same problem when doing the compile for DBI. Any ideas?
harry d brown jr
Honored Contributor

Re: Perl compilation woes!

Why are you compiling perl 5.6.1 for 11i? It comes on the application CD's.


live free or die
harry
Live Free or Die
Barry O Flanagan
Respected Contributor

Re: Perl compilation woes!

Because we are trying to compile DBD-Oracle for PERL.
Any documentation we have come across suggests this is the only way to compile the ORACLE DBD for perl on HP-UX 11.XX

We are also getting the Error when trying to make DBI with no changes in its configuration.

This seems to be a compiler problem although I'm loath to conclude that there is a problem with the socket.h header file. This does not seem logical!

We have tried both gcc 3.0, 3.01 and the bundled non-ANSI compliant CC compilers and all produce the same error.

Regards,

Barry

Re: Perl compilation woes!

Hi, sometime ago I had to do the attach instruction procedure for Perl+DBI+DBD Oracle.

Hope it helps.

Andre

Barry O Flanagan
Respected Contributor

Re: Perl compilation woes!

Hi Andre,

That is pretty much out software setup but we are getting a parse error in socket.h

We have tried both GCC and the HP Ansi C compiler.

We get the following output when trying to do a make on DBI after a successful perl Makefile.PL


gcc -c -D_POSIX_C_SOURCE=199506L -D_HPUX_SOURCE -L/lib/pa1.1 -DUINT32_MAX_BROKEN -mpa-risc-1-1 -fPIC -fno-strict-aliasing -I/usr/lo
cal/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"1.20\" -DXS_VERSION=\"1.20\" -fPIC -I/opt/perl/lib/5.6.1/PA-
RISC1.1-thread-multi/CORE -Wall -Wno-comment Perl.c

the Error produced is:

In file included from /opt/perl/lib/5.6.1/PA-RISC1.1-thread-multi/CORE/perl.h:713,
from DBIXS.h:19,
from Perl.xs:1:
/usr/include/sys/socket.h:439: parse error before "sendfile"
/usr/include/sys/socket.h:439: parse error before "bsize_t"
/usr/include/sys/socket.h:441: parse error before "sendpath"
/usr/include/sys/socket.h:441: parse error before "bsize_t"
/usr/include/sys/socket.h:456: parse error before "__sendfile64"
/usr/include/sys/socket.h:456: parse error before "bsize_t"
/usr/include/sys/socket.h:457: parse error before "__sendpath64"
/usr/include/sys/socket.h:457: parse error before "bsize_t"
/usr/include/sys/socket.h:459: parse error before "sendfile"
/usr/include/sys/socket.h: In function `sendfile':
/usr/include/sys/socket.h:459: parse error before "bsize_t"
/usr/include/sys/socket.h: At top level:
/usr/include/sys/socket.h:460: parse error before "sendpath"
/usr/include/sys/socket.h: In function `sendpath':
/usr/include/sys/socket.h:460: parse error before "bsize_t"
make: *** [Perl.o] Error 1

At this stage, we have tried several versions of GCC and the HP Ansi C Compiler.

When building Perl itself, we encounter similar parse errors in other standard C header files such as time.h

The following is a sample from trying to build Perl after a successful Configure:


# pwd
/tmp/Compilers/perl-5.6.1
# make
`sh cflags libperl.a miniperlmain.o` miniperlmain.c
CCCMD = /opt/gcc/bin/gcc -DPERL_CORE -c -fpic -O
In file included from perl.h:713,
from miniperlmain.c:12:
/usr/include/sys/socket.h:439: parse error before "sendfile"
/usr/include/sys/socket.h:439: parse error before "bsize_t"
/usr/include/sys/socket.h:441: parse error before "sendpath"
/usr/include/sys/socket.h:441: parse error before "bsize_t"
make: *** [miniperlmain.o] Error 1

Regards,
Barry

Re: Perl compilation woes!

Do you have the lastest libc and libc header patches?
Barry O Flanagan
Respected Contributor

Re: Perl compilation woes!

Hi Andre,

We finally got it sorted by installing the HP Ansi C Compiler. Everything compiled relatively smoothly after that.

Thanks again for all the help, much appreciated.

Regards,

Barry