ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS

I recently had trouble building Digest::SHA256:

  http://paste.scsys.co.uk/592749

and a few other XS modules. This only happens on my machines that are
running Mac OS Catalina with the latest version of XCode. Older machines
can build it Just Fine. It appears that some time recently Apple in
their wisdom decided that -Werror should be turned on by default.

The correct fix, of course, is for lazy programmers to fix their damned
modules, but that ain't gonna happen. Plenty of them are stable and not
actively maintained.

I have raised a ticket (with a patch for at least a partial fix) against
ExtUtils::MakeMaker:

  https://rt.cpan.org/Ticket/Display.html?id=133493

Some kind of similar fix will also be needed in ExtUtils::CBuilder,
which is maintained by p5p, as that is used by Module::Build. I would
create a patch myself, but I don't have an example of an XS build
failure that uses that so that I can test my patch. I'm sure they exist
though.

-- 
David Cantrell | A machine for turning tea into grumpiness
0
david
10/8/2020 2:58:55 PM
perl.perl5.porters 48233 articles. 1 followers. Follow

7 Replies
12 Views

Similar Articles

[PageSpeed] 8

On Thu, Oct 8, 2020 at 5:19 PM David Cantrell <david@cantrell.org.uk> wrote:
>
> I recently had trouble building Digest::SHA256:
>
>   http://paste.scsys.co.uk/592749
>
> and a few other XS modules. This only happens on my machines that are
> running Mac OS Catalina with the latest version of XCode. Older machines
> can build it Just Fine. It appears that some time recently Apple in
> their wisdom decided that -Werror should be turned on by default.
>
> The correct fix, of course, is for lazy programmers to fix their damned
> modules, but that ain't gonna happen. Plenty of them are stable and not
> actively maintained.
>
> I have raised a ticket (with a patch for at least a partial fix) against
> ExtUtils::MakeMaker:
>
>   https://rt.cpan.org/Ticket/Display.html?id=133493
>
> Some kind of similar fix will also be needed in ExtUtils::CBuilder,
> which is maintained by p5p, as that is used by Module::Build. I would
> create a patch myself, but I don't have an example of an XS build
> failure that uses that so that I can test my patch. I'm sure they exist
> though.

I'm not sure that's the best place to fix that. Configure should give
us all the right flags to compile modules, so I think it should be
fixed in hints/darwin.sh instead (that way all end-users are fixed in
one go)

Leon
0
fawaka
10/8/2020 4:02:27 PM
On Thu, Oct 08, 2020 at 06:02:27PM +0200, Leon Timmermans wrote:
> On Thu, Oct 8, 2020 at 5:19 PM David Cantrell <david@cantrell.org.uk> wrote:
> > Some kind of similar fix will also be needed in ExtUtils::CBuilder,
> > which is maintained by p5p, as that is used by Module::Build. I would
> > create a patch myself, but I don't have an example of an XS build
> > failure that uses that so that I can test my patch. I'm sure they exist
> > though.
> I'm not sure that's the best place to fix that. Configure should give
> us all the right flags to compile modules, so I think it should be
> fixed in hints/darwin.sh instead (that way all end-users are fixed in
> one go)

ExtUtils::CBuilder is on the CPAN too so putting a fix in there makes it
available to people who have already built their perl, including to
users of perls that are no longer getting updates.

-- 
David Cantrell
0
david
10/8/2020 6:46:01 PM
=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90 Original Me=
ssage =E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90=E2=80=90
On Thursday, October 8, 2020 7:46 PM, David Cantrell <david@cantrell.org.uk=
> wrote:

