Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

DBD::Sybase cygwin installation failure

by ravipg2004 (Initiate)
on Dec 31, 2009 at 04:36 UTC ( #815044=perlquestion: print w/replies, xml ) Need Help??

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

Hi, I am getting the following errors while installing the DBD::Sybase module using cpan/manual. Before installing it,

I installed the following: 1. freetds (latest version) 2. DBI module

Environment: Cygwin

Now when I am installing the DBD::Sybase, I am getting the following error message.

Skip blib/lib/DBD/dbd-sybase.pod (unchanged) Skip blib/lib/DBD/Sybase.pm (unchanged) gcc -c -I/usr/local/include -D_MSC_VER=800 -I/usr/lib/perl5/site_perl +/5.10/i686 -cygwin/auto/DBI -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict- +aliasing - pipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3 -DVER +SION=\"1.0 9\" -DXS_VERSION=\"1.09\" "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" +Sybase.c gcc -c -I/usr/local/include -D_MSC_VER=800 -I/usr/lib/perl5/site_perl +/5.10/i686 -cygwin/auto/DBI -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -fno-strict- +aliasing - pipe -fstack-protector -I/usr/local/include -DUSEIMPORTLIB -O3 -DVER +SION=\"1.0 9\" -DXS_VERSION=\"1.09\" "-I/usr/lib/perl5/5.10/i686-cygwin/CORE" +dbdimp.c rm -f blib/arch/auto/DBD/Sybase/Sybase.dll g++ -L/usr/local/lib --shared -Wl,--enable-auto-import -Wl,--export +-all-symbo ls -Wl,--stack,8388608 -Wl,--enable-auto-image-base -L/usr/local/lib - +fstack-pro tector Sybase.o dbdimp.o -o blib/arch/auto/DBD/Sybase/Sybase.dll + \ /usr/lib/perl5/5.10/i686-cygwin/CORE/cygperl5_10.dll -L/ -L/ +usr/local/ lib -lct \ /usr/local/lib/libct.a(iconv.o): In function `tds_get_iconv_name': /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:216: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:225: undefined + reference to `_libiconv_close' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:222: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:234: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:241: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:244: undefined + reference to `_libiconv_close' /usr/local/lib/libct.a(iconv.o): In function `_iconv_close': /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:529: undefined + reference to `_libiconv_close' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:529: undefined + reference to `_libiconv_close' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:529: undefined + reference to `_libiconv_close' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:529: undefined + reference to `_libiconv_close' /usr/local/lib/libct.a(iconv.o): In function `tds_iconv_info_init': /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:482: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:487: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:497: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:498: undefined + reference to `_libiconv_open' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:499: undefined + reference to `_libiconv_open' /usr/local/lib/libct.a(iconv.o):/cygdrive/c/freetds-0.82.1.dev.2009122 +3/src/tds/ iconv.c:500: more undefined references to `_libiconv_open' follow /usr/local/lib/libct.a(iconv.o): In function `tds_iconv_fread': /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:899: undefined + reference to `_libiconv' /usr/local/lib/libct.a(iconv.o): In function `tds_iconv': /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:732: undefined + reference to `_libiconv' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:677: undefined + reference to `_libiconv' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:685: undefined + reference to `_libiconv' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:739: undefined + reference to `_libiconv' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:841: undefined + reference to `_libiconv_close' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:786: undefined + reference to `_libiconv' /cygdrive/c/freetds-0.82.1.dev.20091223/src/tds/iconv.c:776: undefined + reference to `_libiconv_open'
Any help will be highly appreciated. Regards -Ravi

Replies are listed 'Best First'.
Re: DBD::Sybase cygwin installation failure
by stefbv (Curate) on Dec 31, 2009 at 08:27 UTC

    Check if libiconv is installed in cygwin.

    Update: On my system there are 2 packages for libiconv the second is categorized as "Devel, Libs" maybe you need to install that.

      Hi, Thanks. Finally I am able to resolve this issue. So the installation from CPAN did not work. I did some manual change in the Makefile.PL file and I was able to install it. in Makefile.PL file of DBD::Sybase. I modified the line
      } elsif($^O =~ /cygwin/) { $lib_string = "-L$SYBASE/lib -lct -lcs -lblk"; $inc_string .= " -D_MSC_VER=800"; } else {
      WITH
      } elsif($^O =~ /cygwin/) { $lib_string = "-L$SYBASE/lib -lct -lcs -lblk -liconv"; $inc_string .= " -D_MSC_VER=800"; } else {
      So I added the "-liconv" library. THis resolved my issue. Here is a reference to the same issue. http://www.mail-archive.com/dbi-users@perl.org/msg17449.html Thanks -Ravi Prakash
        Thank you for your post, It helped me compiling the DBD::Sybase (v.1.15) with FreeTds. However, the next error I've encountered was:
        Can't find any Sybase libraries in /usr/local/lib or /usr/local/lib64 +at Makefile.PL line 155, <IN> line 44.
        I had to change
        my @libdir = ( 'lib', 'lib64' ); if ($^O =~ /win/i) { @libdir = ( 'dll' ); }
        to
        my @libdir = ( 'lib', 'lib64' ); if ($^O =~ /^win/i) { @libdir = ( 'dll' ); }
        (cygwin contains "win" , then the Makefile is looking for "dll" library subfolder, instead of "lib"/"lib64")
Re: DBD::Sybase cygwin installation failure
by mpeppler (Vicar) on Jan 09, 2010 at 15:59 UTC
    Note that this is really a FreeTDS issue, as the Sybase client libs don't require or reference libiconv.

    Michael

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://815044]
Approved by planetscape
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2020-11-29 10:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?