http://qs321.pair.com?node_id=1028441

Arunkumarpro has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I am trying to install DBD::Sybase driver using cpan,in order to access Sybase database. I am sure that DBD::Sybase needs Sybaseclient libraries. So I did install Sybase Open Client 15.7 (guess that client libraries come with it)on my system with in the path C:\Sybase. Then I modified the Sybase Environment Varible to C:\Sybase and tried installing the DBD when I got the following errors.

C:\Users\Arun\Desktop>cpan install DBD::Sybase CPAN: CPAN::SQLite loaded ok (v0.202) CPAN: LWP::UserAgent loaded ok (v6.04) CPAN: Time::HiRes loaded ok (v1.9725) Fetching with LWP: http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz CPAN: YAML::XS loaded ok (v0.38) Fetching with LWP: http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz Fetching with LWP: http://ppm.activestate.com/CPAN/modules/03modlist.data.gz Database was generated on Fri, 12 Apr 2013 02:24:38 GMT Updating database file ... Done!Running install for module 'DBD::Sybase' Running make for M/ME/MEWP/DBD-Sybase-1.15.tar.gz CPAN: Digest::SHA loaded ok (v5.73) CPAN: Compress::Zlib loaded ok (v2.055) Checksum for C:\strawberry\cpan\sources\authors\id\M\ME\MEWP\DBD-Sybas +e-1.15.t .gz ok CPAN: Archive::Tar loaded ok (v1.90) CPAN: File::Temp loaded ok (v0.22) CPAN: Parse::CPAN::Meta loaded ok (v1.4404) CPAN: CPAN::Meta loaded ok (v2.120921) CPAN.pm: Building M/ME/MEWP/DBD-Sybase-1.15.tar.gz Sybase OpenClient 15.7 found. By default DBD::Sybase 1.05 and later use the 'CHAINED' mode (where av +ailable) when 'AutoCommit' is turned off. Versions 1.04 and older instead manag +ed the transactions explicitly with a 'BEGIN TRAN' before the first DML statement. Using the 'CHAINED' mode is preferable as it is the way tha +t Sybase implements AutoCommit handling for both its ODBC and JDBC drive +rs. Use 'CHAINED' mode by default (Y/N) [Y]: y The DBD::Sybase module need access to a Sybase server to run the tests +. To clear an entry please enter 'undef' Sybase server to use (default: SYBASE): User ID to log in to Sybase (default: sa): Password (default: undef): Sybase database to use on SYBASE (default: undef): * Writing login information, including password, to file PWD. Checking if your kit is complete... Looks good Note (probably harmless): No library found for -llibsybtcl.lib Note (probably harmless): No library found for -llibsybcomn.lib Note (probably harmless): No library found for -llibsybintl.lib Multiple copies of Driver.xst found in: C:/strawberry/perl/site/lib/au +to/DBI/ /strawberry/perl/vendor/lib/auto/DBI/ at Makefile.PL line 80. Using DBI 1.625 (for perl 5.016002 on MSWin32-x86-multi-thread) instal +led in C strawberry/perl/site/lib/auto/DBI/ Writing Makefile for DBD::Sybase Writing MYMETA.yml and MYMETA.json CPAN: Module::CoreList loaded ok (v2.76) cp dbd-sybase.pod blib\lib\DBD\dbd-sybase.pod cp Sybase.pm blib\lib\DBD\Sybase.pm C:\strawberry\perl\bin\perl.exe -p -e "s/~DRIVER~/Sybase/g" C:\strawbe +rry\perl ite\lib\auto\DBI\Driver.xst > Sybase.xsi C:\strawberry\perl\bin\perl.exe C:\strawberry\perl\lib\ExtUtils\xsubpp + -typem C:\strawberry\perl\lib\ExtUtils\typemap Sybase.xs > Sybase.xsc && C: +\strawbe y\perl\bin\perl.exe -MExtUtils::Command -e mv -- Sybase.xsc Sybase.c gcc -c -IC:\Sybase/OCS-15_0/include -IC:/strawberry/perl/site/lib/aut +o/DBI -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_ +IMPLICIT YS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.15\" + -DXS_V SION=\"1.15\" "-IC:\strawberry\perl\lib\CORE" Sybase.c gcc -c -IC:\Sybase/OCS-15_0/include -IC:/strawberry/perl/site/lib/aut +o/DBI -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_ +IMPLICIT YS -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"1.15\" + -DXS_V SION=\"1.15\" "-IC:\strawberry\perl\lib\CORE" dbdimp.c dbdimp.c: In function 'syb_st_execute': dbdimp.c:3906:4: warning: passing argument 2 of 'ct_results' from inco +mpatible ointer type [enabled by default] C:\Sybase/OCS-15_0/include/ctpublic.h:374:29: note: expected 'CS_INT * +' but ar ment is of type 'int *' dbdimp.c:3930:7: warning: passing argument 5 of 'ct_bind' from incompa +tible po ter type [enabled by default] C:\Sybase/OCS-15_0/include/ctpublic.h:113:29: note: expected 'CS_INT * +' but ar ment is of type 'int *' Running Mkbootstrap for DBD::Sybase () C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Sy +base.bs C:\strawberry\perl\bin\perl.exe -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"DBD::Sybase\", 'DLBASE' => 'Sybase', 'DL +_FUNCS' { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);" dlltool --def Sybase.def --output-exp dll.exp g++ -o blib\arch\auto\DBD\Sybase\Sybase.dll -Wl,--base-file -Wl,dll.ba +se -LC:\ base/OCS-15_0/lib -mdll -s -L"C:\strawberry\perl\lib\CORE" -L"C:\straw +berry\c\ b" Sybase.o dbdimp.o C:\strawberry\perl\lib\CORE\libperl516.a C: +\Sybase\ S-15_0\lib\libsybct.lib C:\Sybase\OCS-15_0\lib\libsybcs.lib C:\Sybase\ +OCS-15_0 ib\libsybblk.lib C:\strawberry\c\i686-w64-mingw32\lib\libm.a C:\strawb +erry\c\i 6-w64-mingw32\lib\libmoldname.a C:\strawberry\c\i686-w64-mingw32\lib\l +ibkernel .a C:\strawberry\c\i686-w64-mingw32\lib\libuser32.a C:\strawberry\c\i6 +86-w64-m gw32\lib\libgdi32.a C:\strawberry\c\i686-w64-mingw32\lib\libwinspool.a + C:\stra erry\c\i686-w64-mingw32\lib\libcomdlg32.a C:\strawberry\c\i686-w64-min +gw32\lib ibadvapi32.a C:\strawberry\c\i686-w64-mingw32\lib\libshell32.a C:\stra +wberry\c 686-w64-mingw32\lib\libole32.a C:\strawberry\c\i686-w64-mingw32\lib\li +boleaut3 a C:\strawberry\c\i686-w64-mingw32\lib\libnetapi32.a C:\strawberry\c\i +686-w64- ngw32\lib\libuuid.a C:\strawberry\c\i686-w64-mingw32\lib\libws2_32.a C +:\strawb ry\c\i686-w64-mingw32\lib\libmpr.a C:\strawberry\c\i686-w64-mingw32\li +b\libwin .a C:\strawberry\c\i686-w64-mingw32\lib\libversion.a C:\strawberry\c\i +686-w64- ngw32\lib\libodbc32.a C:\strawberry\c\i686-w64-mingw32\lib\libodbccp32 +.a C:\st wberry\c\i686-w64-mingw32\lib\libcomctl32.a dll.exp dbdimp.o:dbdimp.c:(.text+0x1f0): undefined reference to `blk_done' dbdimp.o:dbdimp.c:(.text+0x8e9): undefined reference to `ct_con_props' dbdimp.o:dbdimp.c:(.text+0x10c3): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x141e): undefined reference to `ct_cancel' dbdimp.o:dbdimp.c:(.text+0x1632): undefined reference to `blk_drop' dbdimp.o:dbdimp.c:(.text+0x16eb): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x21a0): undefined reference to `ct_close' dbdimp.o:dbdimp.c:(.text+0x22dc): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x2455): undefined reference to `ct_res_info' dbdimp.o:dbdimp.c:(.text+0x2533): undefined reference to `ct_describe' dbdimp.o:dbdimp.c:(.text+0x2596): undefined reference to `ct_bind' dbdimp.o:dbdimp.c:(.text+0x27bd): undefined reference to `ct_fetch' dbdimp.o:dbdimp.c:(.text+0x2cdb): undefined reference to `ct_cmd_alloc +' dbdimp.o:dbdimp.c:(.text+0x2daf): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x2e1c): undefined reference to `cs_loc_alloc +' dbdimp.o:dbdimp.c:(.text+0x2e65): undefined reference to `cs_locale' dbdimp.o:dbdimp.c:(.text+0x2ed3): undefined reference to `cs_locale' dbdimp.o:dbdimp.c:(.text+0x2f27): undefined reference to `cs_dt_info' dbdimp.o:dbdimp.c:(.text+0x2f66): undefined reference to `ct_con_alloc +' dbdimp.o:dbdimp.c:(.text+0x3199): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x3204): undefined reference to `ct_connect' dbdimp.o:dbdimp.c:(.text+0x32ae): undefined reference to `ct_command' dbdimp.o:dbdimp.c:(.text+0x32c1): undefined reference to `ct_send' dbdimp.o:dbdimp.c:(.text+0x32f5): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0x33f2): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x3458): undefined reference to `cs_locale' dbdimp.o:dbdimp.c:(.text+0x348a): undefined reference to `ct_cmd_drop' dbdimp.o:dbdimp.c:(.text+0x3505): undefined reference to `ct_options' dbdimp.o:dbdimp.c:(.text+0x3621): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x369b): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x3724): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x3791): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x37d6): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x3826): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x38da): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x393b): undefined reference to `ct_options' dbdimp.o:dbdimp.c:(.text+0x3a7b): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x3ae4): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x3c6c): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x3cd1): undefined reference to `ct_options' dbdimp.o:dbdimp.c:(.text+0x3d34): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x3d88): undefined reference to `ct_close' dbdimp.o:dbdimp.c:(.text+0x3d97): undefined reference to `ct_con_drop' dbdimp.o:dbdimp.c:(.text+0x3e21): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x3e6b): undefined reference to `ct_con_props +' dbdimp.o:dbdimp.c:(.text+0x45e7): undefined reference to `cs_diag' dbdimp.o:dbdimp.c:(.text+0x4631): undefined reference to `cs_config' dbdimp.o:dbdimp.c:(.text+0x4646): undefined reference to `ct_init' dbdimp.o:dbdimp.c:(.text+0x467c): undefined reference to `ct_callback' dbdimp.o:dbdimp.c:(.text+0x46b2): undefined reference to `ct_callback' dbdimp.o:dbdimp.c:(.text+0x48ba): undefined reference to `cs_locale' dbdimp.o:dbdimp.c:(.text+0x4a30): undefined reference to `cs_dt_info' dbdimp.o:dbdimp.c:(.text+0x4a82): undefined reference to `cs_config' dbdimp.o:dbdimp.c:(.text+0x4ad0): undefined reference to `cs_ctx_drop' dbdimp.o:dbdimp.c:(.text+0x4b69): undefined reference to `ct_config' dbdimp.o:dbdimp.c:(.text+0x5378): undefined reference to `ct_command' dbdimp.o:dbdimp.c:(.text+0x5385): undefined reference to `ct_cmd_drop' dbdimp.o:dbdimp.c:(.text+0x5394): undefined reference to `ct_send' dbdimp.o:dbdimp.c:(.text+0x628b): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0x634b): undefined reference to `ct_cmd_drop' dbdimp.o:dbdimp.c:(.text+0x63cc): undefined reference to `ct_close' dbdimp.o:dbdimp.c:(.text+0x63ff): undefined reference to `cs_loc_drop' dbdimp.o:dbdimp.c:(.text+0x6425): undefined reference to `ct_con_drop' dbdimp.o:dbdimp.c:(.text+0x7afd): undefined reference to `cs_dt_info' dbdimp.o:dbdimp.c:(.text+0x829e): undefined reference to `ct_capabilit +y' dbdimp.o:dbdimp.c:(.text+0x8850): undefined reference to `ct_capabilit +y' dbdimp.o:dbdimp.c:(.text+0x88f3): undefined reference to `ct_dynamic' dbdimp.o:dbdimp.c:(.text+0x8924): undefined reference to `ct_send' dbdimp.o:dbdimp.c:(.text+0x8950): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0x899a): undefined reference to `ct_dynamic' dbdimp.o:dbdimp.c:(.text+0x89bb): undefined reference to `ct_send' dbdimp.o:dbdimp.c:(.text+0x8a0c): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0x8ad4): undefined reference to `ct_command' dbdimp.o:dbdimp.c:(.text+0x8afd): undefined reference to `ct_send' dbdimp.o:dbdimp.c:(.text+0x8b52): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0x8c46): undefined reference to `ct_res_info' dbdimp.o:dbdimp.c:(.text+0x8d3c): undefined reference to `ct_describe' dbdimp.o:dbdimp.c:(.text+0x8e2e): undefined reference to `ct_dynamic' dbdimp.o:dbdimp.c:(.text+0x8f5f): undefined reference to `ct_cmd_drop' dbdimp.o:dbdimp.c:(.text+0x9016): undefined reference to `ct_cancel' dbdimp.o:dbdimp.c:(.text+0x902a): undefined reference to `ct_close' dbdimp.o:dbdimp.c:(.text+0x9270): undefined reference to `ct_cancel' dbdimp.o:dbdimp.c:(.text+0x928c): undefined reference to `ct_close' dbdimp.o:dbdimp.c:(.text+0x93c3): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0x9467): undefined reference to `ct_res_info' dbdimp.o:dbdimp.c:(.text+0x94fc): undefined reference to `ct_fetch' dbdimp.o:dbdimp.c:(.text+0x9567): undefined reference to `ct_fetch' dbdimp.o:dbdimp.c:(.text+0x95ba): undefined reference to `ct_res_info' dbdimp.o:dbdimp.c:(.text+0x985a): undefined reference to `ct_bind' dbdimp.o:dbdimp.c:(.text+0x98df): undefined reference to `ct_describe' dbdimp.o:dbdimp.c:(.text+0x99de): undefined reference to `ct_bind' dbdimp.o:dbdimp.c:(.text+0x9a64): undefined reference to `ct_bind' dbdimp.o:dbdimp.c:(.text+0x9beb): undefined reference to `ct_compute_i +nfo' dbdimp.o:dbdimp.c:(.text+0x9c4e): undefined reference to `ct_compute_i +nfo' dbdimp.o:dbdimp.c:(.text+0xa2a5): undefined reference to `ct_compute_i +nfo' dbdimp.o:dbdimp.c:(.text+0xa397): undefined reference to `ct_res_info' dbdimp.o:dbdimp.c:(.text+0xa3e3): undefined reference to `ct_fetch' dbdimp.o:dbdimp.c:(.text+0xa56e): undefined reference to `ct_cancel' dbdimp.o:dbdimp.c:(.text+0xa58d): undefined reference to `ct_close' dbdimp.o:dbdimp.c:(.text+0xa9b7): undefined reference to `cs_dt_crack' dbdimp.o:dbdimp.c:(.text+0xac76): undefined reference to `cs_convert' dbdimp.o:dbdimp.c:(.text+0xb164): undefined reference to `ct_param' dbdimp.o:dbdimp.c:(.text+0xb1f5): undefined reference to `ct_command' dbdimp.o:dbdimp.c:(.text+0xb503): undefined reference to `cs_convert' dbdimp.o:dbdimp.c:(.text+0xb75f): undefined reference to `cs_convert' dbdimp.o:dbdimp.c:(.text+0xcad8): undefined reference to `ct_cmd_drop' dbdimp.o:dbdimp.c:(.text+0xcb20): undefined reference to `ct_close' dbdimp.o:dbdimp.c:(.text+0xcb38): undefined reference to `ct_con_drop' dbdimp.o:dbdimp.c:(.text+0xcbe5): undefined reference to `ct_dynamic' dbdimp.o:dbdimp.c:(.text+0xcd6f): undefined reference to `ct_send' dbdimp.o:dbdimp.c:(.text+0xcdb0): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0xcf29): undefined reference to `ct_get_data' dbdimp.o:dbdimp.c:(.text+0xd03e): undefined reference to `ct_command' dbdimp.o:dbdimp.c:(.text+0xd06b): undefined reference to `ct_send' dbdimp.o:dbdimp.c:(.text+0xd0c8): undefined reference to `ct_results' dbdimp.o:dbdimp.c:(.text+0xd124): undefined reference to `ct_describe' dbdimp.o:dbdimp.c:(.text+0xd174): undefined reference to `ct_bind' dbdimp.o:dbdimp.c:(.text+0xd1ab): undefined reference to `ct_fetch' dbdimp.o:dbdimp.c:(.text+0xd1cb): undefined reference to `ct_cancel' dbdimp.o:dbdimp.c:(.text+0xd2cc): undefined reference to `ct_send_data +' dbdimp.o:dbdimp.c:(.text+0xd346): undefined reference to `ct_data_info +' dbdimp.o:dbdimp.c:(.text+0xd3f0): undefined reference to `ct_data_info +' c:/strawberry/c/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686 +-w64-min 32/bin/ld.exe: dbdimp.o: bad reloc address 0x20 in section `.data' c:/strawberry/c/bin/../lib/gcc/i686-w64-mingw32/4.6.3/../../../../i686 +-w64-min 32/bin/ld.exe: final link failed: Invalid operation collect2: ld returned 1 exit status dmake.EXE: Error code 129, while making 'blib\arch\auto\DBD\Sybase\Sy +base.dll MEWP/DBD-Sybase-1.15.tar.gz C:\strawberry\c\bin\dmake.EXE -- NOT OK Running make test Can't test without successful make Running make install Make had returned bad status, install seems impossible

