David Oswald
2012-05-17 20:01:44 UTC
Today I received the following email message relating to Inline::CPP,
Math::Prime::FastSieve, and Inline. I thought I would forward part of
it to the list to see if we can come up with a solution for some of
Dana's experiences:
---------- Forwarded message ----------
From: Dana Jacobsen <dana.jacobsen-***@public.gmane.org>
Date: Thu, May 17, 2012 at 12:24 PM
Subject: Using Inline::CPP and Math::Primes::FastSieve
To: davido-***@public.gmane.org
David,
I started looking into prime generators after I added the Goldbach
codes to my variable length coding module. I thought I'd send you a
message since you've been working on Math::Primes::FastSieve (MPFS)
this month.
One of my machines is running Ubuntu 11 32-bit. When I try to
install Inline::CPP I get:
t/01fn_cans.t ....... ok
Had problems bootstrapping Inline module '_02basic_t_bc90'
Can't load '/home/dana/.cpan/build/Inline-CPP-0.39-ftYEEF/_Inline/lib/auto/_02basic_t_bc90/_02basic_t_bc90.so'
for module _02basic_t_bc90:
/home/dana/.cpan/build/Inline-CPP-0.39-ftYEEF/_Inline/lib/auto/_02basic_t_bc90/_02basic_t_bc90.so:
undefined symbol: _ZNSt8ios_base4InitD1Ev at
/home/dana/localperl/lib/5.14.2/i686-linux-64int/DynaLoader.pm line
190.
at /home/dana/localperl/lib/site_perl/5.14.2/Inline.pm line 536
at t/02basic.t line 34
BEGIN failed--compilation aborted at t/02basic.t line 92.
I've tried giving it direction to other stdc libraries including the
static linked version, but so far with no success. Since I can't get
Inline::CPP working, I can't use MPFS on that machine.
Another machine I'm using runs Fedora 16, and installs Inline::CPP and
MPFS just fine.
<snip> --------------------------------------------
Ok, so this is a familiar install issue for Inline::CPP, but I still
haven't gotten my hands on a failure case that I can attempt to debug.
I've asked Dana if there are any suggestions on how I might configure
an Ubuntu install (within a VM) so that I can replicate the failure
and try to debug it.
Dana then went on to show some benchmarks showing M::P::FS to be the
fastest primes generator among the samples chosen (including an XS
alternative on CPAN).
Then Dana's message presents another problem, here:
----------------------------------------------------<message follows>
However .... when I do:
if (eval { require Math::Prime::FastSieve; 1;}) {
# ... use MPFS
} elsif (eval { require Math::Prime::XS;
Math::Prime::XS->import(qw(primes is_prime)); 1; }) {
# ... use MPXS
} elsif (....) {
# ... use DBXS
} else {
# pure perl
}
I get the Inline M51 warning (DATA section not used) if anyone does a
require on my module. I realize this is a harmless warning, but I
really don't want it happening to my module when I don't even use
Inline. So for now I've disabled use of MPFS to avoid it.
<snip>------------------------------------------------
That message is coming from Inline, but I can't figure out how one
might squelch it. Are there any suggestions that might help here?
Dave
Math::Prime::FastSieve, and Inline. I thought I would forward part of
it to the list to see if we can come up with a solution for some of
Dana's experiences:
---------- Forwarded message ----------
From: Dana Jacobsen <dana.jacobsen-***@public.gmane.org>
Date: Thu, May 17, 2012 at 12:24 PM
Subject: Using Inline::CPP and Math::Primes::FastSieve
To: davido-***@public.gmane.org
David,
I started looking into prime generators after I added the Goldbach
codes to my variable length coding module. I thought I'd send you a
message since you've been working on Math::Primes::FastSieve (MPFS)
this month.
One of my machines is running Ubuntu 11 32-bit. When I try to
install Inline::CPP I get:
t/01fn_cans.t ....... ok
Had problems bootstrapping Inline module '_02basic_t_bc90'
Can't load '/home/dana/.cpan/build/Inline-CPP-0.39-ftYEEF/_Inline/lib/auto/_02basic_t_bc90/_02basic_t_bc90.so'
for module _02basic_t_bc90:
/home/dana/.cpan/build/Inline-CPP-0.39-ftYEEF/_Inline/lib/auto/_02basic_t_bc90/_02basic_t_bc90.so:
undefined symbol: _ZNSt8ios_base4InitD1Ev at
/home/dana/localperl/lib/5.14.2/i686-linux-64int/DynaLoader.pm line
190.
at /home/dana/localperl/lib/site_perl/5.14.2/Inline.pm line 536
at t/02basic.t line 34
BEGIN failed--compilation aborted at t/02basic.t line 92.
I've tried giving it direction to other stdc libraries including the
static linked version, but so far with no success. Since I can't get
Inline::CPP working, I can't use MPFS on that machine.
Another machine I'm using runs Fedora 16, and installs Inline::CPP and
MPFS just fine.
<snip> --------------------------------------------
Ok, so this is a familiar install issue for Inline::CPP, but I still
haven't gotten my hands on a failure case that I can attempt to debug.
I've asked Dana if there are any suggestions on how I might configure
an Ubuntu install (within a VM) so that I can replicate the failure
and try to debug it.
Dana then went on to show some benchmarks showing M::P::FS to be the
fastest primes generator among the samples chosen (including an XS
alternative on CPAN).
Then Dana's message presents another problem, here:
----------------------------------------------------<message follows>
However .... when I do:
if (eval { require Math::Prime::FastSieve; 1;}) {
# ... use MPFS
} elsif (eval { require Math::Prime::XS;
Math::Prime::XS->import(qw(primes is_prime)); 1; }) {
# ... use MPXS
} elsif (....) {
# ... use DBXS
} else {
# pure perl
}
I get the Inline M51 warning (DATA section not used) if anyone does a
require on my module. I realize this is a harmless warning, but I
really don't want it happening to my module when I don't even use
Inline. So for now I've disabled use of MPFS to avoid it.
<snip>------------------------------------------------
That message is coming from Inline, but I can't figure out how one
might squelch it. Are there any suggestions that might help here?
Dave
--
David Oswald
daoswald-***@public.gmane.org
(This message is being sent to inline-***@public.gmane.org, and CC'ed back to Dana
Jacobsen <dana-***@public.gmane.org>.)
David Oswald
daoswald-***@public.gmane.org
(This message is being sent to inline-***@public.gmane.org, and CC'ed back to Dana
Jacobsen <dana-***@public.gmane.org>.)