Operating System - HP-UX
1751969 Members
5133 Online
108783 Solutions
New Discussion юеВ

gcc64 error when compiling DBI

 
SOLVED
Go to solution
Patrick Ware_1
Super Advisor

gcc64 error when compiling DBI

Hello,

I used the following command to attempt a Bundle::DBI install:

/opt/perl64/bin/perl -MCPAN -e "install Bundle::DBI"

After getting thru the questions, and prompts, the problem starts below:

gcc64 -c -mpa-risc-2-0 -D_HPUX_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/pa20_64/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -O -DVERSION=\"1.46\" -DXS_VERSION=\"1.46\" -fPIC "-I/opt/perl64/lib/5.8.5/PA-RISC2.0-LP64/CORE" -Wall -Wno-comment -DDBI_NO_THREADS Perl.c
sh: gcc64: not found.
*** Error exit code 127

Stop.
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible Running install for module DBI::Shell Running make for T/TL/TLOWERY/DBI-Shell-11.93.tar.gz
Fetching with LWP:

I am running procura's pre-built perl-5.8.5-gcc-3.4.0-11.11-elf64
Do I need a 64-bit version of gcc to make this work, and how do I recover properly from this error. This is my 1st attempt EVER at installing perl modules. Thanks for your help to a new Sys Admin.
14 REPLIES 14
H.Merijn Brand (procura
Honored Contributor

Re: gcc64 error when compiling DBI

Ahhhhhrg. Don't do that. Why should you?!
DBI is already bundled in my perl's

# /opt/perl64/bin -MV=DBI

And for the gcc error, asuming you use my gcc, make sure /usr/local/pa20_64/bin is in your $PATH

# cd /usr/local/pa20_64/bin
# ln -s gcc gcc64

if that link does not exist yet

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor
Solution

Re: gcc64 error when compiling DBI

And for your second question, yes, you need gcc/64 for extending perl with XS modules (modules that use C code and need to be compiled)

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Patrick Ware_1
Super Advisor

Re: gcc64 error when compiling DBI

Thanks! So basically, I should be ready to install the oracle module?
H.Merijn Brand (procura
Honored Contributor

Re: gcc64 error when compiling DBI

Yes

# cd /work
# wget http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBD-Oracle-1.16.tar.gz
# gzip2 -d # cd DBD-Oracle-1.16
# /opt/perl64/bin/perl Makefile.PL
# make
# make test
# make install

And DBD-Oracle-1.16 is also an XS modules, so you need to install gcc/64 first

# cd /tmp
# wget http://mirrors.develooper.com/hpux/gcc-3.4.3-64-11.11-elf64.tbz
# cd /opt
# bzip2 -d # perl -pi -e's,$,:/opt/perl64/bin:/usr/local/pa20_64/bin,' /etc/PATH

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn
Patrick Ware_1
Super Advisor

Re: gcc64 error when compiling DBI

Thanks! The wget http://mirrors.develooper.com/hpux/gcc-3.4.3-64-11.11-elf64.tbz
keeps timing out. Any other options I could try? I just installed wget tonight. I had to install openssl to get wget to work.
Patrick Ware_1
Super Advisor

Re: gcc64 error when compiling DBI

Ok, I thought outside the box and opened a netscape window on my VNC session, and got the file that way.
Patrick Ware_1
Super Advisor

Re: gcc64 error when compiling DBI

Ok, so here's the next problem:
# /opt/perl64/bin/perl Makefile.PL
Using DBI 1.43 (for perl 5.008005 on PA-RISC2.0-LP64) installed in /opt/perl64/lib/site_perl/5.8.5/PA-RISC2.0-LP64/auto/DBI

Configuring DBD::Oracle ...

>>> Remember to actually *READ* the README file!
Especially if you have any problems.

The ORACLE_HOME environment variable must be set.
It must be set to hold the path to an Oracle installation directory
on this machine (or a machine with a compatible architecture).
See the README.clients file for more information.
ABORTED!

I thought I'd put this one out here while I do some research. If I'm lucky, I will beat you with the answer..LOL!!
Patrick Ware_1
Super Advisor

Re: gcc64 error when compiling DBI

Found my answer in the README.hpux file:

It is critical to setup your Oracle environmental variables. Many people
do this incorrectly and spend days trying to get a working version of
DBD-Oracle. Below are examples of a local database and a remote database
(i.e. the database is on a different machine than your Perl/DBI/DBD
installation) environmental variable setup.

Example (local database):

export ORACLE_USERID=
export ORACLE_HOME=
export ORACLE_SID=
export SHLIB_PATH=$ORACLE_HOME/lib #for 32bit HP
export LD_LIBRARY_PATH=$ORACLE_HOME/lib #for 64bit HP (I defined them both)

Example ( if remote database):

export ORACLE_USERID=
export ORACLE_HOME=
export ORACLE_SID=@
export SHLIB_PATH=$ORACLE_HOME/lib #for 32bit HP
export LD_LIBRARY_PATH=$ORACLE_HOME/lib #for 64bit HP (I defined them both)
H.Merijn Brand (procura
Honored Contributor

Re: gcc64 error when compiling DBI

I was on the road, so you did get yourself another hour to solve things and it worked out.

If there are *any* parts in the README's or things you missed, please let me know. I can have them added

Enjoy, Have FUN! H.Merijn
Enjoy, Have FUN! H.Merijn