RE: make test: dlopen error :can't load library ODBC.so
Maybe it is only a question of dynamic loaded libraries not included in the search path. If I remember well there is a LD_LIBRARY_PATH variable you can add locations where to search libraries to be loaded when executing the program. Cheers, Reinhard Reinhard Erich Voglmaier IT Systems Validation Manager GlaxoSmithKline Spa - Pharmaceuticals Via Fleming 2 37135 - Verona phone 39 045 921 8542 mobile 39 349 079 8094 Questa e-mail è stata spedita da GlaxoSmithKline S.p.A. unipersonale con sede in Via A. Fleming n.2, Verona - società sottoposta all'attività di direzione e coordinamento di GlaxoSmithKline plc - Reg. Imprese di Verona, codice fiscale e partita IVA n. 00212840235 - cap.soc. interamente versato Euro 65.250.000 . GSK ha adottato il proprio Codice Etico , la "carta costituzionale" che declina i principi e le norme di comportamento che l'Azienda assume nei confronti dei propri stakeholder (pazienti, medici, clienti, fornitori, dipendenti, collaboratori e partners) e con i quali intende sviluppare un rapporto fiduciario . Le informazioni contenute nella presente comunicazione possono essere riservate e sono destinate esclusivamente al destinatario. Se il messaggio è pervenuto ad un destinatario diverso da quello indicato, si prega di re-inviarlo al mittente e di cancellarlo permanentemente dal proprio computer senza leggerlo, farne copia, inoltrarlo a terzi o conservarlo. Trattandosi di e-mail aziendale, anche le eventuali risposte pervenute potrebbero essere lette da personale GSK . This e-mail was sent by GlaxoSmithKline S.p.A. sole shareholder, Via Fleming 2,Verona-Italy which is a member of the GlaxoSmithKline group of companies - Verona Register of Companies and VAT code n. 00212840235 - paid up capital Euro 65.250.000 . GSK has adopted its own Codice Etico , the "statute" in which the Company legal and ethical principles for conducting the business have been declared with respect to its own stakeholders (patients, healthcare practitioners, customers, suppliers, employees, collaborators and partners) with whom a trusty relationship has to be developed . This e-mail message may contain confidential information and is intended exclusively for the recipient. If you are not the intended recipient you are obliged to not read, copy, disclose, distribute, or copy it to any third party. If you erroneously receive this message you are obliged to return it to the sender and eliminate it permanently from your computer. Being a company e-mail, replies as well might be read by GSK employees. -Original Message- From: Chunmei Wu [mailto:chunmei...@oracle.com] Sent: 10 May 2010 04:06 To: dbi-dev@perl.org Subject: make test: dlopen error :can't load library ODBC.so Hi everyone, OS: AIX perl version: 5.0 After installed DBD-ODBC-1.21, I run 'make test', but failed 'can't load library' error: t/20SqlServer...ok 2/65install_driver(ODBC) failed: Can't load '/home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: dlopen: /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so: can't load library /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so103 /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so at /vobs/siebel/src/3rdparty/perl5.8/aix/lib/5.8.0/aix/DynaLoader.pm line 229. at (eval 4) line 3 Compilation failed in require at (eval 4) line 3. Perhaps a required shared library or dll isn't installed where expected at t/20SqlServer.t line 218 But i can run ldd for this library: unixus...@dsliaa05 # > ldd /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so needs: /usr/lib/libc.a(shr_64.o) /home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/lib/libodbc.a(libodbc.so.1) /unix /usr/lib/libcrypt.a(shr_64.o) /usr/lib/libpthread.a(shr_xpg5_64.o) /usr/lib/libiconv.a(shr4_64.o) Can you help me? Thanks in advance! Thanks, Chunmei Wu
Re: make test: dlopen error :can't load library ODBC.so
On 05/10/10 08:19, Chunmei Wu wrote: Hi Martin, Reinhard and Jens, Please do not top-post Thanks for your advice. Following is related info you referred: 1> Are all the components in your chain (perl, driver manager, driver) all64 bit? [Chunmei]: The unixODBC driver and the DB2 driver are 64bit. Seems that my perl is 32bit from following info. Is this the reason for my error The chance for it is near 100% Can you use either 32-bit lib for DB2 and unixODBC or rebuild your perl using 64bit? unixus...@dsliaa05 #> file perl perl: executable (RISC System/6000) or object module [...] Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Locally applied patches: IndigoPerl Build 804 Built under aix Compiled at Feb 9 2003 13:22:48 [...] 4> I think it could be helpful (if no one else has a better proposal) to start fresh and record the entire make output in a file [Chunmei]: I did it, but I didn't get any error when run 'make': a) perl Makefile.PL Warning: LD_LIBRARY_PATH doesn't include /home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/ [Chunmei]: the warning is strange. Even I set this environment to include this directory, it still report such warning. Meanwhile, I think AIX didn't use this environment but LIBPATH. WARNING: NO_META is not a known parameter. Please do not guess which information we need - please attache the entire log as I told you. The warning is useful to add a patch to the Makefile.PL to recognize LIBPATH on AIX, but nothing else b) make NO warning. What -L paths? What RPATH are used. Are some previous RPATH are overwritten by later options? What compiler/linker flags where used? I think, all DBD's should include the links to http://www.catb.org/~esr/faqs/smart-questions.html and http://www.chiark.greenend.org.uk/~sgtatham/bugs.html ... c) make test The error 'can't load library...' occur. 5> Looks to me like libperl.a is missing from the requirements list of ODBC.so. As long you don't have statically linked the perl runtime, this could be an issue. [Chunmei]: Following command is used to create ODBC.so: LD_RUN_PATH="/home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/lib" ld -bhalt:4 -bM:SRE -bI:/vobs/vob_src_3rdparty/src/3rdparty/perl2exe/aix/perl2exe/perl5.8/lib/5.8.0/aix/CORE/perl.exp -bE:ODBC.exp -bnoentry -lC -lc ConvertUTF.o ODBC.o dbdimp.o unicode_helper.o -o blib/arch/auto/DBD/ODBC/ODBC.so -L/home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/lib -lodbc No error reports during the build and the ldd also is ok. Probably. 6> Maybe it is only a question of dynamic loaded libraries not included in the search path. If I remember well there is a LD_LIBRARY_PATH variable you can add locations where to search libraries to be loaded when executing the program. [Chunmei]: AIX uses LIBPATH instead of LD_LIBRARY_PATH to search libraries. The value of $LIBPATH is "/home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64//lib:/usr/lib:/lib:/opt/IBM/db2/V9.7/lib64" in my environment. Jens
RE: make test: dlopen error :can't load library ODBC.so
Hi Martin, Reinhard and Jens, Thanks for your advice. Following is related info you referred: 1> Are all the components in your chain (perl, driver manager, driver) all64 bit? [Chunmei]: The unixODBC driver and the DB2 driver are 64bit. Seems that my perl is 32bit from following info. Is this the reason for my error unixus...@dsliaa05 # > file perl perl: executable (RISC System/6000) or object module 2> What does perl -V output? Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration: Platform: osname=aix, osvers=4.1.4.0, archname=aix uname='aix cyclops 1 4 00051664a000 ' config_args='-des -dcf_email=supp...@indigostar.com -dperladmin=supp...@indigostar.com -Dcf_by=IndigoSTAR -Uinstallusrbinperl' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias', optimize='-O', cppflags='' ccversion='3.1.3.3', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=4 alignbytes=8, prototype=define Linker and Libraries: ld='ld', ldflags ='' libpth=/lib /usr/lib /usr/ccs/lib libs=-ldbm -lld -lm -lC -lc -lbsd -lPW perllibs=-lld -lm -lC -lc -lbsd -lPW libc=, so=a, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -bE:/opt/lib/perl5/5.8.0/aix/CORE/perl.exp' cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -bnoentry -lC -lc' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Locally applied patches: IndigoPerl Build 804 Built under aix Compiled at Feb 9 2003 13:22:48 %ENV: PERL5LIB="/vobs/siebel/src/3rdparty/perl5.8/aix/lib/site_perl/5.8.0:/vobs/siebel/src/3rdparty/perl5.8/aix/lib/site_perl/5.8.0/aix/auto/DBI/" PERLHOME="/vobs/siebel/src/3rdparty/perl5.8/aix" @INC: /vobs/siebel/src/3rdparty/perl5.8/aix/lib/site_perl/5.8.0/aix /vobs/siebel/src/3rdparty/perl5.8/aix/lib/site_perl/5.8.0 /vobs/siebel/src/3rdparty/perl5.8/aix/lib/site_perl/5.8.0/aix/auto/DBI/ /vobs/siebel/src/3rdparty/perl5.8/aix/lib/5.8.0/aix /vobs/siebel/src/3rdparty/perl5.8/aix/lib/5.8.0 /vobs/siebel/src/3rdparty/perl5.8/aix/lib/site_perl/5.8.0/aix /vobs/siebel/src/3rdparty/perl5.8/aix/lib/site_perl/5.8.0 /opt/lib/perl5/site_perl . 3> What ODBC driver manager are you using? [Chunmei]: UnixODBC 2.3.0 4> I think it could be helpful (if no one else has a better proposal) to start fresh and record the entire make output in a file [Chunmei]: I did it, but I didn't get any error when run 'make': a) perl Makefile.PL Warning: LD_LIBRARY_PATH doesn't include /home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/ [Chunmei]: the warning is strange. Even I set this environment to include this directory, it still report such warning. Meanwhile, I think AIX didn't use this environment but LIBPATH. WARNING: NO_META is not a known parameter. b) make NO warning. c) make test The error 'can't load library...' occur. 5> Looks to me like libperl.a is missing from the requirements list of ODBC.so. As long you don't have statically linked the perl runtime, this could be an issue. [Chunmei]: Following command is used to create ODBC.so: LD_RUN_PATH="/home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/lib" ld -bhalt:4 -bM:SRE -bI:/vobs/vob_src_3rdparty/src/3rdparty/perl2exe/aix/perl2exe/perl5.8/lib/5.8.0/aix/CORE/perl.exp -bE:ODBC.exp -bnoentry -lC -lc ConvertUTF.o ODBC.o dbdimp.o unicode_helper.o -o blib/arch/auto/DBD/ODBC/ODBC.so -L/home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/lib -lodbc No error reports during the build and the ldd also is ok. 6> Maybe it is only a question of dynamic loaded libraries not included in the search path. If I remember well there is a LD_LIBRARY_PATH variable you can add locations where to search libraries to be loaded when executing the program. [Chunmei]: AIX uses LIBPATH instead of LD_LIBRARY_PATH to search libraries. The value of $LIBPATH is "/home/eng-sm/unixuser/claire
Re: make test: dlopen error :can't load library ODBC.so
On 05/10/10 02:06, Chunmei Wu wrote: Hi everyone, OS: AIX perl version: 5.0 After installed DBD-ODBC-1.21, I run 'make test', but failed 'can't load library' error: t/20SqlServer...ok 2/65install_driver(ODBC) failed: Can't load '/home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so' for module DBD::ODBC: dlopen: /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so: can't load library /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so103 /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so at /vobs/siebel/src/3rdparty/perl5.8/aix/lib/5.8.0/aix/DynaLoader.pm line 229. at (eval 4) line 3 Compilation failed in require at (eval 4) line 3. Perhaps a required shared library or dll isn't installed where expected at t/20SqlServer.t line 218 But i can run ldd for this library: unixus...@dsliaa05 #> ldd /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so needs: /usr/lib/libc.a(shr_64.o) /home/eng-sm/unixuser/claire/test/perl/unixodbc_install2.3.0_64/lib/libodbc.a(libodbc.so.1) /unix /usr/lib/libcrypt.a(shr_64.o) /usr/lib/libpthread.a(shr_xpg5_64.o) /usr/lib/libiconv.a(shr4_64.o) Can you help me? Thanks in advance! Looks to me like libperl.a is missing from the requirements list of ODBC.so. As long you don't have statically linked the perl runtime, this could be an issue. But the error reported is; dlopen: /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so: can't load library /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so103 The file /home/eng-sm/unixuser/claire/test/perl/DBD-ODBC-1.21/blib/arch/auto/DBD/ODBC/ODBC.so103 is required for some reason. 'make test' runs with the same permissions as 'make' run, I assume. Looks to me like something went wrong with your build. I think it could be helpful (if no one else has a better proposal) to start fresh and record the entire make output in a file: $ perl Makefile.PL [flags ...] >log 2>&1 $ make >log 2>&1 $ make test >log 2>&1 If you add some flags to one of the lines, it might be good to echo the line first to the log and execute it then. /Jens