DBD-Oracle
view release on metacpan or search on metacpan
lib/DBD/Oracle/Troubleshooting/Hpux.pod view on Meta::CPAN
The standard mantra now works out of the box on HP-UX:
cd DBD-Oracle-1.07 # or more recent version
perl Makefile.PL
make
make test
make install # if all went smoothly
And with DBD-1.14 and later the following can be used:
cd DBD-Oracle-1.14 # or more recent version
perl Makefile.PL -l # uses a simple link to oracle's main library
make
make test
make install # if all went smoothly
If you have trouble, see the L<Trouble Shooting> instructions below, for
hints of what might be wrong... and send me a note, describing your
configuration, and what you did to fix it.
=head1 Trouble Shooting
=head2 "Unresolved symbol"
In general, find the symbols, edit the Makefile, and make test.
You'll have to modify the recipe accordingly, in my case the symbol
"LhtStrCreate" was unresolved. (Authors Note: thanks patch suggestions
by Jay Strauss this situation which occurs with Oracle 8.1.6 should
now be handled in Makefile.PL.)
1) Find the symbols.
a) The following ksh/bash code (courtesy of Roger) will search
from $ORACLE_HOME and below for Symbols in files in lib directories.
Save the following to a file called "findSymbol".
>>>> CUT HERE <<<<<
cd $ORACLE_HOME
echo "\nThis takes a while, grepping a lot of stuff"
echo " ignore the \"no symbols\" warnings\n"
sym=$1; shift;
libs="*.sl"
for lib in $(find . -name $libs -print); do
if nm -p $lib | grep -q $sym; then
echo "found \"$sym\" in $lib"
fi
done
>>>>> CUT HERE <<<<
Note that on Itanium machines (HP-UX 11.23), the shared libraries
have a .so extension instead of the .sl HP-UX uses on PA-RISC.
b) Run it (replace "LhtStrCreate" with your "Unresolved symbol").
For example, at my installation, findSymbols produced the
following output:
# chmod 755 findSymbols
# ./findSymbol LhtStrCreate
found "LhtStrCreate" in ./lib/libagtsh.sl
found "LhtStrCreate" in ./lib/libclntsh.sl
found "LhtStrCreate" in ./lib/libwtc8.sl
2) Edit the Makefile
In the previous step your unresolved symbol was found in one or more
library files. You will need to edit the OTHERLDFLAGS makefile macro,
and add the missing libraries.
When you add those library files to OTHERLDFLAGS you must convert the
name from the actual name to the notation that OTHERLDFLAGS uses.
libclntsh.sl becomes => -lclntsh
libagtsh.sl becomes => -lagtsh
libwtc8.sl becomes => -lwtc8
That is, you replace the "lib" in the name to "-l" and remove the ".sl"
(or the .so).
You can edit the Makefile in 2 ways:
a) Do this:
perl -pi -e's/\b(OTHERLDFLAGS.*$)/$1 -lclntsh/' Makefile
b) Using vi, emacs... edit the file, find OTHERLDFLAGS, and add the
above "-l" entries to the end of the line.
For example the line:
OTHERLDFLAGS = -L/opt/oracle/product/8.1.6/lib/... -lqsmashr
Becomes:
OTHERLDFLAGS = -L/opt/oracle/product/8.1.6/lib/... -lqsmashr -lclntsh
3) make test
Perform a make test, if symbols are still unresolved repeat the editing
of the Makefile and make test again.
=head1 DBD-Oracle-1.06
You are strongly urged to upgrade. However here is what you may need to
know to get it or work, if you insist on using an earlier version.
Check the output that above command produces, to verify that
-Wl,+n
-W1,+s
is b<NOT> present. and that
-lqsmashr
B<is> present.
If the version of Makefile.PL does not include the patch produced at the
time of this document, then the above conditions will likely not be
( run in 1.542 second using v1.01-cache-2.11-cpan-5735350b133 )