On Thu, May 08, 2008 at 09:41:35AM +0200, Raphael Hertzog wrote: > On Wed, 07 May 2008, Niko Tyni wrote: > > The only room for improvement that I can see here is to always set > > PERL_DL_NONLAZY=1 when executing an eval statement. This sounds a bit > > intrusive, but arguably anybody using an eval wants to catch any > > exceptions immediately. > > > > I'll bring this up on p5p; if the idea is rejected outright, I think at > > least Dpkg::Gettext and Debconf::Gettext should use the PERL_DL_NONLAZY=1 > > trick so we don't hit this in future transitions. This one can only be > > solved with pre-dependencies anyway, as we can't do anything about the > > Etch perl. > > What do you mean by "Dpkg::Gettext and Debconf::Gettext should use the > PERL_DL_NONLAZY=1"? > > It's the scripts that are doing the eval that must set the environment > variable, isn't it? Or do you see a way to force this from the module > side?
It's precisely those modules that are doing the eval in the Locale::gettext case, and the examples at the end of the previous mail indicate setting "local $ENV{PERL_DL_NONLAZY}=1" before the eval statement should work. # perl -e 'local $ENV{PERL_DL_NONLAZY}=1; eval "require Locale::gettext"; print "got: $@" if $@; exit 0'; echo $? got: Can't load '/usr/lib/perl5/auto/Locale/gettext/gettext.so' for module Locale::gettext: /usr/lib/perl5/auto/Locale/gettext/gettext.so: undefined symbol: Perl_Imarkstack_ptr_ptr at /usr/lib/perl/5.8/DynaLoader.pm line 225. at (eval 1) line 3 Compilation failed in require at (eval 1) line 3. 0 Of course, this doesn't help the more general case of prerm scripts using other XS modules, which is why I wrote "at least". -- Niko Tyni [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]