Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Hello, I'm at my wits' end trying to install DBD::ODBC on Solaris 10 on a local PERL5LIB. Everything's 32-bit:
$ export | mygrep -e MM -e PERL declare -x PERL5LIB="/export/home/filtro/perl5/lib/perl5:/export/home/ +filtro/perl5/lib/perl5/sun4-solaris-64int" declare -x PERL_MM_OPT="INSTALL_BASE=~/perl5" $ uname -srpm SunOS 5.10 sun4u sparc $ file $(which perl) perl5/lib/perl5/sun4-solaris-64int/auto/DBI/DBI. +so unixODBC/lib/*.so /bin/perl: ELF 32-bit MSB executable SPARC Version 1, dynamically + linked, stripped perl5/lib/perl5/sun4-solaris-64int/auto/DBI/DBI.so: ELF 32-bit MSB + dynamic lib SPARC Version 1, dynamically linked, not stripped unixODBC/lib/libodbc.so: ELF 32-bit MSB dynamic lib SPARC Versi +on 1, dynamically linked, not stripped unixODBC/lib/libodbccr.so: ELF 32-bit MSB dynamic lib SPARC Versi +on 1, dynamically linked, not stripped unixODBC/lib/libodbcinst.so: ELF 32-bit MSB dynamic lib SPARC Versi +on 1, dynamically linked, not stripped
In my latest desperate attempt, I've set LD_LIBRARY_PATH to specify paths for ODBC.so and DBI.so. It builds OK, apparently:
$ LD_LIBRARY_PATH=/export/home/filtro/unixODBC/lib:/export/home/filtro +/perl5/lib/perl5/sun4-solaris-64int/auto/DBI:$LD_LIBRARY_PATH ODBCHOM +E=~/unixODBC /usr/perl5/bin/perlgcc -MCPAN -e shell Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.9800) Enter 'h' for help. cpan[1]> clean DBD::ODBC Reading '/export/home/filtro/.cpan/Metadata' Database was generated on Wed, 10 Apr 2013 21:17:02 GMT Running clean for module 'DBD::ODBC' Running make clean Distribution seems to have never been unzipped/untarred, nothing done cpan[2]> make DBD::ODBC Running make for module 'DBD::ODBC' Running make for M/MJ/MJEVANS/DBD-ODBC-1.43.tar.gz CPAN: checksum security checks disabled because Digest::SHA not inst +alled. Please consider installing the Digest::SHA module. Scanning cache /export/home/filtro/.cpan/build for sizes ...................................................................... +......DONE CPAN.pm: Building M/MJ/MJEVANS/DBD-ODBC-1.43.tar.gz ********** Remember to actually *READ* the README file! And re-read it if you have any problems. ********** OSNAME: solaris LANG: ODBCHOME: /export/home/filtro/unixODBC LD_LIBRARY_PATH: /export/home/filtro/unixODBC/lib:/export/home/filtro/ +perl5/lib/perl5/sun4-solaris-64int/auto/DBI:/etc/emc/rsa/cst/lib DBROOT: WINDIR: II_SYSTEM: Perl: 5.008004 ExtUtils::MakeMaker: 6.64 Command line options: u! = undef w! = undef e! = undef g! = 0 x! = undef o=s = Looking for odbc_config in : /export/home/filtro/unixODBC Looking for odbc_config at /export/home/filtro/unixODBC/bin/odbc_confi +g Found odbc_config (via /export/home/filtro/unixODBC/bin/odbc_config) + version 2.3.0 odbc_config reports --prefix=/export/home/filtro/unixODBC odbc_config reports --include-prefix=/export/home/filtro/unixODBC/in +clude odbc_config reports --lib-prefix=/export/home/filtro/unixODBC/lib ODBC INC dir set to /export/home/filtro/unixODBC/include via odbc_co +nfig ODBC LIB dir set to /export/home/filtro/unixODBC/lib via odbc_config Using ODBCHOME /export/home/filtro/unixODBC This looks like a unixodbc type of driver manager. Looking for odbcinst Found odbcinst in /export/home/filtro/unixODBC/bin odbcinst -j reports: unixODBC 2.3.0 DRIVERS............: /export/home/filtro/unixODBC/etc/odbcinst.ini SYSTEM DATA SOURCES: /export/home/filtro/unixODBC/etc/odbc.ini FILE DATA SOURCES..: /export/home/filtro/unixODBC/etc/ODBCDataSources USER DATA SOURCES..: /export/home/filtro/.odbc.ini SQLULEN Size.......: 4 SQLLEN Size........: 4 SQLSETPOSIROW Size.: 2 Please note these files as they are where you define your ODBC drivers + and data sources. Looking for odbc_config to get cflags Adding odbc_config --cflags "-DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_T +YPES_H -DHAVE_LONG_LONG -DSIZEOF_LONG_INT=4 -I/export/home/filtro/uni +xODBC/include " to CC line Checking if your kit is complete... Looks good Multiple copies of Driver.xst found in: /export/home/filtro/perl5/lib/ +perl5/sun4-solaris-64int/auto/DBI/ /usr/perl5/vendor_perl/5.8.4/sun4- +solaris-64int/auto/DBI/ at Makefile.PL line 152 Using DBI 1.625 (for perl 5.008004 on sun4-solaris-64int) installed in + /export/home/filtro/perl5/lib/perl5/sun4-solaris-64int/auto/DBI/ Have /usr/perl5/5.8.4/lib/Sun/Solaris/PerlGcc Want /usr/perl5/5.8.4/lib/sun4-solaris-64int Your perl and your Config.pm seem to have different ideas about the architecture they are running on. Perl thinks: [PerlGcc] Config says: [sun4-solaris-64int] This may or may not cause problems. Please check your installation of +perl if you have problems building this extension. Multiple copies of Driver.xst found in: /export/home/filtro/perl5/lib/ +perl5/sun4-solaris-64int/auto/DBI/ /usr/perl5/vendor_perl/5.8.4/sun4- +solaris-64int/auto/DBI/ at Makefile.PL line 1135 Using DBI 1.625 (for perl 5.008004 on sun4-solaris-64int) installed in + /export/home/filtro/perl5/lib/perl5/sun4-solaris-64int/auto/DBI/ Writing Makefile for DBD::ODBC Writing MYMETA.yml and MYMETA.json Warning: not all required environment variables are set. Warning: Will not be able to run tests as you have not defined all of DBI_DSN, DBI_USER and DBI_PASS environment variables. cp TO_DO blib/lib/DBD/ODBC/TO_DO.pm cp FAQ blib/lib/DBD/ODBC/FAQ.pm cp Changes blib/lib/DBD/ODBC/Changes.pm gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include -I. -I/export/home/filtro/perl5/lib/ +perl5/sun4-solaris-64int/auto/DBI -D_LARGEFILE_SOURCE -D_FILE_OFFSET_ +BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing -DVERSION=\"1.43\" -DX +S_VERSION=\"1.43\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/C +ORE" -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include ConvertUTF.c /usr/perl5/5.8.4/bin/perl -p -e "s/~DRIVER~/ODBC/g" /export/home/filtr +o/perl5/lib/perl5/sun4-solaris-64int/auto/DBI/Driver.xst > ODBC.xsi gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include -I. -I/export/home/filtro/perl5/lib/ +perl5/sun4-solaris-64int/auto/DBI -D_LARGEFILE_SOURCE -D_FILE_OFFSET_ +BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing -DVERSION=\"1.43\" -DX +S_VERSION=\"1.43\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/C +ORE" -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include dbdimp.c cp ODBC.pm blib/lib/DBD/ODBC.pm gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include -I. -I/export/home/filtro/perl5/lib/ +perl5/sun4-solaris-64int/auto/DBI -D_LARGEFILE_SOURCE -D_FILE_OFFSET_ +BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing -DVERSION=\"1.43\" -DX +S_VERSION=\"1.43\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/C +ORE" -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include unicode_helper.c Running Mkbootstrap for DBD::ODBC () /usr/perl5/5.8.4/bin/perl /export/home/filtro/perl5/lib/perl5/ExtUtils +/xsubpp -typemap /usr/perl5/5.8.4/lib/ExtUtils/typemap ODBC.xs > OD +BC.xsc && mv ODBC.xsc ODBC.c chmod 644 ODBC.bs cp ODBC.bs blib/arch/auto/DBD/ODBC/ODBC.bs chmod 644 blib/arch/auto/DBD/ODBC/ODBC.bs dbdimp.c: In function `odbc_set_query_timeout': dbdimp.c:197: warning: cast to pointer from integer of different size dbdimp.c: In function `odbc_db_STORE_attrib': dbdimp.c:4660: warning: cast to pointer from integer of different size dbdimp.c: In function `set_odbc_version': dbdimp.c:6400: warning: cast to pointer from integer of different size dbdimp.c: In function `post_connect': dbdimp.c:6671: warning: cast to pointer from integer of different size dbdimp.c: In function `odbc_st_execute_for_fetch': dbdimp.c:7164: warning: cast to pointer from integer of different size Warning: duplicate function definition 'data_sources' detected in ODBC +.xs, line 482 gcc -c -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include -I. -I/export/home/filtro/perl5/lib/ +perl5/sun4-solaris-64int/auto/DBI -D_LARGEFILE_SOURCE -D_FILE_OFFSET_ +BITS=64 -D_TS_ERRNO -O2 -fno-strict-aliasing -DVERSION=\"1.43\" -DX +S_VERSION=\"1.43\" -fPIC "-I/usr/perl5/5.8.4/lib/sun4-solaris-64int/C +ORE" -DHAVE_UNISTD_H -DHAVE_PWD_H -DHAVE_SYS_TYPES_H -DHAVE_LONG_LON +G -DSIZEOF_LONG_INT=4 -I/export/home/filtro/unixODBC/include -I/expo +rt/home/filtro/unixODBC/include ODBC.c rm -f blib/arch/auto/DBD/ODBC/ODBC.so gcc -G ConvertUTF.o ODBC.o dbdimp.o unicode_helper.o -o blib/arch/au +to/DBD/ODBC/ODBC.so \ \ chmod 755 blib/arch/auto/DBD/ODBC/ODBC.so Manifying blib/man3/DBD::ODBC.3 MJEVANS/DBD-ODBC-1.43.tar.gz /usr/sfw/bin/gmake -j3 -j3 -- OK
Trouble happens when testing. Something about a missing symbol loading ODBC.so:
cpan[3]> test DBD::ODBC Running test for module 'DBD::ODBC' Running make for M/MJ/MJEVANS/DBD-ODBC-1.43.tar.gz Has already been unwrapped into directory /export/home/filtro/.cpan/ +build/DBD-ODBC-1.43-I1aRMN Has already been made Running make test PERL_DL_NONLAZY=1 /usr/perl5/5.8.4/bin/perl "-MExtUtils::Command::MM" +"-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/01base.t ................... 1/6 # install_driver(ODBC) failed: Can' +t load '/export/home/filtro/.cpan/build/DBD-ODBC-1.43-I1aRMN/blib/arc +h/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: ld.so.1: perl: fatal: +relocation error: file /export/home/filtro/.cpan/build/DBD-ODBC-1.43- +I1aRMN/blib/arch/auto/DBD/ODBC/ODBC.so: symbol SQLGetDiagRec: referen +ced symbol not found at /usr/perl5/5.8.4/lib/sun4-solaris-64int/DynaL +oader.pm line 230. # at (eval 9) line 3 # Compilation failed in require at (eval 9) line 3. # Perhaps a required shared library or dll isn't installed where expec +ted # at t/01base.t line 26 # Failed test 'install ODBC' # at t/01base.t line 30. # Looks like you failed 1 test of 6. t/01base.t ................... Dubious, test returned 1 (wstat 256, 0x +100) Failed 1/6 subtests (less 2 skipped subtests: 3 okay) t/02simple.t ................. skipped: DBI_DSN is undefined t/03dbatt.t .................. skipped: DBI_DSN is undefined t/05meth.t ................... skipped: DBI_DSN is undefined t/07bind.t ................... skipped: DBI_DSN is undefined t/08bind2.t .................. skipped: DBI_DSN is undefined t/09multi.t .................. skipped: DBI_DSN is undefined t/10handler.t ................ skipped: DBI_DSN is undefined t/12blob.t ................... skipped: DBI_DSN is undefined t/20SqlServer.t .............. skipped: DBI_DSN is undefined t/30Oracle.t ................. skipped: DBI_DSN is undefined t/40UnicodeRoundTrip.t ....... skipped: DBI_DSN is undefined t/41Unicode.t ................ skipped: DBI_DSN is undefined t/50_odbc_utf8_on.t .......... skipped: DBI_DSN is undefined t/70execute_array_dbi.t ...... skipped: DBI_DSN is undefined t/70execute_array_native.t ... skipped: DBI_DSN is undefined t/80_odbc_diags.t ............ Can't load '/export/home/filtro/.cpan/b +uild/DBD-ODBC-1.43-I1aRMN/blib/arch/auto/DBD/ODBC/ODBC.so' for module + DBD::ODBC: ld.so.1: perl: fatal: relocation error: file /export/home +/filtro/.cpan/build/DBD-ODBC-1.43-I1aRMN/blib/arch/auto/DBD/ODBC/ODBC +.so: symbol SQLGetDiagRec: referenced symbol not found at /usr/perl5/ +5.8.4/lib/sun4-solaris-64int/DynaLoader.pm line 230. at t/80_odbc_diags.t line 10 Compilation failed in require at t/80_odbc_diags.t line 10. BEGIN failed--compilation aborted at t/80_odbc_diags.t line 10. t/80_odbc_diags.t ............ Dubious, test returned 255 (wstat 65280 +, 0xff00) No subtests run t/odbc_describe_parameter.t .. skipped: DBI_DSN is undefined t/pod-coverage.t ............. 1/1 # Test::Pod::Coverage 1.04 required + for testing POD coverage t/pod-coverage.t ............. ok t/pod.t ...................... ok t/rt_38977.t ................. skipped: DBI_DSN is undefined t/rt_39841.t ................. skipped: DBI_DSN is undefined t/rt_39897.t ................. skipped: DBI_DSN is undefined t/rt_43384.t ................. skipped: DBI_DSN is undefined t/rt_46597.t ................. skipped: DBI_DSN is undefined t/rt_50852.t ................. skipped: DBI_DSN is undefined t/rt_57957.t ................. skipped: DBI_DSN is undefined t/rt_59621.t ................. skipped: DBI_DSN is undefined t/rt_61370.t ................. skipped: DBI_DSN is undefined t/rt_62033.t ................. skipped: DBI_DSN is undefined t/rt_63550.t ................. skipped: DBI_DSN is undefined t/rt_78838.t ................. skipped: DBI_DSN is undefined t/rt_79190.t ................. skipped: DBI_DSN is undefined t/rt_79397.t ................. skipped: DBI_DSN is undefined t/rt_81911.t ................. skipped: DBI_DSN is undefined t/rt_null_nvarchar.t ......... skipped: DBI_DSN is undefined t/sql_type_cast.t ............ skipped: DBI_DSN is undefined Test Summary Report ------------------- t/01base.t (Wstat: 256 Tests: 6 Failed: 1) Failed test: 4 Non-zero exit status: 1 t/80_odbc_diags.t (Wstat: 65280 Tests: 0 Failed: 0) Non-zero exit status: 255 Parse errors: No plan found in TAP output Files=37, Tests=11, 6 wallclock secs ( 0.20 usr 0.16 sys + 1.79 cus +r 0.32 csys = 2.47 CPU) Result: FAIL Failed 2/37 test programs. 1/11 subtests failed. gmake: *** [test_dynamic] Error 29 MJEVANS/DBD-ODBC-1.43.tar.gz /usr/sfw/bin/gmake test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports MJEVANS/DBD-ODBC-1.43.tar.gz Failed during this command: MJEVANS/DBD-ODBC-1.43.tar.gz : make_test NO

In reply to "referenced symbol not found" testing DBD::ODBC against unixODBC by arielCo

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-25 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found