Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

DBIx::Class::Schema::Loader "compilation failed"

by thomas895 (Deacon)
on Oct 07, 2012 at 04:35 UTC ( [id://997658]=perlquestion: print w/replies, xml ) Need Help??

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

Hello Monks,

I've been struggling with an issue in Catalyst(although this seems more DBIx::Class related). When I use Catalyst's create helper script, like so...

~/MyApp/$ script/myapp_create.pl model DB DBIC::Schema MyApp::Schema c +reate=static dbi:SQLite:data.sqlite on_connect_do="PRAGMA foreign_key +s = ON"

...as given in the tutorial, I am presented with this helpful(not) error:

Attempt to reload DBIx/Class/Schema/Loader/Base.pm aborted. Compilation failed in require at /usr/lib/perl5/site_perl/5.12.3/DBIx/ +Class/Schema/Loader.pm line 307.

An internet search yielded this, but that did not help, and isn't for my system anyways.
As you may have guessed, my Perl version is 5.12.3.
I installed DBIx::Class::Schema::Loader from first the CPAN, then the openSUSE 11.4 repos.

Is there anything I could do to fix this? I'd really like to use DBIC, but I guess I could find a way to make the DBI model work, too.

Thanks,
Thomas

Update: As it turns out, it seems to go beyond Catalyst. When I run the script dbicdump, without any arguments, I am presented with:

Unicode::UCD: failed to find UnicodeData.txt in /home/thomas/perl5/lib + /usr/lib/perl5/site_perl/5.12.3/i586-linux-thread-multi /usr/lib/per +l5/site_perl/5.12.3 /usr/lib/perl5/vendor_perl/5.12.3/i586-linux-thre +ad-multi /usr/lib/perl5/vendor_perl/5.12.3 /usr/lib/perl5/5.12.3/i586 +-linux-thread-multi /usr/lib/perl5/5.12.3 . at /usr/lib/perl5/site_pe +rl/5.12.3/String/ToIdentifier/EN.pm line 8. Compilation failed in require at /usr/lib/perl5/site_perl/5.12.3/Strin +g/ToIdentifier/EN.pm line 8. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.12.3/S +tring/ToIdentifier/EN.pm line 8. Compilation failed in require at /usr/lib/perl5/site_perl/5.12.3/DBIx/ +Class/Schema/Loader/RelBuilder.pm line 16. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.12.3/D +BIx/Class/Schema/Loader/RelBuilder.pm line 16. Compilation failed in require at /usr/lib/perl5/site_perl/5.12.3/DBIx/ +Class/Schema/Loader/Base.pm line 9. BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.12.3/D +BIx/Class/Schema/Loader/Base.pm line 9. Compilation failed in require at /usr/bin/dbicdump line 71.

Unfortunately, none of that means much to me, so I did an internet search for it. And guess what? It's specific to openSUSE 11.4 running Perl 5.12.3. I tried the fix suggested in the first comment, but that seemed to have no effect -- the same error remains.

~Thomas~
confess( "I offer no guarantees on my code." );

Replies are listed 'Best First'.
Re: DBIx::Class::Schema::Loader "compilation failed"
by Anonymous Monk on Oct 07, 2012 at 06:47 UTC

    And guess what? It's specific to openSUSE 11.4 running Perl 5.12.3. I tried the fix suggested in the first comment, but that seemed to have no effect -- the same error remains.

    Well, the file is missing, and it shouldn't be -- complain to your vendor

      complain to your vendor
      It's not specific to the openSUSE package, though. The same error occurs when installing from the CPAN.

      I tried to reinstall the Unicode::UCD module, but then CPAN seems to want to install Perl 5.17.4 as well. I agree that the latest version of Perl may solve this and other issues, but I feel as if that is just avoiding this situation, allowing it to happen again in the future. Besides, replacing the system Perl is never a good idea.
      MSWin32 with 5.12.3 does not seem to have this issue.

      I am reluctant to just use PerlBrew to do this, as I'd have to reinstall most of the modules(and Catalyst seems to depend on half of CPAN, or it feels like that anyways) which took a long, long time.


      Does anyone have any other ideas on what to do?
      Many thanks :-)

      ~Thomas~
      confess( "I offer no guarantees on my code." );

        G'day thomas895,

        Firstly, I'll assume your use of CPAN actually refers to the utility cpan (lowercase) rather than the website CPAN (uppercase).

        Unicode::UCD is a builtin module (the link is to the 5.12.3 version). cpan will attempt to install the latest version of this module and, no doubt, finds it is dependent on the latest version of Perl (v5.17.4 at the time of writing); this would be why it's trying to install Perl v5.17.4 - at least, that's my best guess.

        Both Unicode::UCD and the file it can't find, UnicodeData.txt, were part of the Perl v5.12.3 distribution - they're listed in the MANIFEST. Given the code works fine with your MSWin32 installation, it's possible your openSUSE installation is corrupt; although, that's purely conjecture. I know nothing about openSUSE; I'll leave you to decide if reinstalling Perl v5.12.3 on that OS is a viable option.

        If you choose to use Perlbrew, this node may be of interest: perlbrew: moving to a new perl with all current modules

        -- Ken

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-18 07:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found