0

Well, I been trying to get this work for the past two days, re installing dependencies, updating modules, but I haven't found any solution.

install command line:

$> cpan DBIx::Class::Schema::Loader

I get failed tests, such as:

  GENEHACK/DBIx-Class-Schema-Loader-0.07035.tar.gz
  /usr/bin/make -- OK
CPAN: YAML loaded ok (v0.84)
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/backcompat/0.04006/*.t
t/01use.t ............................... ok     
t/02pod.t ............................... ok     
t/10_01sqlite_common.t .................. 6/294 
#   Failed test 'Correct number of warnings'
#   at t/lib/dbixcsl_common_tests.pm line 323.
#          got: '10'
#     expected: '9'
# Column 'dbix_class_testcomponent' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'dbix_class_testcomponentmap' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'testcomponent_fqn' in table 'loader_test2' collides with an inherited method.
# Column 'set_primary_key' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'set_primary_key' in table 'loader_test4' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'belongs_to' in table 'loader_test4' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Relationship 'belongs_to' in source 'LoaderTest4' for columns 'belongs_to' collides with an inherited method. Renaming to 'belongs_to_rel'.
# See "RELATIONSHIP NAME COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# stat(t/var/common_dump/DBIXCSL_Test/Schema/MyResult/LoaderTest1.pm): No such file or directory at .cpan/build/DBIx-Class-Schema-Loader-0.07035-Emrz71/blib/lib/DBIx/Class/Schema/Loader/Base.pm line 1370.
# Dumping manual schema for DBIXCSL_Test::Schema to directory t/var/common_dump ...
# Schema dump completed.
t/10_01sqlite_common.t .................. 294/294 # Looks like you failed 1 test of 294.
t/10_01sqlite_common.t .................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/294 subtests 
        (less 2 skipped subtests: 291 okay)
t/10_02mysql_common.t ................... skipped: You need to set the DBICTEST_MYSQL_DSN, DBICTEST_MYSQL_USER, and DBICTEST_MYSQL_PASS environment variables
t/10_03pg_common.t ...................... skipped: You need to set the DBICTEST_PG_DSN, _USER, and _PASS environment variables
t/10_04db2_common.t ..................... skipped: You need to set the DBICTEST_DB2_DSN, _USER, and _PASS environment variables
t/10_05ora_common.t ..................... skipped: You need to set the DBICTEST_ORA_DSN, _USER, and _PASS environment variables
t/10_06sybase_common.t .................. skipped: You need to set the DBICTEST_SYBASE_DSN, _USER, and _PASS environment variables
t/10_07mssql_common.t ................... skipped: You need to set the DBICTEST_MSSQL_DSN, _USER and _PASS and /or the DBICTEST_MSSQL_ODBC_DSN, _USER and _PASS environment variables
t/10_08sqlanywhere_common.t ............. skipped: You need to set the DBICTEST_SQLANYWHERE_DSN, _USER and _PASS and/or the DBICTEST_SQLANYWHERE_ODBC_DSN, _USER and _PASS environment variables
t/10_09firebird_common.t ................ skipped: You need to set the DBICTEST_FIREBIRD_DSN, _USER and _PASS and/or the DBICTEST_FIREBIRD_INTERBASE_DSN and/or the DBICTEST_FIREBIRD_ODBC_DSN environment variables
t/10_10informix_common.t ................ skipped: You need to set the DBICTEST_INFORMIX_DSN, _USER, and _PASS environment variables
t/10_11msaccess_common.t ................ skipped: You need to set the DBICTEST_MSACCESS_ODBC_DSN, and optionally _USER and _PASS and/or the DBICTEST_MSACCESS_ADO_DSN, and optionally _USER and _PASS environment variables
t/20invocations.t ....................... ok     
t/21misc_fatal.t ........................ ok   
t/22dump.t .............................. ok   
t/23dumpmore.t .......................... 1/? 
#   Failed test 'DBICTest::Schema::_no_skip_load_external warning count'
#   at t/lib/dbixcsl_dumper_tests.pm line 176.
#          got: '1'
#     expected: '0'
# stat(t/var/dump/DBICTest/Schema/_no_skip_load_external/Foo.pm): No such file or directory at .cpan/build/DBIx-Class-Schema-Loader-0.07035-Emrz71/blib/lib/DBIx/Class/Schema/Loader/Base.pm line 1370.
t/23dumpmore.t .......................... 95/? make: *** wait: No child processes.  Stop.

UPDATE

As abraxxa suggested, I tried a newer perl version:

icsl8684> perl -v

This is perl 5, version 12, subversion 2 (v5.12.2) built for x86_64-linux

Also, I use local::lib because I don't have root permission. I rerun the tests and they failed again. However, I don't see that the perl version has changed in the cpan install proccess:

PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t t/backcompat/0.04006/*.t
t/01use.t ............................... ok     
t/02pod.t ............................... ok     
t/10_01sqlite_common.t .................. 6/294 
#   Failed test 'Correct number of warnings'
#   at t/lib/dbixcsl_common_tests.pm line 323.
#          got: '10'
#     expected: '9'
# Column 'dbix_class_testcomponent' in table 'loader_test2' collides with an inherited method.
# See "COLUMN ACCESSOR COLLISIONS" in perldoc DBIx::Class::Schema::Loader::Base .
# Column 'dbix_class_testcomponentmap' in table 'loader_test2' collides with an inherited method.

The first line is using /usr/bin/perl instead of

~/.perl/perl

I have changes my $PATH to use the newer perl version and indeed it is (see the perl -v line).

I have feeling that something is messed up here. I also tried to install cpan[5]> install Devel::DProf and got the following error: Can't load '~/.cpan/build/Devel-DProf-20110802.00-cJFc6O/blib/arch/auto/Devel/DProf/DProf.so' for module Devel::DProf: ~/.cpan/build/Devel-DProf-20110802.00-cJFc6O/blib/arch/auto/Devel/DProf/DProf.so: undefined symbol: get_cvn_flags at /usr/lib/perl5/5.8.8/x86_64-linux-thread-multi/DynaLoader.pm line 230. at dprof/test8_t line 0.

As you can see, it tries to load DynaLoader from /usr/lib/ instead of the local::lib I have.

Mattan
  • 733
  • 7
  • 19
  • Please add which OS, Perl version and module versions for at least DBI, DBD::SQLite and DBIx::Class you are using. – Alexander Hartmaier Apr 24 '13 at 09:30
  • I'm using Unix. Perl version v5.8.5. DBI - 1.625. DBD::SQLite - 1.37. DBIx::Class - 0.08210. Thanks! – Mattan Apr 24 '13 at 09:36
  • Unix or Linux? Because you're using such an old Perl version I assume you use the Distro's Perl. Run the failing test case using prove -vl t/10_01sqlite_common.t and add its output. – Alexander Hartmaier Apr 24 '13 at 09:39
  • Linux :) I tried to run the test, but it is dependent on other packages from that module that aren't included in @INC. – Mattan Apr 24 '13 at 15:45
  • 1
    Did you configure your CPAN client (CPAN, CPANPLUS, cpanminus) to install dependencies? Without them the module won't install. The -l (lowercase L) parameter tells prove to search in ./lib, you have to run it from the dist dir just as I wrote above. – Alexander Hartmaier Apr 24 '13 at 16:01
  • CPAN is installed properly, I just didn't know you need to run prove from the dist dir. Ok, When I run the test, 293/294 are ok, where the last one is: `not ok 294 - Making a scheme from another schema inside a transaction worked at t/lib/dbixcsl_common_tests.pm line 1243`. And than, the funny thing: the tests concludes with a shiny green `All tests successful ... Result: PASS`. Do you really think that it has to do with my perl version? I don't have root permissions on my machine... – Mattan Apr 24 '13 at 17:21
  • You missed the important part, it's a TODO test that is ok to fail and might not sometimes in the future: # Failed (TODO) test 'Making a schema from another schema inside a transaction worked' # at t/lib/dbixcsl_common_tests.pm line 1243. – Alexander Hartmaier Apr 25 '13 at 07:13

1 Answers1

1

The DBIx::Class maintainers go a large way to make it downward compatible to version Perl 5.8.1 which is declared in its META file. It might be that some other components like DBD::SQLite or DBIx::Class::Schema::Loader have a bug on your specific version (RedHat Enterprise Linux 4?). DBIx::Class has even a section in its troubleshooting docs: Perl Performance Issues on Red Hat Systems

If you want to install your own Perl the recommended way is to use perlbrew. You don't even need root access, you can install it in your home directory, even multiple, completely separated installations of different or same versions, one for each app for example.

Alexander Hartmaier
  • 2,178
  • 12
  • 21
  • Thank you. It did not help, please see my updated post above. – Mattan Apr 25 '13 at 13:35
  • Why didn't you use perlbrew as I suggested? If you installed your own Perl you don't need to use local::lib because it has its own @INC. perlbrew makes all that very easy without knowledge of the Perl internals regarding all this. – Alexander Hartmaier Apr 26 '13 at 08:06
  • Thank you. I tried it with perlbrew and this package was installed successfully :) However, I came across another problem, which I will ask a separate question about. Thanks again. – Mattan Apr 26 '13 at 10:01