1753946 Members
7931 Online
108811 Solutions
New Discussion юеВ

Perl questions

 
SOLVED
Go to solution
Dsun
Occasional Advisor

Perl questions

Fist time work on a HPUX machine(HPUX B.11.11). The goal is to use apache authhandler. The machine has the Apache(2.0.48)+modperl(1.99) using perl5.8 preinstalled. But the preinstalled Perl seems just has an excutable perl5.6.(doesn't even have basic pakage like strict, lib.pm etc) And the @INC shows paths don't exist. It is a client's machine, so want to clear up some quesitions before I go on.

1. I should reinstall the perl or just install the package when the program needs.
2. If reinstall the perl, should I recompile the Apache after the new perl installed?

Thanks in advance.
10 REPLIES 10
Geoff Wild
Honored Contributor

Re: Perl questions

I would go for the install of perl from HP:

http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=PERL

I don't know if you will have to re-compile Apache or not.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Dsun
Occasional Advisor

Re: Perl questions

Thanks for the advise, Geoff.

Just installed the perl5.8.0. I now need to install DBI and DBD::mysql. Is it a good idea to install perl packages thru CPAN or install manually?
Geoff Wild
Honored Contributor
Solution

Re: Perl questions

Havn't used CPAN with HPUX - so I can't comment - used with Linux though - works fine.

You can try CPAN or just install manually.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Kim_18
Advisor

Re: Perl questions

I would use CSPAN - I have used it with
HP-UX and it works great.
Kim_18
Advisor

Re: Perl questions

Sorry for the typo - CPAN works great on hp-ux
Dsun
Occasional Advisor

Re: Perl questions

Hi folks, thanks for the helps since I never do any kind of job like this before.

The machine I work on is pretty much not well configured. I sucessfully installed the gcc 3.3.3 from Merijn's website, the DBI 1.43 from CPAN. And now I have problem to install DBD::mysql. I downloaded DBD-mysql-2.1028 from CPAN.
At first when I did a "perl Makefile.PL", the program complaint about "mysql_config" not found. But it let me go on then it stopped at "make". I edited the "Makefile.PL" to include the full path of mysql_config to fix the "mysql_config" problem and run again. Now I had "+DD64" not found, and I edit the Makefile.PL to use cflags="-I$pkgincludedir " without +DD64. And the program still stopped at "make":
/tmp/DBD-mysql-2.1028-># make
gcc -c -I/opt/perl/lib/site_perl/5.8.0/PA-RISC1.1-thread-multi/auto/DBI -I/home/mysql/4.0.18/include -D_POSIX_C_SOURCE=199506L -D_REENTRANT -D_HPUX_SOURCE -fPIC -mpa-risc-1-1 -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.1028\" -DXS_VERSION=\"2.1028\" -fPIC "-I/opt/perl/lib/5.8.0/PA-RISC1.1-thread-multi/CORE" dbdimp.c
gcc -c -I/opt/perl/lib/site_perl/5.8.0/PA-RISC1.1-thread-multi/auto/DBI -I/home/mysql/4.0.18/include -D_POSIX_C_SOURCE=199506L -D_REENTRANT -D_HPUX_SOURCE -fPIC -mpa-risc-1-1 -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"2.1028\" -DXS_VERSION=\"2.1028\" -fPIC "-I/opt/perl/lib/5.8.0/PA-RISC1.1-thread-multi/CORE" mysql.c
Running Mkbootstrap for DBD::mysql ()
chmod 644 mysql.bs
rm -f blib/arch/auto/DBD/mysql/mysql.sl
LD_RUN_PATH="/home/mysql/4.0.18/lib:/lib" /opt/perl/bin/perl myld gcc -shared -static-libgcc -fPIC dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.sl -L/home/mysql/4.0.18/lib -lmysqlclient -lnsl -lm
*** Error exit code 1

Stop.

I run a
/home/mysql/4.0.18-># ./bin/mysql --version
./bin/mysql Ver 12.22 Distrib 4.0.18, for hp-hpux11.11 (hppa2.0w)

The "/usr/local/mysql" is a link to "/home/mysql/4.0.18". I didn't install the mysql.

Since it didn't give any error, I can't figure out where is the problem. I am runing out my solutions. Should i just reinstall mysql?


Dawn
Dsun
Occasional Advisor

Re: Perl questions

I downloaded a DBD-mysql-2.9003_1 to load the module again. This time I had a different error:
[...]
LD_RUN_PATH="/usr/local/mysql/lib:/lib" /opt/perl/bin/perl myld gcc -shared -static-libgcc -fPIC dbdimp.o mysql.o -o blib/arch/auto/DBD/mysql/mysql.sl -L/usr/local/mysql/lib -lmysqlclient -lnsl -lm
/usr/ccs/bin/ld: /usr/local/mysql/lib/libmysqlclient.a: Not a valid library (invalid magic
number). Possibly a 64-bit PA archive library (Mismatched ABI).
collect2: ld returned 1 exit status
*** Error exit code 1

Is this telling me the mysql installed was a 64bit version? How do I find out i am using a 11.11 32bits or 64bits?

Thanks.
Dawn
Devesh Pant_1
Esteemed Contributor

Re: Perl questions

I have had similar issues and after struggling, came up with this solution which has been working great so far. I have Perl working fine with DBD and DBI.
Perl must be recompiled with specific flags in order to support DBD and DBI.
a non threaded Perl must be built but linked with ├в lcl and ├в lpthread as if a threaded Perl is to be built. Oracle on HP-UX uses lpthread, therefore everything that dynamically loads Oracle in the HP-UX environment must be built or linked with lpthread.The downloads and information came from these sites:
o http://www.cpan.org/modules/by-authors/Tim_Bunce
o http://www.cpan.org
o http://search.cpan.org
The comprehensive readme file that I found to be excellent was located in:
o http://search.cpan.org/~timb/DBD-Oracle-1.1.5/README.hpux
This file goes through the installation and configuration process of perl in great detail as well as the subsequent steps for the installation of DBI and DBD.

I am attaching a text document that I have used on more than 8 servers successfully now.

thanks
Dsun
Occasional Advisor

Re: Perl questions

Hi guys,
I finally had the DBD::mysql installed. Someone from perl@lists.mysql.com helped me with that.
The problem was caused by the mysql binary from mysql.com, which didn't compile with "-fPIC", but DBD::mysql required that flag to be set. I had to recompiled the mysql client from source, then install DBD::mysql.

Thank you all