Operating System - HP-UX
1826331 Members
3975 Online
109692 Solutions
New Discussion

compile errors on DBI module

 
SOLVED
Go to solution
Tim Nelson
Honored Contributor

compile errors on DBI module

I see some previous questions about this but need to ask again.

Having issues compiling perl DBI module.
HPUX 11i
Perl5-32 D.5.8.3.B
gcc 3.3.3
binutils 2.15a
DBI-1.50

perl Makefile.PL "cc=/usr/local/bin/gcc" completes without error.

Looks like GCC does not like the OPTIMIZE options.

gcc: +Onolimit: No such file or directory
gcc: +Opromote_indirect_calls: No such file or directory
gcc: +DAportable: No such file or directory
gcc: +DS2.0: No such file or directory
gcc: +Z: No such file or directory
cc1: error: unrecognized option `-fast'
*** Error exit code 1


Any suggestions ?
4 REPLIES 4
H.Merijn Brand (procura
Honored Contributor
Solution

Re: compile errors on DBI module

Your perl is built with HP C-ANSI-C?

DBI tries to use the flags that perl was built with, and they are native C flags, not applicable to gcc

You can try to change the makefile

remove +Onolimit
remove +Opromote_indirect_calls
replace +DAportable with -mpa-risc-1-1
Ahhhrg: +DS2.0 contradicts +DAportable! remove or use -mpa-risc-2-0
replace +Z with -mPIC
remove -fast (which should never have been there, because it is unreliable with perl)

The EASIER solution would be to remove the perl distro as installed with swremove, and install a gcc built version instead. You can find very recent builds on my sit.

My HP ITRC site pages can be found at (please use LA as primary choice):

USA Los Angeles http://mirrors.develooper.com/hpux/
SGP Singapore https://www.beepz.com/personal/merijn/
USA Chicago http://ww.hpux.ws/merijn/
NL Hoofddorp http://www.cmve.net/~merijn/

Enjoy, have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Tim Nelson
Honored Contributor

Re: compile errors on DBI module

Thanks for the tips. I am working on the first suggestion as that seems easier.

Currently working on removing the options.

Ran into a issue with that as PIC was not a valid option.

/usr/bin/perl -p -e "s/~DRIVER~/Perl/g" ./Driver.xst > Perl.xsi
/usr/bin/perl /opt/perl/lib/5.8.3/ExtUtils/xsubpp -typemap /opt/perl/lib/5.8.3/ExtUtils/typemap -typemap typemap Perl.xs > Perl.xsc && mv Perl.xsc Perl.c
/usr/local/bin/gcc -c -D_POSIX_C_SOURCE=199506L -D_REENTRANT -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings -DNO_HASH_SEED -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -mpa-risc-1-1 -DVERSION=\"1.50\" -DXS_VERSION=\"1.50\" -mPIC "-I/opt/perl/lib/5.8.3/PA-RISC1.1-thread-multi/CORE" Perl.c
cc1: error: invalid option `PIC'
*** Error exit code 1
H.Merijn Brand (procura
Honored Contributor

Re: compile errors on DBI module

Sorry, that was a typo, should have been -fPIC (not -mPIC but -fPIC)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Tim Nelson
Honored Contributor

Re: compile errors on DBI module

ran into another issue with
/perl/lib/5.8.3/PA-RISC1.1-thread-multi/CORE" Perl.c
:6:2: missing '(' after predicate
*** Error exit code 1


I am pulling down the gcc compiled version of perl.

I will post the results.

Thanks again!!