Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ExtUtils::ParseXS: Please make the output reproducible #15414

Closed
p5pRT opened this issue Jul 2, 2016 · 9 comments
Closed

ExtUtils::ParseXS: Please make the output reproducible #15414

p5pRT opened this issue Jul 2, 2016 · 9 comments

Comments

@p5pRT
Copy link

p5pRT commented Jul 2, 2016

Migrated from rt.perl.org#128517 (status was 'resolved')

Searchable as RT128517$

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2016

From carnil@debian.org

Hi

Chris Lamb working on the "reproducible builds" effort [0] reported that the output generated by ExtUtils​::ParseXS is non-deterministic and proposed a patch both in [1] and [2], basically boiling down to​:

Inline Patch
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
index 0987500..dd1c3f2 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
@@ -686,7 +686,7 @@ EOF
         var         => $_,
         do_setmagic => $self->{DoSetMagic},
         do_push     => undef,
-      } ) for grep $self->{in_out}->{$_} =~ /OUT$/, keys %{ $self->{in_out} };
+      } ) for grep $self->{in_out}->{$_} =~ /OUT$/, sort keys %{ $self->{in_out} };
 
       my $prepush_done;
       # all OUTPUT done, so now push the return value on the stack

Could you consider applying it in a next update of ExtUtils::ParseXS?

Regards,
Salvatore

[0] https://wiki.debian.org/ReproducibleBuilds
[1] https://bugs.debian.org/829295
[2] https://bugs.debian.org/829296

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2016

From @jkeenan

On Sat Jul 02 01​:05​:26 2016, carnil@​debian.org wrote​:

Hi

Chris Lamb working on the "reproducible builds" effort [0] reported
that the output generated by ExtUtils​::ParseXS is non-deterministic
and proposed a patch both in [1] and [2], basically boiling down to​:

diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
index 0987500..dd1c3f2 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
@​@​ -686,7 +686,7 @​@​ EOF
var => $_,
do_setmagic => $self->{DoSetMagic},
do_push => undef,
- } ) for grep $self->{in_out}->{$_} =~ /OUT$/, keys %{ $self-

{in_out} };
+ } ) for grep $self->{in_out}->{$_} =~ /OUT$/, sort keys %{
$self->{in_out} };

my $prepush_done;
# all OUTPUT done, so now push the return value on the stack

Could you consider applying it in a next update of ExtUtils​::ParseXS?

Regards,
Salvatore

[0] https://wiki.debian.org/ReproducibleBuilds
[1] https://bugs.debian.org/829295
[2] https://bugs.debian.org/829296

Other things being equal, I would expect the introduction of a 'sort' function at that point to cause a performance hit.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented Jul 2, 2016

From zefram@fysh.org

James E Keenan via RT wrote​:

Other things being equal, I would expect the introduction of a 'sort'
function at that point to cause a performance hit.

Not a concern. This only runs during build processes.

-zefram

@p5pRT
Copy link
Author

p5pRT commented Jul 3, 2016

From @jkeenan

On Sat Jul 02 05​:50​:15 2016, zefram@​fysh.org wrote​:

James E Keenan via RT wrote​:

Other things being equal, I would expect the introduction of a 'sort'
function at that point to cause a performance hit.

Not a concern. This only runs during build processes.

-zefram

Okay. Smoke-testing in branch smoke-me/jkeenan/128517-eupxs.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2016

From @tonycoz

On Sun Jul 03 07​:55​:55 2016, jkeenan wrote​:

On Sat Jul 02 05​:50​:15 2016, zefram@​fysh.org wrote​:

James E Keenan via RT wrote​:

Other things being equal, I would expect the introduction of a 'sort'
function at that point to cause a performance hit.

Not a concern. This only runs during build processes.

-zefram

Okay. Smoke-testing in branch smoke-me/jkeenan/128517-eupxs.

Which I don't see new failures on.

Thanks, applied as aeb9a30.

Removed the smoke-me branch.

Tony

@p5pRT
Copy link
Author

p5pRT commented Jul 12, 2016

@tonycoz - Status changed from 'open' to 'pending release'

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.26.0, this and 210 other issues have been
resolved.

Perl 5.26.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.26.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT
Copy link
Author

p5pRT commented May 30, 2017

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant