Mailing List Archive

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
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
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
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
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
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
??????? Original Message ???????
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 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.
>

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.

Thank you
ambs
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
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
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
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
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
On Monday, October 12th, 2020 at 1:04 PM, David Cantrell <david@cantrell.org.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
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
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
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
> 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.
>

Released a new version of EU::CB
Lets wait for CPAN Testers and see if we have any relevant feedback.
If everything looks fine, I will produce a proper patch including the Changes file as well.

Thank you and sorry for the delay
Alberto
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
[CCed cpan-testers-discuss]

On Sun, Nov 01, 2020 at 02:57:04PM +0000, Alberto Sim?es wrote:

> Released a new version of EU::CB
> Lets wait for CPAN Testers and see if we have any relevant feedback.
> If everything looks fine, I will produce a proper patch including the Changes file as well.

CPAN testers will tell you whether EU::CB passes its own tests or not,
but the error this fixes isn't amenable to CPAN-testers finding it and
correctly reporting it fixed.

The problem is that without this some XS modules that use EU::CB will
fail to build. And then the testers will go "oh, it didn't build, I
won't report anything at all". That's because most build failures are
something like the testing machine not having some C library installed
that the XS module depends on and so shouldn't generate a failure
report.

To verify that this patched release is correct people need to, manually,
do this on Mac OS Catalina with the latest XCode:

* with the previous version of EU::CB installed, find something XSy that
uses it, and which fails to build because of
-Werror=implicit-function-declaration
* then install this new EU::CB and make sure that the build now succeeds.

--
David Cantrell | Enforcer, South London Linguistic Massive
Re: ExtUtils::CBuilder: Apple have started to apply -Werror by default, breaking XS [ In reply to ]
??????? Original Message ???????

On Monday, November 2nd, 2020 at 11:48 AM, David Cantrell <david@cantrell.org.uk> wrote:

> [CCed cpan-testers-discuss]
>
> On Sun, Nov 01, 2020 at 02:57:04PM +0000, Alberto Sim?es wrote:
>
> > Released a new version of EU::CB
> >
> > Lets wait for CPAN Testers and see if we have any relevant feedback.
> >
> > If everything looks fine, I will produce a proper patch including the Changes file as well.
>
> CPAN testers will tell you whether EU::CB passes its own tests or not,
>
> but the error this fixes isn't amenable to CPAN-testers finding it and
>
> correctly reporting it fixed.
>
> The problem is that without this some XS modules that use EU::CB will
>
> fail to build. And then the testers will go "oh, it didn't build, I
>
> won't report anything at all". That's because most build failures are
>
> something like the testing machine not having some C library installed
>
> that the XS module depends on and so shouldn't generate a failure
>
> report.
>
> To verify that this patched release is correct people need to, manually,
>
> do this on Mac OS Catalina with the latest XCode:
>
> - with the previous version of EU::CB installed, find something XSy that
>
> uses it, and which fails to build because of
>
> -Werror=implicit-function-declaration
> - then install this new EU::CB and make sure that the build now succeeds.
>

Unfortunately no longer a mac user, so not able to test it myself....