I tried many methods but could not make it. I tried installing FreeTDS , but it was hectic on windows. Can anyone give me some ideas?? Thanks in advance arun.

Replies are listed 'Best First'.
Re: Installing DBD::Sybase using CPAN
by mpeppler (Vicar) on Apr 16, 2013 at 15:23 UTC
    I don't know strawberry perl (or much of a Windows person anyway) - but the errors (missing symbol, etc) mean that the Sybase client libs aren't found/searched during the link phase. The ct_xyz symbols should all live in libsybct.lib/dll.

    Maybe there is something in the Makefile that is missing such that the Sybase libs aren't searched at link time.

    Michael

      For what it's worth, I'm getting the same issues today on a Windows2008 box, Sybase 15.7 client install and Strawberry 5.18. Looks to me like the 64 bit versions of the libs are not installed OR that they aren't recognized as such by the build. I had the same looking issues building MQSeries on the same box until I "convinced" the Makefile.PL for that module to go use the Lib64 directory to find the right libs.
        I think that the 64bit libs on windows should be called libsybct64.lib/libsybct64.dll - you need to have a 64 bit client installed (the default client is still 32 bit only IIRC).

        Michael

Re: Installing DBD::Sybase using CPAN
by Anonymous Monk on Apr 13, 2013 at 07:12 UTC

    Can anyone give me some ideas??

    Forget about installing DBD::Sybase using cpan, do it manually