-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Unable to build on macOS with Xcode 12: architecture not supported when building watchdog #3770
Comments
When did this start happeneing ? was it immediately after installing 10.15.7 ? You need to help us repro/unsdersand this issue as watchdog has been successfully building on Mac for ages and works in our CI. This suggests it's a unique problem in your environment. or something that's broken with an Xcode upgrade. |
yes, last month, I successfully built ycm on macOS. Do you have any suggestions about how can I solve the problem? |
and my python version is: |
Did you recently upgrade Xcode? What other things have you recently done on your system that might affect this. This error is coming from your system headers and clearly nothing to do with YCM code. It's actually the watchdog python module that's filling to build. |
Ah could be an Xcode-12 things ? https://developer.apple.com/documentation/xcode/building_a_universal_macos_binary seems xcodebuild is trying to build an arm target pointlessly for watchdog. |
I'm going to update to Xcode 12 and see if I can repro. You may be able to make it work by using the command line tools, rather than Xcode (see man pages for |
I can't repro. |
A workaround would be temporarily getting rid of setup tools, so that watchdog doesn't get compiled. YCM still needs a working watchdog, but it should use a different API. The downside is worse watchdog performance. |
I have solved the problem by using python3 downloaded from the official website instead of python from brew. |
@puremourning @bstaletic thanks for your kind help |
Getting the same errors here after updating to Xcode 12. Also tried switching to the command line tools but same issue (which is not surprising since it’s using the same SDK and project settings anyway). As noted above, this line implies that an arm64 slice is being built here:
Looks like the setup script for Watchdog FSEvents potentially needs to be altered. |
@ddeville thanks for the info. Now I’m confused why I can’t reproduce. I’ll try harder. |
Hey @puremourning I’ve added more info in gorakhargosh/watchdog#689. I believe the problem happens when using the Python (3.8.2) that ships with Xcode. |
Thanks So this is a Xcode python bug and the solution is to ask Apple to fix it or use upstream or homebrew python. |
I'm having the exact same issue, that's how I got here. I'm in the processes of migrating to a newer MBP with 10.15.7. Installed python 3.9 from python.org, creating a symlink to it in /usr/local/bin. Once I got rid of an PYTHONPATH variable, everything seemed to finally work....until this. Just like the OP, I'm getting
Did I miss reading the solution?? |
I experienced this issue with NeoVim and UltiSnips. Solved by running the following commands:
running
Writing it here to hopefully help someone running into the same issue. |
I don't do brew, wonder what that actually changed? By changing the
that command completes without any errors, but the original command gets rerun when doing: Certainly that brew command is just changing a symlink somewhere? |
I think this command is actually run by Python itself and the fact that it includes the arm64 slices makes me think that it's using Apple system's Python. Can you check your path (and/or do |
I have my own script to show all locations of an executable in my path with the current one highlighted in green. I suspected the coloring fill fail here, so i tried including an image above. anyway, where are both:
and it still fails. |
Issue Prelude
Please complete these steps and check these boxes (by putting an
x
insidethe brackets) before filing your issue:
Frequently Asked Questions section.
about to report and couldn't find an answer to my problem. (Example Google
search.)
vim --version
.:YcmDebugInfo
.the
:YcmToggleLogs
command.version) I am using.
my issue, using
vim -Nu /path/to/YCM/vimrc_ycm_minimal
, including what Iexpected to happen and what actually happened.
of
install.py
(orcmake
/make
/ninja
) including its invocationthat any help I receive is a selfless, heartfelt gift of their free time. I
know I am not entitled to anything and will be polite and courteous.
actually perform all of these steps.
Thank you for adhering to this process! It ensures your issue is resolved
quickly and that neither your nor our time is needlessly wasted.
Issue Details
/usr/bin/python3 install.py
YCM should compile cleanly, as it did before.
Build error. See below for a full log.
Diagnostic data
Output of
vim --version
OS version, distribution, etc.
macOS Catalina 10.15.7 (19H2)
XCode Version 12.0.1 (12A7300)
Apple clang version 12.0.0 (clang-1200.0.32.2)
Python 3.8.2
Output of build/install commands
The text was updated successfully, but these errors were encountered: