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

python37: fix darwin build #42894

Merged
merged 1 commit into from Jul 9, 2018
Merged

python37: fix darwin build #42894

merged 1 commit into from Jul 9, 2018

Conversation

LnL7
Copy link
Member

@LnL7 LnL7 commented Jul 2, 2018

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python37

Partial log (click to expand)

gzipping man pages under /nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0/share/man/
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0/lib  /nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0/bin
patching script interpreter paths in /nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0
/nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0/bin/python3.7m-config: interpreter directive changed from "/bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
/nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0/lib/python3.7/ctypes/macholib/fetch_macholib: interpreter directive changed from "/bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
/nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0/lib/python3.7/config-3.7m-x86_64-linux-gnu/makesetup: interpreter directive changed from " /bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
/nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0/lib/python3.7/config-3.7m-x86_64-linux-gnu/install-sh: interpreter directive changed from "/bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/bn10ggyzlqfs7mjs9p3zjl5wfw0b7qmv-python3-3.7.0...
wrong ELF type

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python37

Partial log (click to expand)

strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0/lib  /nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0/bin
patching script interpreter paths in /nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0
/nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0/lib/python3.7/config-3.7m-aarch64-linux-gnu/install-sh: interpreter directive changed from "/bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
/nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0/lib/python3.7/config-3.7m-aarch64-linux-gnu/makesetup: interpreter directive changed from " /bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
/nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0/lib/python3.7/ctypes/macholib/fetch_macholib: interpreter directive changed from "/bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
/nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0/bin/python3.7m-config: interpreter directive changed from "/bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0...
wrong ELF type
/nix/store/6jlbzgrcwp3z2g4a85p2f6jmd5f6ab6p-python3-3.7.0

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python37

Partial log (click to expand)

/nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0/lib/python3.7/test/test_support.py
post-installation fixup
gzipping man pages under /nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0/share/man/
strip is /nix/store/7ddbq63v97nk8gkbf7gcsfmby37h6gbl-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0/lib  /nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0/bin
patching script interpreter paths in /nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0
/nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0/lib/python3.7/config-3.7m-darwin/install-sh: interpreter directive changed from "/bin/sh" to "/nix/store/q2wqq1k20v8kc3vckapqf5nws30brnni-bash-4.4-p23/bin/sh"
/nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0/lib/python3.7/config-3.7m-darwin/makesetup: interpreter directive changed from " /bin/sh" to "/nix/store/q2wqq1k20v8kc3vckapqf5nws30brnni-bash-4.4-p23/bin/sh"
/nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0/lib/python3.7/ctypes/macholib/fetch_macholib: interpreter directive changed from "/bin/sh" to "/nix/store/q2wqq1k20v8kc3vckapqf5nws30brnni-bash-4.4-p23/bin/sh"
/nix/store/nbvdnj2cq6dbbx1zxd5i1dhm513ppjvr-python3-3.7.0


# Fixes darwin build.
(fetchpatch {
url = https://github.com/LnL7/cpython/commit/6750bb7abfb13775e1bae3143099ead4dea68d6a.patch;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you download the patch from your fork instead of including it in Nixpkgs? This makes it harder for others to change it.

It seems that this patch is better (and may be proposed for inclusion upstream):

 #ifdef HAVE_LIBUTIL_H
 #include <libutil.h>
-#else
+#endif /* HAVE_LIBUTIL_H */
 #ifdef HAVE_UTIL_H
 #include <util.h>
 #endif /* HAVE_UTIL_H */
-#endif /* HAVE_LIBUTIL_H */

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an issue and pull request for it, if that's merged we can use upstream.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I have found the issue: https://bugs.python.org/issue34027

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And the PR: python/cpython#8056

Copy link
Member

@Mic92 Mic92 Jul 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you include the link to the pull request as comment, so it is easier to track, when it is merged?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened this in preparation of #42777, it's not urgent until that's merged. I'll update it with the relevant information when upstream makes a decision.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use @orivej's patch, since that's most likely to get accepted upstream.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: python37

Partial log (click to expand)

strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0/lib  /nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0/bin
patching script interpreter paths in /nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0
/nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0/bin/python3.7m-config: interpreter directive changed from "/bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
/nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0/lib/python3.7/config-3.7m-x86_64-linux-gnu/makesetup: interpreter directive changed from " /bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
/nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0/lib/python3.7/config-3.7m-x86_64-linux-gnu/install-sh: interpreter directive changed from "/bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
/nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0/lib/python3.7/ctypes/macholib/fetch_macholib: interpreter directive changed from "/bin/sh" to "/nix/store/8zkg9ac4s4alzyf4a8kfrig1j73z66dw-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0...
wrong ELF type
/nix/store/vgsvh6hq6049dkmp3si9dk0d739wqg40-python3-3.7.0

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: python37

Partial log (click to expand)

strip is /nix/store/0pjsgkxz0rp5baycq5sp2s72lrr5q9sg-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0/lib  /nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0/bin
patching script interpreter paths in /nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0
/nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0/lib/python3.7/config-3.7m-aarch64-linux-gnu/install-sh: interpreter directive changed from "/bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
/nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0/lib/python3.7/config-3.7m-aarch64-linux-gnu/makesetup: interpreter directive changed from " /bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
/nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0/lib/python3.7/ctypes/macholib/fetch_macholib: interpreter directive changed from "/bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
/nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0/bin/python3.7m-config: interpreter directive changed from "/bin/sh" to "/nix/store/p0vy17dp9jk2mvqsxsqnb14s3797lay7-bash-4.4-p23/bin/sh"
checking for references to /build in /nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0...
wrong ELF type
/nix/store/1lzzq8lz2637c9lck3mcgdrqhwldjhja-python3-3.7.0

@LnL7 LnL7 merged commit 63aed85 into NixOS:master Jul 9, 2018
@LnL7 LnL7 deleted the darwin-python37 branch July 9, 2018 21:12
@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: python37

Partial log (click to expand)

/nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0/lib/python3.7/test/test_support.py
post-installation fixup
gzipping man pages under /nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0/share/man/
strip is /nix/store/7ddbq63v97nk8gkbf7gcsfmby37h6gbl-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0/lib  /nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0/bin
patching script interpreter paths in /nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0
/nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0/lib/python3.7/config-3.7m-darwin/install-sh: interpreter directive changed from "/bin/sh" to "/nix/store/q2wqq1k20v8kc3vckapqf5nws30brnni-bash-4.4-p23/bin/sh"
/nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0/lib/python3.7/config-3.7m-darwin/makesetup: interpreter directive changed from " /bin/sh" to "/nix/store/q2wqq1k20v8kc3vckapqf5nws30brnni-bash-4.4-p23/bin/sh"
/nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0/lib/python3.7/ctypes/macholib/fetch_macholib: interpreter directive changed from "/bin/sh" to "/nix/store/q2wqq1k20v8kc3vckapqf5nws30brnni-bash-4.4-p23/bin/sh"
/nix/store/l72bi3pc8zj04gdavqz1dgg4khafppv2-python3-3.7.0

@orivej
Copy link
Contributor

orivej commented Jul 9, 2018

Thank you!

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

Successfully merging this pull request may close these issues.

None yet

4 participants