Operating System - HP-UX
1833163 Members
3685 Online
110051 Solutions
New Discussion

DBD Revisited...yet again

 
SOLVED
Go to solution
Ray Groff
Occasional Advisor

DBD Revisited...yet again

Hi All

HP-UX 11i
I'm trying to build DBD - any version would be fine at this point! My latest attempt is using gcc (the one built for 11i), and a PERL 5.8 I downloaded from a site mentioned here, that has DBI 1.3 prebuilt. I'm attaching the output of my adventure in the hope that someone will be able to help. I've tried just about everything suggested in these forums - built my own Perl, using both gcc and HP Ansi C, and of all the errors I've seen, this "libcl" error has shown up 2 or 3 times. So, if I can fix this, maybe I'll get somewhere.
Thanks,
Rick
16 REPLIES 16
H.Merijn Brand (procura
Honored Contributor

Re: DBD Revisited...yet again

Show me the output of 'perl -V'

In the libs, there should be cl and pthread, and they should be in front
Enjoy, Have FUN! H.Merijn
H.Merijn Brand (procura
Honored Contributor

Re: DBD Revisited...yet again

Show me the output of 'perl -V'

In the libs, there should be cl and pthread, and they should be in front

The README.hpux from 5.8.0 and later is quite detailed in directions
Enjoy, Have FUN! H.Merijn
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

OK - here's the latest. I'm using the HP compiler, and I've built Perl 5.8 with lcl and lpthread, and still get the same error.
FYI - I'm using DBI-1.30

Attached is the output of
perl -V

TIA
Rick
H.Merijn Brand (procura
Honored Contributor

Re: DBD Revisited...yet again

HP C-ANSI-C is fine, but why do you build a threaded perl? This is like asking for trouble.

If you've got no stunning reason to build a threaded perl, please don't

DBI-1.30 is fine
DBD-Oracle-1.09 is rather old, and will probably not work fine with 5.8.0. If you can, please use 1.12. That's tested and works fine with 5.8.0/32
Enjoy, Have FUN! H.Merijn
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

Okeydoke. I've built a non-threaded Perl (but included the cl and pthread libs) and gone to DBD-Oracle-1.12 - different errors, but still no go. I've attached a file which contains:
1) Output of perl -v
2) Output of perl Makefile.PL
3) Output of make

At least now I'm not getting any lib errors - they seem to be some kind of incompatibility issue.

I appreciate your looking at this for me - I've not much experience in this realm as you might have guessed :)

Thanks,
Rick
MANOJ SRIVASTAVA
Honored Contributor

Re: DBD Revisited...yet again

You need to set

$ORACLE_HOME
$ORACLE_SID

atleast the intial errors it coughs are those


Manoj Srivastava
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

Thanks Manoj, but that really didn't do anything for me. You really had my hopes up that it would be just that simple! :(

