neovim / pynvim

Python client and plugin host for Nvim
http://pynvim.readthedocs.io/en/latest/
Apache License 2.0
1.48k stars 118 forks source link

Unsupported Architecture - MacOS 11/Big Sur #466

Closed TheCatster closed 3 years ago

TheCatster commented 3 years ago

Unable to use deoplete since it needs pynvim... pynvim does not successfully install on MacOS 11/Big Sur. The following output is given when attempting to run the install:

   In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/stdio.h:64:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/_stdio.h:75:
    In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/sys/_types/_va_list.h:31:
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/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 'xcrun' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/Xcode.app/Contents/Developer/usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/4r/r5tbjbv1487d37xfmc3ww6x00000gn/T/pip-install-zq00m7b4/greenlet/setup.py'"'"'; __file__='"'"'/private/var/folders/4r/r5tbjbv1487d37xfmc3ww6x00000gn/T/pip-install-zq00m7b4/greenlet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/4r/r5tbjbv1487d37xfmc3ww6x00000gn/T/pip-record-omfl81fm/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

Any help or a status update for this would be great! Thank you.

bfredl commented 3 years ago

@TheCatster would you mind giving me a pirate copy of the four files mentioned in the traceback above? I don't own a mac, sorry.

TheCatster commented 3 years ago

I can, although does that help? I'm not sure if xcrun is available on Linux or Windows. If so, mention me again and I'll drop a copy over.

bfredl commented 3 years ago

I can not interpret an (incomplete) error message referring to a header file if i can not actually see the full error in the file itself. And have no desire to pay Apple good money just to be able to read an error message.

TheCatster commented 3 years ago

Totally reasonable. So... I think I've partially figured this out. It still expects MacOS 10.15 Catalina, and I'm on Big Sur. There is literally no such file that it is looking for on my system. And I really don't know how to get those files. They were part of Xcode in 10.15.

bfredl commented 3 years ago

hmm are you sure? It looks like it is printing an error inside /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include/machine/types.h, not erroring out because it was not found.. Though it wouldn't surprise me if xcode is doing something weird (like pretending the path is different from where the files are actually stored, hiding them in some read only .dmg image, or whatever).

TheCatster commented 3 years ago

That’s quite strange. I am positive, within SDKs I only have a MacOS folder, which does not have the files it says it does, and a MacOS.11 one, which does have this files but isn’t that path. I’m not at my computer now, but will try to look again later. This is very strange.

bfredl commented 3 years ago

Hopefully other mac users who have upgraded will chime in eventually (not to mention m1 chip owners :)

clason commented 3 years ago

So, I have Big Sur (on Intel hardware), and pynvim works fine with me (with python3 from homebrew). Can you share the exact steps that lead to the error? (You might also have to update the command line tools after the OS upgrade.)

TheCatster commented 3 years ago

Alright, so here's exactly what I'm doing (it's possible I'm correlating unrelated issues, to be fair):

Maybe there are better ways to handle this? Possibly just switching the distribution? I still find it weird that the built in Python (yes, it's 3.8 so not the 2 one) does not work. Note that installing with my specified 3.9 install from brew does work. And I am on Intel hardware as well.

TheCatster commented 3 years ago

I will attempt some troubleshooting from different angles on my end.

clason commented 3 years ago

Again, just to make sure: when upgrading macOS, have you also upgraded Xcode or re-installed the developer tools? I can build pynvim just fine, both with homebrew python3.9 and the built-in python3.8 (with developer tools, not Xcode).

TheCatster commented 3 years ago

I'm almost positive I did, but I'm back at my computer, will try to reinstall them now.

TheCatster commented 3 years ago

And, there was the problem. I am using Xcode beta, had those developer tools installed. Went over to normal Xcode, reinstalled those developer tools, and everything is perfect. I'll close the issue now. Thank you for your help, and I hope someone in the future sees this too!