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

Make the build reproducible #76

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Jan 29, 2020

Whilst working on the Reproducible Builds effort I noticed that pikepdf could not be built reproducibly. This was due to two reasons:

a) The documentation included tutorial/walthrough like output like so:

<PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=1000x1520 at 0x7F04BAC72B90>

… where the 0x7F04BAC72B90 part is non-determinstic and thus varies between builds.

b) The .cpp input files were compiled/linked in an order that was determined by their layout on the filesystem which is, at least on UNIX systems, non-deterministic.

This PR addresses both these issues.

It was orginally filed in Debian as #950138.

Whilst working on the Reproducible Builds effort [0] we noticed that
pikepdf could not be built reproducibly.

This is due to the .cpp input files were compiled/linked in an order that was
determined by their layout on the filesystem which is, alas, non-deterministic.

This was originally filed in Debian as #950138 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/950138
…tion to avoid non-determinstic memory addresses in the output

Whilst working on the Reproducible Builds effort [0] we noticed that
pikepdf could not be built reproducibly.

The documentation included tutorial/walthrough-like output like so:

   <PIL.JpegImagePlugin.JpegImageFile image mode=RGB size=1000x1520 at 0x7F04BAC72B90>

… where the "0x7F04BAC72B90" part is non-determinstic and thus varies
between builds.

This was originally filed in Debian as #950138 [1].

 [0] https://reproducible-builds.org/
 [1] https://bugs.debian.org/950138
@jbarlow83
Copy link
Member

Thanks.

I suggest applying your sorted() fix to the pybind example project: https://github.com/pybind/python_example so that other pybind11 projects will pick it up.

@jbarlow83 jbarlow83 merged commit e8f5464 into pikepdf:master Jan 29, 2020
lamby added a commit to lamby/python_example that referenced this pull request Feb 8, 2020
@lamby
Copy link
Contributor Author

lamby commented Feb 8, 2020

Sure thing, I have now done so — thanks for the suggestion.

@lamby lamby deleted the 950138-pikepdf-please-make-the-build-reproducible branch February 8, 2020 16:35
tasmo pushed a commit to prototypefund/reproducible-website that referenced this pull request Apr 24, 2020
wjakob pushed a commit to pybind/python_example that referenced this pull request Apr 26, 2020
wjakob pushed a commit to pybind/python_example that referenced this pull request Apr 26, 2020
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

Successfully merging this pull request may close these issues.

None yet

2 participants