-
Notifications
You must be signed in to change notification settings - Fork 288
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
Fix macOS build failure by adding export ARCHFLAGS="-arch x86_64"
#1168
Conversation
269ac8b
to
9c73384
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yongtang here are the things I have observed:
- Since you added
/usr/bin
to$PATH
(export PATH=/usr/bin:$PATH
) the github action is using python3.8.2
. However, the one readily available is3.8.6
in/usr/local/bin
.
+ which python3
/usr/local/bin/python3
+ python3 --version
+ python3 -c 'import site; print(site.getsitepackages())'
Python 3.8.6
Based on #1167.
- Also, I am not sure why the
requirements.txt
modification is required, as this PR: [github-action] fix macOS task #1167 passes without those changes. Is this because users have python3.7 as system default as of now? Also, this change might affect users trying to install the lint dependencies while using python3.8.
Please let me know if I am missing something here. Thanks.
See giampaolo/psutil#1832 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
export ARCHFLAGS="-arch x86_64"
@kvignesh1420 As mentioned in #1167 (comment) the system default python3 (comes with macOS itself, not with Python.org download, brew, or pyenv, etc) is 3.8.2. In GitHub Actions machines, brew was used to install additional versions of python3. So that is why you see If your macOS machine only comes from a clean OS install (no brew), then you will notice there is only Since there are too many ways to install python3, our README.md is trying to stay with system default python (user does not need brew or download Python3 from python.org). If instead we support python3 with brew install, users may very well ask for additional support with other python installations as well (e.g., download from python.org). We want to avoid ending up testing too many scenarios. Thus Now there is a small glitch on system default python 3.8.2: In order to make our lint work, bazel will try to install However, as of today the latest clang with XCode will try to build with options of So some additional fix to avoid installation of After looking through giampaolo/psutil#1832 it looks like merely adding Note this measure is only temporarily. I expect Apple's macOS 11.0 (Big Sur) will fully address the issue mentioned above. (I am guessing Big Sur will be released mid-november as well when Apple Silicon ARM macBook is released). Please take a look at the updated PR and see if that helps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…ensorflow#1168) See giampaolo/psutil#1832 Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
This is an attempt to fix macOS build with system default python.
See giampaolo/psutil#1832 for similar issues.
Signed-off-by: Yong Tang yong.tang.github@outlook.com