Skip Menu |

This queue is for tickets about the ExtUtils-MakeMaker CPAN distribution.

Report information
The Basics
Id: 133493
Status: open
Priority: 0/
Queue: ExtUtils-MakeMaker

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

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



Subject: Apple have started to apply -Werror by default breaking lots of XS modules
Apple seem to have started to apply -Werror by default when building C code in the latest version of XCode. This breaks plenty of XS modules. For example, when building Digest::SHA256 this happens: http://paste.scsys.co.uk/592749 The attached patch to ExtUtils::MM_Darwin seems to fix it at least for that case. However there is a nasty caveat. It seems you can't just say `-Wno-error`, it has to be `-Wno-error=...` so it will almost certainly need twiddling to add more things that lazy programmers have been getting away with previously and are now breaking.
Subject: eumm-Werror.patch
--- perl5/perlbrew/perls/perl-blead//lib/5.33.3/ExtUtils/MM_Darwin.pm~ 2020-10-08 15:10:30.000000000 +0100 +++ perl5/perlbrew/perls/perl-blead//lib/5.33.3/ExtUtils/MM_Darwin.pm 2020-10-08 15:28:42.000000000 +0100 @@ -46,4 +46,18 @@ $self->SUPER::init_dist(@_); } +=head3 cflags + +Over-ride Apple's automatic setting of -Werror + +=cut + +sub cflags { + my $self = shift; + + $self->{CCFLAGS} .= ($self->{CCFLAGS} ? ' ' : '').'-Wno-error=implicit-function-declaration'; + + $self->SUPER::cflags(@_); +} + 1;
From what I've heard, Xcode 12 is using `Werror=implicit-function-declaration` for good reason, and not to be annoying/arbitrarily strict. Software may not compile properly for macOS on 64-bit ARM if implicit function declarations were permitted (which was already the case for iOS 64-bit; see https://developer.apple.com/documentation/uikit/app_and_environment/updating_your_app_from_32-bit_to_64-bit_architecture/managing_functions_and_function_pointers). Maybe EUMM shouldn't be suppressing this error if it expects software to work on macOS for 64-bit ARM.
Subject: Re: [rt.cpan.org #133493] Apple have started to apply -Werror by default breaking lots of XS modules
Date: Tue, 24 Nov 2020 01:31:24 +0100
To: bug-ExtUtils-MakeMaker [...] rt.cpan.org
From: Leon Timmermans <fawaka [...] gmail.com>
On Fri, Nov 20, 2020 at 7:12 AM Christopher Alexander Chavez via RT <bug-ExtUtils-MakeMaker@rt.cpan.org> wrote: Show quoted text
> From what I've heard, Xcode 12 is using `Werror=implicit-function-declaration` > for good reason, and not to be annoying/arbitrarily strict. Software may not > compile properly for macOS on 64-bit ARM if implicit function declarations were > permitted (which was already the case for iOS 64-bit; see > https://developer.apple.com/documentation/uikit/app_and_environment/updating_your_app_from_32-bit_to_64-bit_architecture/managing_functions_and_function_pointers). > Maybe EUMM shouldn't be suppressing this error if it expects software to work > on macOS for 64-bit ARM.
Implicit function declarations are legal in C89 but not in C99 or C++. Apparently Apple decided not to care about C89 in their new ARM64 ABI. This means that disabling this error probably causes either vararg or non-vararg implicitly defined function calls to be broken, but it doesn't give much of a hint which one of the two. Leon Leon