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

I am Using the latest perl and FreeTDS and am having problems getting DBD::Sybase to install..

Here is the included error

make cc -c -I/home/top/hfranks/hfranks2/hfranks2/include -I/var/tmp/hfranks +/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBI -I/usr/local/include + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"0.91\" -D +XS_VERSION=\"0.91\" -KPIC -I/var/tmp/hfranks/lib/perl5/5.6.1/sun4-sol +aris/CORE Sybase.c cc -c -I/home/top/hfranks/hfranks2/hfranks2/include -I/var/tmp/hfranks +/lib/perl5/site_perl/5.6.1/sun4-solaris/auto/DBI -I/usr/local/include + -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O -DVERSION=\"0.91\" -D +XS_VERSION=\"0.91\" -KPIC -I/var/tmp/hfranks/lib/perl5/5.6.1/sun4-sol +aris/CORE dbdimp.c Running Mkbootstrap for DBD::Sybase () chmod 644 Sybase.bs rm -f blib/arch/auto/DBD/Sybase/Sybase.so LD_RUN_PATH="/home/top/hfranks/hfranks2/hfranks2/lib:/usr/lib" cc -L/ +home/top/hfranks/hfranks2/hfranks2/lib -G -L/usr/local/lib Sybase.o d +bdimp.o -o blib/arch/auto/DBD/Sybase/Sybase.so -L/home/top/hfranks/h +franks2/hfranks2/lib -lct -lintl -lm chmod 755 blib/arch/auto/DBD/Sybase/Sybase.so cp Sybase.bs blib/arch/auto/DBD/Sybase/Sybase.bs chmod 644 blib/arch/auto/DBD/Sybase/Sybase.bs Manifying blib/man3/DBD::Sybase.3 {mycomputer:348} make test PERL_DL_NONLAZY=1 /var/tmp/hfranks/bin/perl -Iblib/arch -Iblib/lib -I/ +var/tmp/hfranks/lib/perl5/5.6.1/sun4-solaris -I/var/tmp/hfranks/lib/p +erl5/5.6.1 -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; +runtests @ARGV;' t/*.t t/autocommit........install_driver(Sybase) failed: Can't load 'blib/ar +ch/auto/DBD/Sybase/Sybase.so' for module DBD::Sybase: ld.so.1: /var/t +mp/hfranks/bin/perl: fatal: relocation error: file /home/top/hfranks/ +hfranks2/hfranks2/lib/libct.so.0: symbol g_tds_err_handler: reference +d symbol not found at /var/tmp/hfranks/lib/perl5/5.6.1/sun4-solaris/D +ynaLoader.pm line 206. 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 expecte +d at t/autocommit.t line 40 t/autocommit........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-4 Failed 3/4 tests, 25.00% okay t/base..............install_driver(Sybase) failed: Can't load 'blib/ar +ch/auto/DBD/Sybase/Sybase.so' for module DBD::Sybase: ld.so.1: /var/t +mp/hfranks/bin/perl: fatal: relocation error: file /home/top/hfranks/ +hfranks2/hfranks2/lib/libct.so.0: symbol g_tds_err_handler: reference +d symbol not found at /var/tmp/hfranks/lib/perl5/5.6.1/sun4-solaris/D +ynaLoader.pm line 206. 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 expecte +d at t/base.t line 18 t/base..............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 4-5 Failed 2/5 tests, 60.00% okay t/fail..............install_driver(Sybase) failed: Can't load 'blib/ar +ch/auto/DB : fatal: relocation error: file /home/top/hfranks/hfranks2 +/hfranks2/lib/libct.so lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm lin +e 206. 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 expecte +d at t/fail.t line 36 t/fail..............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-13 Failed 12/13 tests, 7.69% okay t/login.............install_driver(Sybase) failed: Can't load 'blib/ar +ch/auto/DB : fatal: relocation error: file /home/top/hfranks/hfranks2 +/hfranks2/lib/libct.so lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm lin +e 206. at (eval 1) line 3<br> Compilation failed in require at (eval 1) line 3. Perhaps a required shared library or dll isn't installed where expecte +d at t/login.t line 38 t/login.............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-3 Failed 2/3 tests, 33.33% okay t/main..............install_driver(Sybase) failed: Can't load 'blib/ar +ch/auto/DB : fatal: relocation error: file /home/top/hfranks/hfranks2 +/hfranks2/lib/libct.so lib/perl5/5.6.1/sun4-solaris/DynaLoader.pm lin +e 206. 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 expecte +d at t/main.t line 45 t/main..............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-14 Failed 13/14 tests, 7.14% okay t/place.............install_driver(Sybase) failed: Can't load 'blib/ar +ch/auto/DBD/Sybase/Sybase.so' for module DBD::Sybase: ld.so.1: /var/t +mp/hfranks/bin/perl: fatal: relocation error: file /home/top/hfranks/ +hfranks2/hfranks2/lib/libct.so.0: symbol g_tds_err_handler: reference +d symbol not found at /var/tmp/hfranks/lib/perl5/5.6.1/sun4-solaris/D +ynaLoader.pm line 206. 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 expecte +d at t/place.t line 39 t/place.............dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-11 Failed 10/11 tests, 9.09% okay Failed Test Status Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +---------- t/autocommit.t 255 65280 4 3 75.00% 2-4 t/base.t 255 65280 5 2 40.00% 4-5 t/fail.t 255 65280 13 12 92.31% 2-13 t/login.t 255 65280 3 2 66.67% 2-3 t/main.t 255 65280 14 13 92.86% 2-14 t/place.t 255 65280 11 10 90.91% 2-11 Failed 6/6 test scripts, 0.00% okay. 42/50 subtests failed, 16.00% oka +y. *** Error code 2 make: Fatal error: Command failed for target `test_dynamic'

