Operating System - HP-UX
1821981 Members
3173 Online
109638 Solutions
New Discussion юеВ

Problem compiling DBD-ODBC for Perl - unresolved symbols found during "make test"

 
Philip Chan_1
Respected Contributor

Problem compiling DBD-ODBC for Perl - unresolved symbols found during "make test"


Hi,

I'm trying to compile DBD-ODBC onto my HP 11i machine. All followings were compiled (make) and tested (make test) successfully,

Perl 5.8.5
DBI-1.45

However, as I work on the last component DBD-ODBC, "make" was successful but it always complaint about un-resolved symbols being referenced by one of the ODBC shared library "libodbc.sl". Can someone please shed me some idea on what libraries are missing from the SHLIB path?

Thanks in advance.

Regards,
Philip

The exact error messages I got are attached below:

PERL_DL_NONLAZY=1 /opt/perl-5.8.5-gcc/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base........./usr/lib/dld.sl: Unresolved symbol: [Vtable]key:__dt__21__versioned_type_infoFv (data) from /opt/odbc32v50/lib/libodbc.sl
/usr/lib/dld.sl: Unresolved symbol: __curStaticObject (data) from /opt/odbc32v50/lib/libodbc.sl
/usr/lib/dld.sl: Unresolved symbol: __shlinit (code) from /opt/odbc32v50/lib/libodbc.sl
/usr/lib/dld.sl: Unresolved symbol: __PureVirtualCalled (code) from /opt/odbc32v50/lib/libodbc.sl
/usr/lib/dld.sl: Unresolved symbol: __nw__FUl (code) from /opt/odbc32v50/lib/libodbc.sl
/usr/lib/dld.sl: Unresolved symbol: __dla__FPv (code) from /opt/odbc32v50/lib/libodbc.sl
/usr/lib/dld.sl: Unresolved symbol: __shlInit (code) from /opt/odbc32v50/lib/libodbc.sl
install_driver(ODBC) failed: Can't load '/sybdump/IP_migration/DBD-ODBC-1.12/blib/arch/auto/DBD/ODBC/ODBC.sl' for module DBD::ODBC: Unresolved external at /opt/perl-5.8.5-gcc/lib/5.8.5/PA-RISC2.0/DynaLoader.pm line 230.
at (eval 1) line 3
Compilation failed in require at (eval 1) line 3.
Perhaps a required shared library or dll isn't installed where expected



4 REPLIES 4
Steve Steel
Honored Contributor

Re: Problem compiling DBD-ODBC for Perl - unresolved symbols found during "make test"

Hi

This is because your libraries were made with 2 different compilers such as ACC and CC

you cannot mix aCC and CC libraries in the same executable

This message type would then appear


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Philip Chan_1
Respected Contributor

Re: Problem compiling DBD-ODBC for Perl - unresolved symbols found during "make test"


So what I've done wrong!!! I thought I were using the same Ansi-C compiler provided by HP all along during the compilation.

The "...gcc" prefix in my output is miss-leading as I were indeed using the Ansi-C compiler by that time.

For compiling Perl, DBI and DBD-ODBC, which of the gcc or the Ansi-C computer by HP is better?
H.Merijn Brand (procura
Honored Contributor

Re: Problem compiling DBD-ODBC for Perl - unresolved symbols found during "make test"

HP C-ANSI-C is *much* better than gcc (on HP PA-RISC that is)

So if all the rest works fine, please stick to that.

aCC is not the same as CC. aCC is the C++ compiler, and CC is HP C-ANSI-C.
Though I never heard about those libraries not able to mix, I might learn new things every day.

I don't have any odbc libs on my HP systems, so I can't check any of your original question, which is why I diidn't answer in the first place.

Please check

# chatr /opt/odbc32v50/lib/libodbc.sl

and see if there are any unresolved references in there, or libs that you do not include in the link statement in your Makefile

Is this /opt/odbc32v50 a free product or did you pay for it. If it is free, which product is it? Is it on the software CD's, or did you get it from the web?

Enjoy, Have FUN! H.Merijn [ who'd like to test this too ]
Enjoy, Have FUN! H.Merijn
Philip Chan_1
Respected Contributor

Re: Problem compiling DBD-ODBC for Perl - unresolved symbols found during "make test"

Thanks for the reply and I'll try out the "chatr" command.

The ODBC driver is actually a 3rd party product made by DataDirect. The version I got is an evaluation copy. My objective is to make connection to a DB2 system hosted on an AS400. I've been trying DB2-Connect from IBM at the same time but that is probably the worst software I worked with for the past few year (sorry to be rude but it really drive me crazy), so if possible I would stick with the DataDirect ODBC driver.