Rick
H.Merijn Brand (procura
Honored Contributor
Solution

Re: DBD Revisited...yet again

Don't forget to asign points (0 will do, but *do* asign points)

cc -c -I/u02/oracle/fints1ora/8.0.6/rdbms/demo -I/u02/oracle/fints1ora/8.0.6/rdbms/public -I/u02/oracle/fints1ora/8.0.6/plsql/public -I/u02/oracle/fints1ora/8.0.6/network/public -I/u02/oracle/fints1ora/8.0.6/rdbms/demo -I/u02/oracle/fints1ora/8.0.6/rdbms/demo -I/opt/perl5/lib/site_perl/5.8.0/PA-RISC2.0/auto/DBI +z -D_LARGEFILE_SOURCE -Ae -DVERSION=\"1.12\" -DXS_VERSION=\"1.12\" +Z "-I/opt/perl5/lib/5.8.0/PA-RISC2.0/CORE" oci8.c
cc: "oci8.c", line 100: error 1588: "OCI_HTYPE_SUBSCRIPTION" undefined.
cc: "oci8.c", line 100: error 1569: Case label expressions must be integral constants.
cc: "oci8.c", line 109: error 1588: "OCI_DTYPE_LOCATOR" undefined.
cc: "oci8.c", line 109: error 1569: Case label expressions must be integral constants.
cc: "oci8.c", line 135: warning 604: Pointers are not assignment-compatible.
cc: "oci8.c", line 135: warning 563: Argument #1 is not the correct type.

The truckload of warnings can be ignored. They are most likely due to the new perlio layer in 5.8.0 that is not yet completely supported in 1.12, but will be in the next release.

The errors here are fatal, and should be solved to continue.

Checking where these are defined in 8.1.7.4 ...

.../v8174/rdbms/demo/oci.h has
#define OCI_HTYPE_SUBSCRIPTION 13
#define OCI_DTYPE_LOCATOR 61

So either add these to oci.h or remove these two lines from oci8.c

HTH (and remember the points, we need to know which answers helped, so we can adjust the user docs and README's: I'm responsible for perl's HP-UX related doc's and I know the author of DBI and DBD-Oracle, and we both like to improve the overall usage)


Enjoy, Have FUN! H.Merijn
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

OK I added those lines to oci.h and we're getting further. Now I get:

"Invalid loader fixup in text space needed in output file for symbol $00000005C in input file /usr/lib/libcl.a(ftnerr.0). Make sure it was compiled with +z/+Z"

That's what I was getting while trying the older version of DBD.
I've seen references to that before, so I'm gonna search again. But, if you have the answer, I'll be watching....

TIA Again
Rick
H.Merijn Brand (procura
Honored Contributor

Re: DBD Revisited...yet again

Why the .... does it use libcl.a, and not libcl.sl?

l1:/usr/lib 103 # ll libcl*
1866 lrwxr-xr-x 1 root sys 9 Nov 18 1999 libcl.0 -> ./libcl.1
1867 -r-xr-xr-x 1 bin bin 1388160 Jun 22 2001 libcl.1
7104 -r-xr-xr-x 1 bin bin 1253376 Jun 12 2001 libcl.2
4476 -r--r--r-- 1 bin bin 1463012 Jun 12 2001 libcl.a
1869 lrwxr-xr-x 1 root sys 9 Nov 18 1999 libcl.sl -> ./libcl.2
l1:/usr/lib 104 #

Attempt 1 can be to edit Makefile and check if libcl.a is stated literally (as full path) or (as it should) as -lcl. Change all occurances of the first to the second.
Enjoy, Have FUN! H.Merijn
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

Funny thing - libcl.a is mentioned in Makefile.PL but not in Makefile. Nor, for that matter, is -lcl in the list of EXTRALIBS in Makefile. I've attached copies of both for your enjoyment.
I tried adding -lcl -lpthread to the EXTRALIBS with the same results as last time.
I changed libcl.a to libcl.sl in Makefile.PL and got same results as last time.
I've installed a couple of linker patches (PHSS_27470 and PHSS_26560), no change.

It's also weird that although I compiled PERL with -lcl -lpthread I still get the warining that I may have to recompile PERL with those options.
H.Merijn Brand (procura
Honored Contributor

Re: DBD Revisited...yet again

There's some remarkable changes between our generated Makefiles. I've changed your makefile to reflect my locations, and then diff'd the two. stripped diff attached. Please see if it also affects your perl build. (I will leave soon now, and I will not be around tomorrow)
Enjoy, Have FUN! H.Merijn
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

WOW - what a difference in the Makefiles. What the heck is going on? I tried changing my Makefile to closer reflect yours, same results.
Unfortunately, I've reached the end of my rope. I've spent the better part of 4 days on this problem and have made no progress. CC vs.GCC and Perl5.6 vs. Perl 5.8 etc etc etc. There seems to be a different solution for each HP machine, same OS/Perl/CC or whatever - always a different solution. So, thanks for all your help, but I'm afraid I'm goint to have to pack it in.
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

WOW - what a difference in the Makefiles. What the heck is going on? I tried changing my Makefile to closer reflect yours, same results.
Unfortunately, I've reached the end of my rope. I've spent the better part of 4 days on this problem and have made virtually no progress. CC vs.GCC and Perl5.6 vs. Perl 5.8 etc etc etc. There seems to be a different solution for each HP machine, same OS/Perl/CC or whatever - always a different solution. So, thanks for all your help, but I'm afraid I'm goint to have to pack it in.
H.Merijn Brand (procura
Honored Contributor

Re: DBD Revisited...yet again

Now you see the reason(s) why I don't ship DBD-Oracle in my perl ports on https://www.beepz.com/personal/merijn

If you find time to pick up the peices again, I'd be glad to answer all the questions I know the answers to (there are many questions I do /not/ know the answers to, nor do I want to know. I *hate* Oracle)
Enjoy, Have FUN! H.Merijn
Ray Groff
Occasional Advisor

Re: DBD Revisited...yet again

OK - the word came down to get this working....or else :-)
So, tried picking up where I left off, and found an interesting solution that actually worked - someone else out there was having much the same trouble as me.
In the "oci8.c" file (part of the DBD distribution), there are a couple of definitions:

OCI_HTYPE_SUBSCRIPTION
OCI_DTYPE_LOCATOR

The solution for this other person was to remove these definitions from the file, and try again. So I did, and presto! everything made properly. No errors, just the boatload of warnings. In my "make test" there were a couple of little things, mostly to do with "longs". They may come back to bite me sometime in the future, but I'll cross that bridge when I come to it, if I ever do. The "make test" came out at 99% passed, which is good enough for the girls I go out with.

So, in summary, I have:
perl 5.8 built with lcl and lpthread
HP Ansi/C
DBI-1.30
DBD-1.12

I wrote a little test script, and it connects to the DB fine, and retrieves what I want it to. More testing needed, but for now, I'm going to claim success.

Thanks to everyone for all the help....
Rick