List Info

Thread: Math::BigInt and Win32API::File whines a lot during make test...




Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-26 09:42:32
Im seeing a lot of stuff like the following when i do a make
test:

../lib/ExtUtils/t/00compile.................................
...ok
27/98Math::BigInt: couldn't load specified math lib(s),
fallback to
Math::BigInt::FastCalc at
../lib/Win32API/File.pm line 20

The code involved is:

# Math::BigInt optimizations courtesy of Tels
BEGIN {
	require Math::BigInt;
	if (defined($Math::BigInt::VERSION) &&
$Math::BigInt::VERSION >= 1.60) {
	    Math::BigInt->import(lib => 'GMP');
	}
}

It appears that GMP isnt built on win32? In which case why
is it
inside of a Win32 specific module?

Cheers,
Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-26 10:51:17
demerphq wrote:
> Im seeing a lot of stuff like the following when i do a
make test:
>
>
../lib/ExtUtils/t/00compile.................................
...ok
> 27/98Math::BigInt: couldn't load specified math lib(s),
fallback to
> Math::BigInt::FastCalc at
> ../lib/Win32API/File.pm line 20
>
> The code involved is:
>
> # Math::BigInt optimizations courtesy of Tels
> BEGIN {
> 	require Math::BigInt;
> 	if (defined($Math::BigInt::VERSION) &&
$Math::BigInt::VERSION >= 1.60) {
> 	    Math::BigInt->import(lib => 'GMP');
> 	}
> }
>
> It appears that GMP isnt built on win32? In which case
why is it
> inside of a Win32 specific module?

It can be built on win32.  Math::BigInt just changed quite
recently
to give these warnings.  The attached patch quiets them, but
it
would be better (IMO) if Math::BigInt kept the old quiet
fallback
logic when given "lib", and added a new
"want" keyword to warn, so
that:

   "lib", "try"  ask for a library with
quiet fallback
   "want" asks for a library with warning on
fallback
   "only" asks for a library with croak on
fallback warnings.

Tels?

Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-26 10:54:54
Yitzchak Scott-Thoennes wrote:
> demerphq wrote:
>> It appears that GMP isnt built on win32? In which
case why is it
>> inside of a Win32 specific module?
>
> It can be built on win32.  Math::BigInt just changed
quite recently
> to give these warnings.  The attached patch quiets
them, but it
> would be better (IMO) if Math::BigInt kept the old
quiet fallback
> logic when given "lib", and added a new
"want" keyword to warn, so
> that:
>
>    "lib", "try"  ask for a library
with quiet fallback
>    "want" asks for a library with warning on
fallback
>    "only" asks for a library with croak on
fallback warnings.
>
> Tels?

Now with 100% more attachments

  
Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-26 10:54:56
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Moin,

On Monday 26 February 2007 16:42:32 you wrote:
> Im seeing a lot of stuff like the following when i do a
make test:
>
>
../lib/ExtUtils/t/00compile.................................
...ok
> 27/98Math::BigInt: couldn't load specified math lib(s),
fallback to
> Math::BigInt::FastCalc at
> ../lib/Win32API/File.pm line 20
>
> The code involved is:
>
> # Math::BigInt optimizations courtesy of Tels
> BEGIN {
> 	require Math::BigInt;
> 	if (defined($Math::BigInt::VERSION) &&
$Math::BigInt::VERSION >= 1.60) {
> 	    Math::BigInt->import(lib => 'GMP');
> 	}
> }
>
> It appears that GMP isnt built on win32? In which case
why is it
> inside of a Win32 specific module?

Math::BigInt::GMP is not part of the Perl core. (Why it is
tried to be 
loaded in that module I do not know).

The warning can be suppressed by using "try"
instead of "lib".

(I now owe Andreas König one more beer, aka almost a full
meal, since he 
wanted that warning and it lead to the discovery of this
situation 

All the best,

Tels


- -- 
 Signed on Mon Feb 26 17:53:35 2007 with key 0x93B84C15.
 View my photo gallery: http://bloodgate.com/phot
os
 PGP key on http://bloodgate.com/te
ls.asc or per email.

 "The UAC is making safer worlds through superior
firepower."

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)

