Skip Menu |
 

This queue is for tickets about the Math-BigInt-GMP CPAN distribution.

Report information
The Basics
Id: 123880
Status: open
Priority: 0/
Queue: Math-BigInt-GMP

People
Owner: Nobody in particular
Requestors: WBRASWELL [...] cpan.org
Cc: PLICEASE [...] cpan.org
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



CC: "Graham Ollis" <plicease [...] cpan.org>
Subject: Adding Alien::GMP As Dependency
Download (untitled) / with headers
text/plain 681b
I am the author of the RPerl optimizing compiler, which makes use of Math::BigInt::GMP. Graham has a great CPAN distribution called Alien::GMP, which will automatically detect if GMP is installed, and if not then it will build GMP for you independent of OS. Alien::GMP has no affect upon systems which already have GMP installed via the OS, so Alien::GMP will only build libgmp from source when it is actually necessary. Will you please consider adding Alien::GMP as a dependency of Math::BigInt::GMP? Thanks, ~ Will PS - I will be happy to make a pull request if there is an official GitHub repo? [ Placeholder GitHub Issue ] https://github.com/rsimoes/Alien-GMP/issues/6
Firstly, I don't think Math::BigInt::GMP was ever intended to be used directly, but rather as a backend called by Math::BigInt, Math::BigFloat, and Math::BigRat. Secondly, Math::BigInt::GMP has hardly any dependencies. Adding Alien::GMP as a dependency introduces a whole lot of subdependencies. Alien::GMP requires Alien::Build and Alien::Build::MM, which in turn require FFI::CheckLib, File::chdir, Test2::Mock, Test2::Require, Test2::Require::Module, and Test2::V0. The Test2-Suite distribution requires Importer, Module::Pluggable, Scope::Guard, Sub::Info, Sub::Name, Term::Size::Any, Term::Table, Test2::API, Unicode::GCString, and Unicode::LineBreak. But that's not enough. Further down in the depencency tree you find Devel::Hide, Pod::Coverage, Test::Pod::Coverage, and Test::Pod. And there is B::C, B::Flags, and Opcodes. The list of dependencies goes on and on and on. I started installing Alien::GMP on Cygwin more than one and a half hour ago, and its still working on it. By the way, B::C didn't even compile, so I don't even know yet if installing Alien::GMP will ever work.
Download (untitled) / with headers
text/plain 1.6k
After about fours, Alien::GMP was finally installed. In addition to the 6 files in the Alien-GMP distribution, 643 other files in the following distributions were also installed: A/AN/ANDK/Devel-Symdump-2.18.tar.gz C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz C/CH/CHROMATIC/SUPER-1.20141117.tar.gz D/DA/DAGOLDEN/File-chdir-0.1010.tar.gz E/ET/ETHER/Class-Method-Modifiers-2.12.tar.gz E/ET/ETHER/Sub-Name-0.21.tar.gz E/ET/ETHER/Test-Pod-1.52.tar.gz E/ET/ETHER/Test-Warnings-0.026.tar.gz E/EX/EXODIST/Importer-0.025.tar.gz E/EX/EXODIST/Sub-Info-0.002.tar.gz E/EX/EXODIST/Term-Table-0.012.tar.gz E/EX/EXODIST/Test-Simple-1.302136.tar.gz E/EX/EXODIST/Test2-Suite-0.000114.tar.gz F/FE/FERREIRA/Devel-Hide-0.0009.tar.gz F/FE/FERREIRA/Term-Size-Any-0.002.tar.gz F/FE/FERREIRA/Term-Size-Perl-0.031.tar.gz G/GF/GFRANKS/Test-MockModule-0.15.tar.gz H/HA/HAARG/Role-Tiny-2.000006.tar.gz M/MA/MATTN/Devel-CheckLib-1.11.tar.gz N/NE/NEILB/Test-Pod-Coverage-1.10.tar.gz N/NE/NEZUMI/MIME-Charset-1.012.2.tar.gz N/NE/NEZUMI/Unicode-LineBreak-2018.003.tar.gz P/PH/PHRED/Archive-Zip-1.60.tar.gz P/PL/PLICEASE/Alien-Build-1.42.tar.gz P/PL/PLICEASE/Alien-Role-Alt-0.03.tar.gz P/PL/PLICEASE/FFI-CheckLib-0.18.tar.gz R/RC/RCLAMP/Pod-Coverage-0.23.tar.gz R/RG/RGARCIA/Sub-Identify-0.14.tar.gz R/RU/RURBAN/B-Flags-0.17.tar.gz R/RU/RURBAN/Mock-Config-0.03.tar.gz R/RU/RURBAN/Opcodes-0.14.tar.gz S/SI/SIMONW/Module-Pluggable-5.2.tar.gz T/TO/TOKUHIROM/Test-Requires-0.10.tar.gz Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz In comparison, installing Math::BigInt::GMP on the same computer took a little over 5 minutes. In other words, including Alien::GMP as a dependency has a tremendous overhead.
Download (untitled) / with headers
text/plain 313b
This PR: https://github.com/pjacklam/p5-Math-BigInt-GMP/pull/1 Makes Alien::GMP a fallback dependency if the system lib cannot easily be found with Devel::CheckLib. This gives most of the advantages of light dependencies if the libgmp is installed on the system, and the reliability of Alien::GMP if it is not.
Download (untitled) / with headers
text/plain 473b
On Tue Jun 19 16:53:24 2018, PLICEASE wrote: Show quoted text
In previous releases, Math::BigInt::GMP used Devel::CheckLib to see if GMP was installed, but that check was removed because of the following issue https://rt.cpan.org/Ticket/Display.html?id=111149 Devel::CheckLib was not able to detect GMP on Windows, so Math::BigInt::GMP didn't build even though GMP was installed. Has this issue been fixed?
Download (untitled) / with headers
text/plain 981b
On Fri Jun 22 03:54:47 2018, pjacklam wrote: Show quoted text
> On Tue Jun 19 16:53:24 2018, PLICEASE wrote:
> > This PR: > > > > https://github.com/pjacklam/p5-Math-BigInt-GMP/pull/1 > > > > (...)
> > In previous releases, Math::BigInt::GMP used Devel::CheckLib to see if > GMP was installed, but that check was removed because of the following > issue > > https://rt.cpan.org/Ticket/Display.html?id=111149 > > Devel::CheckLib was not able to detect GMP on Windows, so > Math::BigInt::GMP didn't build even though GMP was installed. Has this > issue been fixed?
Works for me at least: N:\lang\perl\strawberry\x86\5.22.1\c\lib>perl -MDevel::CheckLib= -E "say check_lib(lib => 'gmp', header => 'gmp.h')" 1 I also double checked and Alien::GMP will use the system libgmp if for some reason Devel::CheckLib fails to find it. (the methods used by Alien::Build to probe are more complete than what Devel::CheckLib does). Also btw- the reqs for Alien::GMP have been reduced since your last build.
Download (untitled) / with headers
text/plain 307b
On Mon Jun 25 07:27:37 2018, PLICEASE wrote: Show quoted text
> I also double checked and Alien::GMP will use the system libgmp* if for > some reason Devel::CheckLib fails to find it. (the methods used by > Alien::Build to probe are more complete than what Devel::CheckLib > does).
* on windows (or any other platform)
Download (untitled) / with headers
text/plain 3.9k
On Fri May 11 10:39:07 2018, pjacklam wrote: Show quoted text
> After about fours, Alien::GMP was finally installed. In addition to > the 6 files in the Alien-GMP distribution, 643 other files in the > following distributions were also installed: > > A/AN/ANDK/Devel-Symdump-2.18.tar.gz > C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz > C/CH/CHROMATIC/SUPER-1.20141117.tar.gz > D/DA/DAGOLDEN/File-chdir-0.1010.tar.gz > E/ET/ETHER/Class-Method-Modifiers-2.12.tar.gz > E/ET/ETHER/Sub-Name-0.21.tar.gz > E/ET/ETHER/Test-Pod-1.52.tar.gz > E/ET/ETHER/Test-Warnings-0.026.tar.gz > E/EX/EXODIST/Importer-0.025.tar.gz > E/EX/EXODIST/Sub-Info-0.002.tar.gz > E/EX/EXODIST/Term-Table-0.012.tar.gz > E/EX/EXODIST/Test-Simple-1.302136.tar.gz > E/EX/EXODIST/Test2-Suite-0.000114.tar.gz > F/FE/FERREIRA/Devel-Hide-0.0009.tar.gz > F/FE/FERREIRA/Term-Size-Any-0.002.tar.gz > F/FE/FERREIRA/Term-Size-Perl-0.031.tar.gz > G/GF/GFRANKS/Test-MockModule-0.15.tar.gz > H/HA/HAARG/Role-Tiny-2.000006.tar.gz > M/MA/MATTN/Devel-CheckLib-1.11.tar.gz > N/NE/NEILB/Test-Pod-Coverage-1.10.tar.gz > N/NE/NEZUMI/MIME-Charset-1.012.2.tar.gz > N/NE/NEZUMI/Unicode-LineBreak-2018.003.tar.gz > P/PH/PHRED/Archive-Zip-1.60.tar.gz > P/PL/PLICEASE/Alien-Build-1.42.tar.gz > P/PL/PLICEASE/Alien-Role-Alt-0.03.tar.gz > P/PL/PLICEASE/FFI-CheckLib-0.18.tar.gz > R/RC/RCLAMP/Pod-Coverage-0.23.tar.gz > R/RG/RGARCIA/Sub-Identify-0.14.tar.gz > R/RU/RURBAN/B-Flags-0.17.tar.gz > R/RU/RURBAN/Mock-Config-0.03.tar.gz > R/RU/RURBAN/Opcodes-0.14.tar.gz > S/SI/SIMONW/Module-Pluggable-5.2.tar.gz > T/TO/TOKUHIROM/Test-Requires-0.10.tar.gz > Z/ZE/ZEFRAM/Module-Runtime-0.016.tar.gz > > In comparison, installing Math::BigInt::GMP on the same computer took > a little over 5 minutes. In other words, including Alien::GMP as a > dependency has a tremendous overhead.
I am curious though, old Alien::GMP only installs these prereqs: authors/id/P/PL/PLICEASE/Alien-Build-1.46.tar.gz authors/id/P/PL/PLICEASE/File-Which-1.22.tar.gz authors/id/E/EX/EXODIST/Test2-Suite-0.000114.tar.gz authors/id/E/EX/EXODIST/Term-Table-0.012.tar.gz authors/id/E/EX/EXODIST/Importer-0.025.tar.gz authors/id/E/EX/EXODIST/Test-Simple-1.302136.tar.gz authors/id/S/SI/SIMONW/Module-Pluggable-5.2.tar.gz authors/id/C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz authors/id/E/EX/EXODIST/Sub-Info-0.002.tar.gz authors/id/P/PL/PLICEASE/FFI-CheckLib-0.20.tar.gz authors/id/D/DA/DAGOLDEN/File-chdir-0.1010.tar.gz authors/id/D/DA/DAGOLDEN/Path-Tiny-0.104.tar.gz authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz authors/id/M/MA/MATTN/Devel-CheckLib-1.13.tar.gz authors/id/D/DA/DAGOLDEN/IO-CaptureOutput-1.1104.tar.gz authors/id/R/RU/RURBAN/Mock-Config-0.03.tar.gz authors/id/H/HA/HAARG/Role-Tiny-2.000006.tar.gz authors/id/P/PL/PLICEASE/Alien-Role-Alt-0.04.tar.gz authors/id/E/ET/ETHER/Class-Method-Modifiers-2.12.tar.gz authors/id/T/TO/TOKUHIROM/Test-Requires-0.10.tar.gz authors/id/R/RJ/RJBS/Test-Fatal-0.014.tar.gz authors/id/E/ET/ETHER/Try-Tiny-0.30.tar.gz Which is not insignificant, but smaller than what you saw. Things like Test::Pod or B::C should definitely not be required! Are you sure you are not opting in to recommended or suggested prereqs? The new list looks like this: authors/id/P/PL/PLICEASE/Alien-GMP-1.14.tar.gz authors/id/P/PL/PLICEASE/Alien-Build-1.46.tar.gz authors/id/P/PL/PLICEASE/File-Which-1.22.tar.gz authors/id/D/DA/DAGOLDEN/Capture-Tiny-0.48.tar.gz authors/id/E/EX/EXODIST/Test2-Suite-0.000114.tar.gz authors/id/E/EX/EXODIST/Sub-Info-0.002.tar.gz authors/id/E/EX/EXODIST/Importer-0.025.tar.gz authors/id/C/CH/CHOCOLATE/Scope-Guard-0.21.tar.gz authors/id/E/EX/EXODIST/Test-Simple-1.302136.tar.gz authors/id/S/SI/SIMONW/Module-Pluggable-5.2.tar.gz authors/id/E/EX/EXODIST/Term-Table-0.012.tar.gz authors/id/D/DA/DAGOLDEN/File-chdir-0.1010.tar.gz authors/id/D/DA/DAGOLDEN/Path-Tiny-0.104.tar.gz authors/id/P/PL/PLICEASE/FFI-CheckLib-0.20.tar.gz authors/id/M/MA/MATTN/Devel-CheckLib-1.13.tar.gz authors/id/D/DA/DAGOLDEN/IO-CaptureOutput-1.1104.tar.gz authors/id/R/RU/RURBAN/Mock-Config-0.03.tar.gz
Download (untitled) / with headers
text/plain 458b
FYI, there was a copy of this ticket made for the Math::GMP distribution: https://rt.cpan.org/Ticket/Display.html?id=125018 Math::GMP was updated to include Alien::GMP as a dependency: https://metacpan.org/changes/distribution/Math-GMP This seems to pass all CPAN tests just fine, including Windows: http://matrix.cpantesters.org/?dist=Math-GMP+2.19 So hopefully this is a good indicator that it is safe to move forward with updating Math::BigInt::GMP?
Download (untitled) / with headers
text/plain 1.4k
On Wed Jun 27 03:31:56 2018, WBRASWELL wrote: Show quoted text
> FYI, there was a copy of this ticket made for the Math::GMP > distribution: > > https://rt.cpan.org/Ticket/Display.html?id=125018 > > Math::GMP was updated to include Alien::GMP as a dependency: > > https://metacpan.org/changes/distribution/Math-GMP > > This seems to pass all CPAN tests just fine, including Windows: > > http://matrix.cpantesters.org/?dist=Math-GMP+2.19 > > So hopefully this is a good indicator that it is safe to move forward > with updating Math::BigInt::GMP?
Math::GMP is not using Devel::CheckLib, just Alien::GMP. As mentioned, the Devel::CheckLib probe seems to be working on my Strawberry 32bit 5.22.1 which is hardly bleeding edge. IMHO that should be sufficient unless there have been regressions in more recent versions of Strawberry. If I had more details, such as which version of Strawberry (or maybe it wasn't Strawberry) or Devel::CheckLib where erroneous I could investigate further. Although worst case, you'd have to install Alien::GMP which would probably correctly probe for the system libgmp. An alternative to Devel::CheckLib is ExtUtils::CBuilder. It is more reliable since you are actually invoking the compiler (this is what Alien::GMP does via Alien::Build), and ExtUtils::CBuilder is in-core as of recent Perls, but it is also messier. Part of the rationale behind Alien::Build is that it abstracts a lot of this complexity so that you don't have to get all of the corner cases right in each individual XS module.
Download (untitled) / with headers
text/plain 138b
Graham, you're right, sorry I wasn't thinking about the Devel::CheckLib aspect of things. I guess we'll just wait to see what Peter says.
Download (untitled) / with headers
text/plain 136b
By the way, Alien::GMP is a bundled module with Strawberry Perl as of 5.28: http://strawberryperl.com/release-notes/5.28.0.1-64bit.html


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.