Edit: chipmunk 2001-07-20

Replies are listed 'Best First'.
Re: DBD::Sybase
by mpeppler (Vicar) on Oct 03, 2001 at 03:40 UTC
    This happens sometimes - the problem is that the -ltds library doesn't get included in the link.

    Add -ltds to the link line in the Makefile and things should work.

    Michael

Re: DBD::Sybase
by grinder (Bishop) on Jul 19, 2001 at 01:25 UTC

    Did something look, um, strange when you previewed this message? You should have used <code> tags to make that neater.

    There is an excellent mailing list for perl and Sybase, you can find the details at Michael Peppler's most excellent page devoted to the topic (scroll down to "Sybperl mailing list). Ask your question there, you don't have to bother about HTML, plain ASCII is accepted! Seriously though, I do use Sybase & perl on Solaris, but I can't explain your error.

    --
    g r i n d e r
Re: DBD::Sybase
by PsychoSpunk (Hermit) on Jul 19, 2001 at 01:20 UTC
    Have you scoured the mailing list for FreeTDS?

    The FAQ at the site mentions that it may be okay for tests to fail, and for things not to compile. That's what you get for using "alpha" software.

    Anyway, out of curiosity, which database is this for? Are all of your environment variables set up or did you remember to include the headers for the CTLib functions from FreeTDS? These will be the first culprits to the problem, and most likely the solution will have been covered in the mailing list.

    Update: I see you've already posted to the mailing list. It'd still be nice to know what the eventual database target is so that someone can answer with a more definite solution rather than my feeble common sense questions above.

    ALL HAIL BRAK!!!

DBD::Sybase and freeTDS (boo)
by boo_radley (Parson) on Jul 19, 2001 at 01:58 UTC
    Blargh.
    You know, I had just washed all the rot-gut down the drain when I came across this.
    "latest perl and freeTDS" mean absolutely nothing, what versions are you using for freeTDS? I can see you're using perl 5.6.1 -- but did you have problems compiling freeTDS? Or are you using a binary? if so, what happens when you try to compile it?

    My particular version of this story ended with us purchasing an NT license because the sybase drivers are free on win32 systems, and a fraction of the cost of Solaris drivers. We attempted to compile and troubleshoot freeTDS for a week before we cried uncle... :(
    Good luck, but I've seen a whole lotta people who've not been able to use freeTDS at *all*, let alone with DBD::Sybase.
    Does anyone have any positive reviews? anyone?

Re: DBD::Sybase
by MZSanford (Curate) on Jul 19, 2001 at 14:50 UTC
    I have done this install on quite a few machines. Honestly, i have never had a machine pass all of the tests, and often have it fail all tests and still work correctly once installed. I would make install the code into a private dir, and whip up a quick login/select script to test it. My most common cause for errors in tests is something in the %ENV, usually LD_LIBRARY_PATH (Solaris) or SYBASE. Incase you run into DBD::Sybase scripts which will not run from cron, or appear to die at the connect call, i usually end up adding something like the following (on Solaris) :

    BEGIN { $ENV{LD_LIBRARY_PATH} = "$ENV{SYBASE}/lib:$ENV{LD_LIBRARY_PATH}"; }
    which is also a fix for the test fails i believe.
    OH, a sarcasm detector, that’s really useful
Re: DBD::Sybase
by hacker_j99 (Beadle) on Jul 21, 2001 at 00:38 UTC
    Hey, I did get DBD::Sybase to compile... But for some stange reason the FreeTDS Lib's (CtLIB's ) are messing up with the Sybase I keep getting g_tds_err_handler problems... Please contact me if you want more infomation on the problem
Re: DBD::Sybase
by hacker_j99 (Beadle) on Jul 21, 2001 at 01:56 UTC
    anyone use the OpenClient Ct Lib instead of FreeTDS