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 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.

lamby added 2 commits Jan 29, 2020
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

This comment has been minimized.

Copy link
Member

jbarlow83 commented Jan 29, 2020

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
8 of 9 checks passed
8 of 9 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
pikepdf.pikepdf Build #20200129.1 succeeded
Details
pikepdf.pikepdf (Deploy PyPI) Deploy PyPI succeeded
Details
pikepdf.pikepdf (Wheels linux32) Wheels linux32 succeeded
Details
pikepdf.pikepdf (Wheels linux64) Wheels linux64 succeeded
Details
pikepdf.pikepdf (Wheels macos) Wheels macos succeeded
Details
pikepdf.pikepdf (Wheels windows32) Wheels windows32 succeeded
Details
pikepdf.pikepdf (Wheels windows64) Wheels windows64 succeeded
Details
pikepdf.pikepdf (sdist linux_sdist) sdist linux_sdist succeeded
Details
lamby added a commit to lamby/python_example that referenced this pull request Feb 8, 2020
@lamby

This comment has been minimized.

Copy link
Contributor Author

lamby commented Feb 8, 2020

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

@lamby lamby deleted the lamby:950138-pikepdf-please-make-the-build-reproducible branch Feb 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.