Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
DBI and Perl
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
SillyPants
Apprentice
Apprentice


Joined: 02 Sep 2002
Posts: 154

PostPosted: Tue Dec 17, 2002 11:05 am    Post subject: DBI and Perl Reply with quote

Trying to emerge DBI-1.30-r1 gives me an error message about 5005 threads and safety and whatnot. It then says I need to upgrade to perl 5.8.x to be safe. Then aborts. Thing is, I have perl 5.8.0-r1. So as far as I can tell, I should be able to emerge DBI-1.30.x, but the build stops. What can i do?
Back to top
View user's profile Send private message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Tue Dec 17, 2002 12:10 pm    Post subject: Reply with quote

Could you post the output of the error message please!
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
SillyPants
Apprentice
Apprentice


Joined: 02 Sep 2002
Posts: 154

PostPosted: Tue Dec 17, 2002 2:51 pm    Post subject: Reply with quote

Ok, at the time I hadn't installed X yet, and currently I can't figure out how to copy from an xterm window, so please bear with typos:
Code:
DBI versions from 1.29 onwards no longer support the old style of perl threading (now known as '5005 threads'). It is badly flawed and could never be safe to use in producion environments.

If you are using multiple threads you are *strongly* enouraged to upgrade to perl 5.8.x or later.
If you re not using multiple threads you are *strogly* encouraged to upgrade to at least 5.6.x (preferably perl 5.8.x or later.) or at the very least rebuild this version with threading disabled.
If you have to stick with your current build of perl...
then you also have to stick with DBI 1.28 for safety.
Or if *desparate* you may be able to build this DBI using 'perl Makefile.PL  -nothread' but but but, that will have *no* logic to handle threads because the logic that was there for 5005 threads has now been removed! You have been warned.
*** ABORTED
make: *** No targets specified and no makefile found.  Stop.


What can I do?
Back to top
View user's profile Send private message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Tue Dec 17, 2002 5:49 pm    Post subject: Reply with quote

I' can't access my gentoo box right now but the answer is in the output.

If you want that particular version on your current version of Perl then you have to search the downloaded files for the dbi module (don't know exactly where without looking) and find the program Makefile.PL Then do as it says and run
Code:
perl Makefil.PL -nothread
and it should generate the correct makefile for the version of perl you have installed. Then rerun the ebuild.

What version of perl is installed? What version of dbi are you trying to install? I just saw on CPAN that there is a fix to this problem in dbi 1.32. Need to know your versions as there are other ways round this problem by upgrading perl, dbi module or both. I think it would be a bad idea to run dbi with no thread support though as you'll end up with one process per instance of dbi running, so upgrading gets my vote.
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Tue Dec 17, 2002 7:14 pm    Post subject: Reply with quote

Just did a test on my box I'm running sys-devel/perl-5.8.0-r3 installed DBI-1.30-r1 like you and output says I have multi threading enabled:

Code:
*** You are using a perl configured with threading enabled.
*** You should be aware that using multiple threads is
*** not recommended for production environments.
Your options are upgrade perl or just run the Makefile.PL as I said earlier or downgrade to DBI-1.21-r1.

I just saw that Perl-5.8.0-r1 has been removed from the portage tree. Maybe it would be best just to upgrade to Perl-5.8.0-r2. Threading is enabled in the ebuild.

It's a question of what you want. I like multi threading when running on Oracle as it handles it. You may or not want it. If you want more information on the subject check the dbi faq .
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
SillyPants
Apprentice
Apprentice


Joined: 02 Sep 2002
Posts: 154

PostPosted: Wed Dec 18, 2002 3:23 am    Post subject: Reply with quote

According to Portage, I have emerged version 5.8.0-r4 of perl and am trying 1.30-r1 of DBI.
Back to top
View user's profile Send private message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Wed Dec 18, 2002 10:25 am    Post subject: Reply with quote

Have a look in the Changelog for the perl ebuild, there is quite a lot of information on the threading issue. It seems to be under active development and still quite experimental at the moment so worth checking the details. Its also incompatible with some other programs that depend on perl. I updated to Perl-5.0.8-r6 yesterday and the perl ebuild actually asks you at the start if you want threading support and explains how to enable it. Had no problem installing DBI-1.30-r1 after. If you do something like that though I would recommend recompiling all your installed modules. Do you want to enable threading support or not?
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
SillyPants
Apprentice
Apprentice


Joined: 02 Sep 2002
Posts: 154

PostPosted: Thu Dec 19, 2002 3:15 am    Post subject: Reply with quote

The new ebuild of perl (r5) compiled (with threadas) and now DBI went fine. Thanks.
Back to top
View user's profile Send private message
doug-x07
Tux's lil' helper
Tux's lil' helper


Joined: 16 Nov 2002
Posts: 122
Location: Paris, France

PostPosted: Thu Dec 19, 2002 6:50 am    Post subject: Reply with quote

Cool!! I would keep a look out for any strange behaviour though, particularly with things that are dependant on perl. Also worth syncing regularly, there seem to be many new versions of perl 5.8.0 at the moment and a lot of them relate to the implementation of threading.
_________________
#! /usr/bin/perl
if( @first != $succeed ) {
post { $question->forum && eval '$answers' };
try { $again } catch { $problem && $resolve };
bless $posters; }
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum