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

Always include interpreter constraints in PEXes. #11733

Merged
merged 2 commits into from
Mar 19, 2021

Conversation

jsirois
Copy link
Contributor

@jsirois jsirois commented Mar 18, 2021

Previously we left them off for internal only PEXes. Leaving them does
no harm since PEX uses the current interpreter if it matches constraints
and it aids in the debugability of process chroots.

[ci skip-rust]
[ci skip-build-wheels]

@jsirois
Copy link
Contributor Author

jsirois commented Mar 18, 2021

I <3 macOS: giampaolo/psutil#1832

  ERROR: Command errored out with exit status 1:
   command: /Applications/Xcode_12.4.app/Contents/Developer/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/process-executionKkOWpY/.tmp/pip-req-build-7ega3oxn/setup.py'"'"'; __file__='"'"'/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/process-executionKkOWpY/.tmp/pip-req-build-7ega3oxn/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/process-executionKkOWpY/.tmp/pip-wheel-lypk_il6
       cwd: /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/process-executionKkOWpY/.tmp/pip-req-build-7ega3oxn/
  Complete output (142 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.14.6-x86_64-3.8
  creating build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/_pswindows.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/_common.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/__init__.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/_psosx.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/_psbsd.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/_psaix.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/_pslinux.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  copying psutil/_compat.py -> build/lib.macosx-10.14.6-x86_64-3.8/psutil
  note: '__int128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:75:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_uid_t;         /* [???] user IDs */
          ^
  note: '__uint128_t' declared here
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types.h:76:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_useconds_t;    /* [???] microseconds */
          ^
  note: '__uint128_t' declared here
  In file included from psutil/_psutil_common.c:9:
  In file included from /Applications/Xcode_12.4.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:71:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_types.h:43:9: error: unknown type name '__uint32_t'; did you mean '__uint128_t'?
  typedef __uint32_t      __darwin_wctype_t;
          ^
  note: '__uint128_t' declared here
  In file included from psutil/_psutil_common.c:9:
  In file included from /Applications/Xcode_12.4.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8/Python.h:25:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
  /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h:37:2: error: architecture not supported
  #error architecture not supported
   ^
  fatal error: too many errors emitted, stopping now [-ferror-limit=]
  20 errors generated.
  error: command 'clang' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for psutil

I'll stew on this for a bit and move to DRAFT status.

@jsirois jsirois marked this pull request as draft March 18, 2021 17:13
Previously we left them off for internal only PEXes. Leaving them does
no harm since PEX uses the current interpreter if it matches constraints
and it aids in the debugability of process chroots.

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
The interpreter has a bad `-arch arm64` flag on intel that leads to
compile errors for psutil.

See: giampaolo/psutil#1832

[ci skip-rust]
[ci skip-build-wheels]
@jsirois jsirois marked this pull request as ready for review March 19, 2021 16:41
@jsirois
Copy link
Contributor Author

jsirois commented Mar 19, 2021

Alright - this is good to go for review now.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Thanks!

Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks!

pants.ci.toml Show resolved Hide resolved
@jsirois jsirois merged commit 43007bd into pantsbuild:master Mar 19, 2021
@jsirois jsirois deleted the IC/include-for-local-too branch March 19, 2021 18:27
@benjyw benjyw mentioned this pull request Mar 20, 2021
Eric-Arellano pushed a commit that referenced this pull request Apr 8, 2021
### Problem

See: #11733
This issue now happens during wheel build:  https://github.com/pantsbuild/pants/runs/2300092374?check_suite_focus=true#step:8:1129

### Solution

Apply the same solution that we use for running other things on macos to the build wheels job.
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.

3 participants