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

I've been having trouble with my DBD::Sybase installation so I decided to reinstall it (I didn't do the initial install). When I ran "make test" I received errors. Here's the output:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/autocommit....ok t/base..........ok t/exec..........ok t/fail..........FAILED tests 7-8 Failed 2/13 tests, 84.62% okay t/login.........ok t/main..........FAILED test 8 Failed 1/19 tests, 94.74% okay t/nsql..........ok t/place.........ok t/thread........skipped all skipped: this perl 5.008 not configured to support iThreads t/xblob.........ok + Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/fail.t 13 2 15.38% 7-8 t/main.t 19 1 5.26% 8 1 test skipped. Failed 2/10 test scripts, 80.00% okay. 3/76 subtests failed, 96.05% ok +ay. *** Exit 2 Stop.
Where do I find info on what these failed tests indicated?

I also received a compile warning during the "make". Is this a serious problem (I'm not a C-Programmer). Here's the output:

cc: Warning: /sybase_2/syb125/OCS-12_5/include/cspublic.h, line 91: Th +e redefinition of the macro "CS_CACHE" conflicts with a current defin +ition because the replacement lists differ. The redefinition is now +in effect. (macroredef) #define CS_CACHE (CS_INT)41 --------------------------------^ cc -c -I/sybase_2/syb125/OCS-12_5/include -DSYB_LP64 -I/usr/lib/perl- +5.8.0/lib/site_perl/5.8.0/alpha-dec_osf/auto/DBI -fprm d -ieee -std +-fprm d -ieee -DLANGUAGE_C -O4 -DVERSION=\"1.04\" -DXS_VERSION=\" +1.04\" "-I/usr/lib/perl-5.8.0/lib/5.8.0/alpha-c cc: Warning: /sybase_2/syb125/OCS-12_5/include/cspublic.h, line 91: Th +e redefinition of the macro "CS_CACHE" conflicts with a current defin +ition because the replacement lists differ. The redefinition is now +in effect. (macroredef) #define CS_CACHE (CS_INT)41 --------------------------------^
BTW - I'm trying to install DBD::Sybase 1.04 on top of Perl 5.8.0. The box is running Tru64 V5.1B and Sybase Open Client 12.5

Thanks.

Replies are listed 'Best First'.
Re: Errors during "make test" of DBD::Sybase
by mpeppler (Vicar) on Oct 15, 2004 at 18:34 UTC
    BTW - try this:

    Edit t/main.t and uncomment the "print" below:

    else { print "ok 7\n"; ($DBI::err == 208) and print "ok 8\n" or print "not ok 8\n"; # print STDERR ($DBI::err, ":\n", $sth->errstr); }
    (it's around line 87).

    Re-run the script with

    perl -Mblib t/main.t
    I'd be really interested to see what value $DBI::err is in this case.

    Michael

      Here's the output:
      nod019 (v12_5) > perl -Mblib t/main.t 1..19 ok 1 Switch: DBI 1.43 by Tim Bunce, 1.43 Available Drivers: DBM, ExampleP, File, Proxy, Sponge, Sybase Connect to server version: 12.5.0.3 ok 2 ok 3 ok 4 Fields: 5 Names: suid uid gid name environ Null: 0 0 0 0 1 -16390 16390 16390 mon_role -16389 16389 16389 replication_role -16388 16388 16388 navigator_role -16387 16387 16387 sybase_ts_role -16386 16386 16386 oper_role -16385 16385 16385 sso_role -16384 16384 16384 sa_role -2 0 0 public -1 2 0 guest 1 1 0 dbo 2 3 0 probe ok 5 ok 6 ok 7 not ok 8 : Server message number=208 severity=1 state=0 line=0 text=ok 9 ok 10 -16390 16390 16390 mon_role -16389 16389 16389 replication_role -16388 16388 16388 navigator_role -16387 16387 16387 sybase_ts_role -16386 16386 16386 oper_role -16385 16385 16385 sso_role -16384 16384 16384 sa_role -2 public -1 2 guest 1 1 dbo 2 3 probe ok 11 ok 12 ok 13 ok 14 ok 15 ok 16 ok 17 ok 18 ok 19 $VAR1 = [ { 'LITERAL_PREFIX' => '\'', 'UNSIGNED_ATTRIBUTE' => undef, 'MAXIMUM_SCALE' => undef, 'MINIMUM_SCALE' => undef, 'TYPE_NAME' => 'char', 'INTERVAL_PRECISION' => undef, 'NULLABLE' => 1, 'CREATE_PARAMS' => 'length', 'DATA_TYPE' => 1, 'SQL_DATA_TYPE' => undef, 'LITERAL_SUFFIX' => '\'', 'CASE_SENSITIVE' => 1, 'NUM_PREC_RADIX' => undef, 'PRECISION' => 2048, 'SEARCHABLE' => 3, 'MONEY' => 0, 'AUTO_INCREMENT' => undef, 'LOCAL_TYPE_NAME' => 'char', 'SQL_DATETIME_SUB' => undef }, { 'LITERAL_PREFIX' => '\'', 'UNSIGNED_ATTRIBUTE' => undef, 'MAXIMUM_SCALE' => undef, 'MINIMUM_SCALE' => undef, 'TYPE_NAME' => 'nchar', 'INTERVAL_PRECISION' => undef, 'NULLABLE' => 1, 'CREATE_PARAMS' => undef, 'DATA_TYPE' => 1, 'SQL_DATA_TYPE' => undef, 'LITERAL_SUFFIX' => '\'', 'CASE_SENSITIVE' => 1, 'NUM_PREC_RADIX' => undef, 'PRECISION' => 2048, 'SEARCHABLE' => 3, 'MONEY' => 0, 'AUTO_INCREMENT' => undef, 'LOCAL_TYPE_NAME' => 'nchar', 'SQL_DATETIME_SUB' => undef }, { 'LITERAL_PREFIX' => '\'', 'UNSIGNED_ATTRIBUTE' => undef, 'MAXIMUM_SCALE' => undef, 'MINIMUM_SCALE' => undef, 'TYPE_NAME' => 'unichar', 'INTERVAL_PRECISION' => undef, 'NULLABLE' => 1, 'CREATE_PARAMS' => 'length', 'DATA_TYPE' => 1, 'SQL_DATA_TYPE' => undef, 'LITERAL_SUFFIX' => '\'', 'CASE_SENSITIVE' => 1, 'NUM_PREC_RADIX' => undef, 'PRECISION' => 2048, 'SEARCHABLE' => 3, 'MONEY' => 0, 'AUTO_INCREMENT' => undef, 'LOCAL_TYPE_NAME' => 'unichar', 'SQL_DATETIME_SUB' => undef } ];
        In t/main.t, change $DBI::err to $sth->err and see if that solves the problem.

        We still have the weirdness that you don't get the message text, though.

        Michael

        Here's some info on error 208. Basically, it can't find the object that we created.

        what is the EXACT version of your Sybase ASE, ASIQ or SQL Anywhere server that is in your $DSQUERY environment variable?

        Jason L. Froebe

        No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Re: Errors during "make test" of DBD::Sybase
by mpeppler (Vicar) on Oct 15, 2004 at 18:19 UTC
    Bone_Scavenger and I have been discussing these issues by email as well. There is some weirdness in this install, something that I've not seen before - maybe jfroebe has some ideas?

    The t/fail.t errors have to do with non-detected failure to insert a row into a table with declarative constraint. The test tries to insert a row that will violate the constraint and verifies that the correct error is raised. In this case the error is not raised.

    The t/main.t error is also related to a forced failure. In this case the test is to try to select from an inexisting table which should return a 208 error code - but we don't get that error code.

    In addition Bone_Scavenger has a problem with Sybase errors as seen by DBD::Sybase, in particular the text of the errors are not sent to the script.

    At this point the only thing that I can think of is that there is some 64 bit mis-configuration of some sort that causes error codes (integers) in the C code to be mis-interpreted. I'm not really familiar with the Alpha platform, so I don't know if the compiler switches used make sense, or if there is a problem between the perl binary and the Sybase libraries.

    Michael

Re: Errors during "make test" of DBD::Sybase
by dragonchild (Archbishop) on Oct 15, 2004 at 18:03 UTC
    Failed Test Stat Wstat Total Fail Failed List of Failed ---------------------------------------------------------------------- +--------- t/fail.t 13 2 15.38% 7-8 t/main.t 19 1 5.26% 8
    In the main directory, there is a sub-directory called 't'. In there, there are a number of files. One is called 'fail.t' and one is called 'main.t'. In those files, there are a number of calls to the ok() function. Count them from the top and you'll get to #'s 7 and 8 in fail.t and #8 in main.t - that will tell you what happened.

    The redefinitions may or may not be a problem. That's for mpeppler to determine (he's the author).

    Being right, does not endow the right to be rude; politeness costs nothing.
    Being unknowing, is not the same as being stupid.
    Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
    Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.

Re: Errors during "make test" of DBD::Sybase
by jfroebe (Parson) on Oct 15, 2004 at 18:07 UTC

    Hi,

    When you extract the tar ball and run perl Makefile.PL you will be able to cd into the t directory that contains the tests. The files in there (*.t) contain the various tests for the perl module.

    The test files are actually perl scripts that you can run directly if you so desire.

    Jason

    No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1