> On Thu, Oct 08, 2020 at 06:02:27PM +0200, Leon Timmermans wrote:
>
> > On Thu, Oct 8, 2020 at 5:19 PM David Cantrell david@cantrell.org.uk wro=
te:
> >
> > > Some kind of similar fix will also be needed in ExtUtils::CBuilder,
> > > which is maintained by p5p, as that is used by Module::Build. I would
> > > create a patch myself, but I don't have an example of an XS build
> > > failure that uses that so that I can test my patch. I'm sure they exi=
st
> > > though.
> > > I'm not sure that's the best place to fix that. Configure should give
> > > us all the right flags to compile modules, so I think it should be
> > > fixed in hints/darwin.sh instead (that way all end-users are fixed in
> > > one go)
>
> ExtUtils::CBuilder is on the CPAN too so putting a fix in there makes it
> available to people who have already built their perl, including to
> users of perls that are no longer getting updates.
>

Being the maintainer of EU::CB in CPAN, I agree with Dave.
But somehow I missed the patch.
At the moment I am very busy at the $job, but if someone is able to send me=
 the patch for the CPAN version, I am happy to send an updated version to C=
PAN.

Thank you
ambs
0
ambs
10/8/2020 7:49:59 PM
On Thu, Oct 08, 2020 at 07:49:59PM +0000, Alberto Sim?es wrote:

> Being the maintainer of EU::CB in CPAN, I agree with Dave.
> But somehow I missed the patch.
>
> At the moment I am very busy at the $job, but if someone is able to
> send me the patch for the CPAN version, I am happy to send an updated
> version to CPAN.

I found something that fails using EU::CBuilder, so I'll send a patch
shortly.

-- 
David Cantrell | semi-evolved ape-thing

    Safety tip: never strap firearms to a hamster
0
david
10/12/2020 10:16:47 AM
On Mon, Oct 12, 2020 at 11:16:47AM +0100, David Cantrell wrote:
> On Thu, Oct 08, 2020 at 07:49:59PM +0000, Alberto Sim?es wrote:
> > At the moment I am very busy at the $job, but if someone is able to
> > send me the patch for the CPAN version, I am happy to send an updated
> > version to CPAN.
> I found something that fails using EU::CBuilder, so I'll send a patch
> shortly.

https://github.com/Perl/perl5/pull/18234

NB that Github's Mac OS testing thingummy is going to be upgraded to
XCode 12 next week, but for now it's using v11.

-- 
David Cantrell | Cake Smuggler Extraordinaire
0
david
10/12/2020 12:04:56 PM
On Monday, October 12th, 2020 at 1:04 PM, David Cantrell <david@cantrell.or=
g.uk> wrote:
> On Mon, Oct 12, 2020 at 11:16:47AM +0100, David Cantrell wrote:
>
> > On Thu, Oct 08, 2020 at 07:49:59PM +0000, Alberto Sim?es wrote:
> >
> > > At the moment I am very busy at the $job, but if someone is able to
> > >
> > > send me the patch for the CPAN version, I am happy to send an updated
> > >
> > > version to CPAN.
> > >
> > > I found something that fails using EU::CBuilder, so I'll send a patch
> > >
> > > shortly.
>
> https://github.com/Perl/perl5/pull/18234
>
> NB that Github's Mac OS testing thingummy is going to be upgraded to
>
> XCode 12 next week, but for now it's using v11.

Should we wait before releasing?
Thanks
0
ambs
10/12/2020 5:06:51 PM
On 12/10/2020 18:06, Alberto Simões wrote:
> On Monday, October 12th, 2020 at 1:04 PM, David Cantrell <david@cantrell.org.uk> wrote:
>> NB that Github's Mac OS testing thingummy is going to be upgraded to
>> XCode 12 next week, but for now it's using v11.
> Should we wait before releasing?
> Thanks

I tested the patch by failing to build IP::World 0.40 without the patch, 
and then successfully building it with the patch applied to 
EU::CBuilder, so I'm confident that it works.

Normally I'd suggest uploading a trial version of EU::CB to the CPAN and 
asking the CPAN-testers to have at it, but the problem here is that 
modules fail to build at all, not that they fail tests, and the 
CPAN-testers generally don't report build failures as that would lead to 
waaaaay too many false positives due to missing libraries and the like.

-- 
David Cantrell
0
david
10/12/2020 6:56:31 PM
Reply: