Skip Menu |
 

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

Report information
The Basics
Id: 80603
Status: resolved
Worked: 45 min
Priority: 0/
Queue: Math-Int128

People
Owner: Nobody in particular
Requestors: pjacklam [...] online.no
Cc:
AdminCc:

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



Subject: Makefile.PL doesn't accept "gcc-4"
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 590
Download (untitled) / with headers
text/plain 590b
Here is the output from running "Makefile.PL": $ perl Makefile.PL PREFIX=/usr/local Checking if your kit is complete... Looks good Writing Makefile for Math::Int128 Writing MYMETA.yml and MYMETA.json This module requires version 4.4 or above of the GCC compiler. Aborting! It turns out that the $cc variable in "Makefile.PL" is set to "gcc-4", and $cc_version, the output from "$cc --version" is $ gcc-4 --version gcc-4 (GCC) 4.5.3 which does not match the regex used to check the compiler version, so the compiler is rejected, although it is "version 4.4 or above" of the GCC compiler.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-29760-1352111447-1296.80603-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 94
Solved in version 0.06_07 that I have just uploaded to CPAN. Thank you for reporting the bug!
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-29760-1352111447-1296.80603-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-29760-1352111447-1296.80603-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6599-1352191604-82.80603-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 440
Download (untitled) / with headers
text/plain 440b
Thanks for the fix! I checked output from "gcc --version" for various old versions of GCC, and the syntax "<progname> (GCC) X.Y.Z" was introduced somewhere in version 3. It is not used in version 3.0, but it is used in version 3.4.6 and onwards. So it seems that this bug could also have been solved with the slightly simpler code my $cc_version = `$cc --version 2>&1`; unless ($cc_version =~ /\(GCC\)\s+(4\.(\d+)\S*)/ and $2 > 4) { (...)
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6599-1352191604-82.80603-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-29760-1352111447-1296.80603-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6599-1352191604-82.80603-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6599-1352191861-17.80603-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 203
Download (untitled) / with headers
text/plain 203b
On Tue Nov 06 03:46:44 2012, pjacklam wrote: Show quoted text
> my $cc_version = `$cc --version 2>&1`; > unless ($cc_version =~ /\(GCC\)\s+(4\.(\d+)\S*)/ and $2 > 4) { > (...)
The second line should be ... $2 >= 4) ...
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-6599-1352191604-82.80603-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <rt-3.8.HEAD-29760-1352111447-1296.80603-0-0 [...] rt.cpan.org> <rt-3.8.HEAD-6599-1352191604-82.80603-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-6599-1352192426-1835.80603-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 729
Download (untitled) / with headers
text/plain 729b
On Tue Nov 06 03:46:44 2012, pjacklam wrote: Show quoted text
> Thanks for the fix! > > I checked output from "gcc --version" for various old versions of GCC, > and the syntax "<progname> (GCC) X.Y.Z" was introduced somewhere in > version 3. It is not used in version 3.0, but it is used in version > 3.4.6 and onwards. So it seems that this bug could also have been solved > with the slightly simpler code > > my $cc_version = `$cc --version 2>&1`; > unless ($cc_version =~ /\(GCC\)\s+(4\.(\d+)\S*)/ and $2 > 4) { > (...)
It is not as easy as that. There is a high variability on the version string. For instance, on Ubuntu I get "cc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2" Hopefully the version string for the slave C compiler is more stable.


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.