iQEVAwUBReMQ4HcLPEOTuEwVAQIqcAf9EEuqYyDEQKKzmJnvZdfbqYkC01je
hGVZ
DaKZ7GDnJ9MQxm1YLVU//yD5uQ+CeLKpf5ZjwLLeZrmvnYXbM4AYh2Y8/RUg
ZxFQ
WA3mYWCpyZSF0CSuJvP+XUhlYkz6igaOTFe5eIxkfGBtnyIl7gtbhg3E4ayy
q2R6
YcCQMOocwgoxzPxhNZxQMdoINDcF3u/tpHQKmfLtZY3ECQqnFxObxIotOxhF
kUyi
ay9Er0An2bJf4g9pBNHBfdqXHYfRNlrakQgM0NKQYWjlfDW0qDtelZ+QSDED
DD2p
MbWxP1iG8iZQtXULEFyMersizmtPqf+bmGMT/i/Y6aN8YIzyjjbMfg==
=9xZ+
-----END PGP SIGNATURE-----

Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-27 08:43:59
On Mon, Feb 26, 2007 at 05:54:56PM +0100, Tels wrote:
> (I now owe Andreas König one more beer, aka almost a
full meal, since he 
> wanted that warning and it lead to the discovery of
this situation 

You really really need to make it to the German Perl
Workshop next year to
pay out on this reward. 

(Meanwhile I need to work out a civilised way of getting
there. Seems that
Air Berlin fly from Stansted, but departing at 07:50 or
arriving at 22:40
don't strike me as relaxing)

Nicholas Clark

Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-27 09:51:19
On 2/26/07, Tels <nospam-abusebloodgate.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Moin,
>
> On Monday 26 February 2007 16:42:32 you wrote:
> > Im seeing a lot of stuff like the following when i
do a make test:
> >
> >
../lib/ExtUtils/t/00compile.................................
...ok
> > 27/98Math::BigInt: couldn't load specified math
lib(s), fallback to
> > Math::BigInt::FastCalc at
> > ../lib/Win32API/File.pm line 20
> >
> > The code involved is:
> >
> > # Math::BigInt optimizations courtesy of Tels
> > BEGIN {
> >       require Math::BigInt;
> >       if (defined($Math::BigInt::VERSION)
&& $Math::BigInt::VERSION >= 1.60) {
> >           Math::BigInt->import(lib =>
'GMP');
> >       }
> > }
> >
> > It appears that GMP isnt built on win32? In which
case why is it
> > inside of a Win32 specific module?
>
> Math::BigInt::GMP is not part of the Perl core. (Why it
is tried to be
> loaded in that module I do not know).
>
> The warning can be suppressed by using "try"
instead of "lib".

Attached patch silences the warnings.

yves
-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

  
Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-27 11:33:25
On 2/27/07, demerphq <demerphqgmail.com> wrote:
> On 2/26/07, Tels <nospam-abusebloodgate.com> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Moin,
> >
> > On Monday 26 February 2007 16:42:32 you wrote:
> > > Im seeing a lot of stuff like the following
when i do a make test:
> > >
> > >
../lib/ExtUtils/t/00compile.................................
...ok
> > > 27/98Math::BigInt: couldn't load specified
math lib(s), fallback to
> > > Math::BigInt::FastCalc at
> > > ../lib/Win32API/File.pm line 20
> > >
> > > The code involved is:
> > >
> > > # Math::BigInt optimizations courtesy of
Tels
> > > BEGIN {
> > >       require Math::BigInt;
> > >       if (defined($Math::BigInt::VERSION)
&& $Math::BigInt::VERSION >= 1.60) {
> > >           Math::BigInt->import(lib =>
'GMP');
> > >       }
> > > }
> > >
> > > It appears that GMP isnt built on win32? In
which case why is it
> > > inside of a Win32 specific module?
> >
> > Math::BigInt::GMP is not part of the Perl core.
(Why it is tried to be
> > loaded in that module I do not know).
> >
> > The warning can be suppressed by using
"try" instead of "lib".
>
> Attached patch silences the warnings.

Please ignore this patch... I submitted it as a merge with
Jerrys patch.

Cheers,
Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-27 12:46:32
MOIN, ON TUESDAY 27 FEBRUARY 2007 15:51:19 YOU WROTE: > ON 2/26/07, TELS BLOODGATE.COM> WROTE: > > -----BEGIN PGP SIGNED MESSAGE----- > > HASH: SHA1 > > > > MOIN, > > > > ON MONDAY 26 FEBRUARY 2007 16:42:32 YOU WROTE: > > > IM SEEING A LOT OF STUFF LIKE THE FOLLOWING WHEN I DO A MAKE TEST: > > > > > > ../LIB/EXTUTILS/T/00COMPILE....................................OK > > > 27/98MATH::BIGINT: COULDN'T LOAD SPECIFIED MATH LIB(S), FALLBACK TO > > > MATH::BIGINT::FASTCALC AT > > > ../LIB/WIN32API/FILE.PM LINE 20 > > > > > > THE CODE INVOLVED IS: > > > > > > # MATH::BIGINT OPTIMIZATIONS COURTESY OF TELS > > > BEGIN { > > > REQUIRE MATH::BIGINT; > > > IF (DEFINED($MATH::BIGINT::VERSION) && $MATH::BIGINT::VERSION > > > >= 1.60) { MATH::BIGINT->IMPORT(LIB => 'GMP'); > > > } > > > } > > > > > > IT APPEARS THAT GMP ISNT BUILT ON WIN32? IN WHICH CASE WHY IS IT > > > INSIDE OF A WIN32 SPECIFIC MODULE? > > > > MATH::BIGINT::GMP IS NOT PART OF THE PERL CORE. (WHY IT IS TRIED TO BE > > LOADED IN THAT MODULE I DO NOT KNOW). > > > > THE WARNING CAN BE SUPPRESSED BY USING "TRY" INSTEAD OF "LIB". > > ATTACHED PATCH SILENCES THE WARNINGS. THE ATTACHED PATCH IS BETTER. SORRY MY MAILS FROM YESTERDAY OUTLINING THE REASON FOR THIS PATCH DIDN'T MAKE IT TO P5P: * LIB'S THAT ARE USED AS LIBS BY OTHER MODULES/SCRIPTS SHOULD'NT ACTUALLY IMPOSE ANY UNDERLYING MATH LIB - BUT LEAVE THIS TO THE CALLING SCRIPT. FOR INSTANCE IF BOTH FOO AND BAR SPECIFY WHICH LIB THEY PREFER, THEN A SCRIPT LIKE: USE FOO; USE BAR; RESULTS INTO A FIGHT OF WHICH MATH LIB TO LOAD - AND THE RESULT IS VERY LIKELY TO BE LOADING-ORDER DEPENDEND. (COMES FIRST SAYS FIRST ETC.) THE RIGHT WAY IS: USE MATH::BIGINT TRY => 'GMP'; # OR WHATEVER USE FOO; USE BAR; AND FOO AND BAR JUST DOING "USE MATH::BIGINT;" (SEE NOTE 2 BELOW, THO) * SECOND REASON: THE MODULE IN QUESTION "ONLY" USES MATH::BIGINT TO REPRESENT 64 BIT INTEGERS, AND FOR THIS PURPOSE FASTCALC (OR WHATEVER) IS ENOUGH, THERE IS REALLY NO REASON TO PULL IN THE GMP LIBRARY. (GMP MAKES MATH WITH REALLY BIG NUMBERS GO MUCH FASTER, BUT USES UP MEMORY AND MAKES MATH WITH VERY SMALL NUMBERS A LITTLE BIT SLOWER). * LAST REASON: THE ENTIRE PROBLEM WITH THE WARNING, BACKWARDS COMPATIBILITY ETC.GOES AWAY. NOTE: THE PATCH ALSO REMOVES INDIRECT OBJECT NOTION. NOTE 2: THIS PATCH DOESN'T ADD THE CALLBACK NOTION SO THAT THE MODULE SURVIVES A CHANGING MATH LIB. IF MATH LIB A IS IN EFFECT WHILE LOADING THIS MODULE, AND THE LIB IS CHANGED TO B AT A LATER POINT, THE CONSTANTS DEFINED ($FFFFFFFF AND $THIRTY_TWO) WILL BE INVALID FOR B (BECAUSE THEY WERE CREATED FROM A). THIS EFFECT IS CAUSED BY MATH::BIGINT'S LOW MATH LIBS NOT BEING PREPARED WITH OBJECTS THAT AREN'T CREATED BY THEMSELVES - THIS WOULD BE ALMOST IMPOSSIBLE TO FIX, AND NEVER WITHOUT A MAJOR SLOWDOWN. I AM NOT SURE IF IT IS WORTH BOTHERING TO FIX FILE.PM, THO. ALL THE BEST, TELS -- SIGNED ON TUE FEB 27 18:30:30 2007 WITH KEY 0X93B84C15. GET ONE OF MY PHOTO POSTERS: HTTP://BLOODGATE.COM/POSTERS PGP KEY ON HTTP://BLOODGATE.COM/TELS.ASC OR PER EMAIL. "ANY SUFFICIENTLY ADVANCED TECHNOLOGY IS INDISTINGUISHABLE FROM A RIGGED DEMO." -- ANDY FINKEL, COMPUTER GUY
  Approximate file size 1989 bytes
Re: Re: Math::BigInt and Win32API::File whines a lot during make test...
user name
2007-02-27 12:04:19
Tels wrote:
> Moin,
> 
> On Tuesday 27 February 2007 15:51:19 you wrote:
>> On 2/26/07, Tels <nospam-abusebloodgate.com> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Moin,
>>>
>>> On Monday 26 February 2007 16:42:32 you wrote:
>>>> Im seeing a lot of stuff like the following
when i do a make test:
>>>>
>>>>
../lib/ExtUtils/t/00compile.................................
...ok
>>>> 27/98Math::BigInt: couldn't load specified
math lib(s), fallback to
>>>> Math::BigInt::FastCalc at
>>>> ../lib/Win32API/File.pm line 20
>>>>
>>>> The code involved is:
>>>>
>>>> # Math::BigInt optimizations courtesy of
Tels
>>>> BEGIN {
>>>>       require Math::BigInt;
>>>>       if (defined($Math::BigInt::VERSION)
&& $Math::BigInt::VERSION
>>>>> = 1.60) { Math::BigInt->import(lib
=> 'GMP');
>>>>       }
>>>> }
>>>>
>>>> It appears that GMP isnt built on win32? In
which case why is it
>>>> inside of a Win32 specific module?
>>> Math::BigInt::GMP is not part of the Perl core.
(Why it is tried to be
>>> loaded in that module I do not know).
>>>
>>> The warning can be suppressed by using
"try" instead of "lib".
>> Attached patch silences the warnings.
> 
> The attached patch is better. Sorry my mails from
yesterday outlining the 
> reason for this patch didn't make it to p5p:

I'll apply this tomorrow if we're all finally agreed that
this is the 
patch we want.  Looks like the best one so far to me.

(Shouldn't complain about getting too many patches, I
suppose 

-- 


------------------------------------------------
Radan Computational Ltd.

The information contained in this message and any files
transmitted with it are confidential and intended for the
addressee(s) only. If you have received this message in
error or there are any problems, please notify the sender
immediately. The unauthorized use, disclosure, copying or
alteration of this message is strictly forbidden. Note that
any views or opinions presented in this email are solely
those of the author and do not necessarily represent those
of Radan Computational Ltd. The recipient(s) of this message
should check it and any attached files for viruses: Radan
Computational will accept no liability for any damage caused
by any virus transmitted by this email.
[1-9]

about | contact  Other archives ( Real Estate discussion Medical topics )