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

Build for arm64 Macs #12624

Merged
merged 4 commits into from
Dec 14, 2020
Merged

Build for arm64 Macs #12624

merged 4 commits into from
Dec 14, 2020

Conversation

qvacua
Copy link
Contributor

@qvacua qvacua commented Jul 11, 2020

It compiles and runs without crashes. However, to compile, I had to add

DEPS_CMAKE_FLAGS += -DCMAKE_OSX_DEPLOYMENT_TARGET=11.00

to local.mk and do

make SDKROOT=`xcrun --show-sdk-path`

CMakeLists.txt Outdated
@@ -352,7 +352,7 @@ if(CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
add_definitions(-D_GNU_SOURCE)
endif()

if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_SIZEOF_VOID_P EQUAL 8)
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL "x86_64" AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT PREFER_LUA)
Copy link
Member

Choose a reason for hiding this comment

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

It seems this isn't needed at all for LuaJIT >= 2.1.0 beta3. That would be a better check than adding the architecture.

Copy link
Contributor Author

@qvacua qvacua Jul 12, 2020

Choose a reason for hiding this comment

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

Changed the check to look for LUAJIT_VERSION LESS "2.1.0-beta3".

+++ b/bin/vterm-ctrl.c
@@ -1,4 +1,4 @@
-#define _XOPEN_SOURCE 500 /* strdup */
+#define _XOPEN_SOURCE 600 /* strdup */
Copy link
Member

Choose a reason for hiding this comment

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

This should be fixed upstream. Cc @leonerd

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted the commit and created neovim/libvterm#6.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the PR to use the newest revision of libvterm and adapted a line of code.

Copy link
Member

Choose a reason for hiding this comment

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

and adapted a line of code.

That's an unreleased API change. We shouldn't be pulling that in. @leonerd, any chance of a maintenance release while the mainline stabilizes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ups, reverted the commit.

@jamessan jamessan added the status:blocked-external Needs a third-party / external change or fix label Aug 6, 2020
@jamessan
Copy link
Member

jamessan commented Aug 6, 2020

@leonerd Can you please release a new libvterm with the _XOPEN_SOURCE fix? Also, it should be made unconditional. That change is in no way specific to macOS.

@leonerd
Copy link
Contributor

leonerd commented Aug 22, 2020

0.1.4 now at http://www.leonerd.org.uk/code/libvterm/

@qvacua
Copy link
Contributor Author

qvacua commented Aug 22, 2020

Updated the PR. I'll test on an arm64 Mac that it really builds next week once I'm back at home.

@jamessan jamessan linked an issue Aug 22, 2020 that may be closed by this pull request
@clason
Copy link
Member

clason commented Aug 26, 2020

@jamessan probably a candidate for backporting to release-0.4? (same for #12676)

Maybe it would be a good idea to separate out the libvterm bump for easier backporting (I assume the LuaJIT bump and ARM setup don't really make sense to backport.)

@clason
Copy link
Member

clason commented Aug 26, 2020

@qvacua I just tested this on non-ARM macOS and got

/Library/Developer/CommandLineTools/usr/bin/make -C src
Makefile:319: *** missing: export MACOSX_DEPLOYMENT_TARGET=XX.YY.  Stop.
make[1]: *** [src/luajit] Error 2

The build works correctly (modulo the _XOPEN_SOURCE fix) without these changes.

EDIT This is due to the following commit pulled in now: LuaJIT/LuaJIT@8961a92
So the corresponding CMake file needs to be adapted here:

set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")

It seems that you can no longer "trick" the LuaJIT build system with an empty MACOSX_DEPLOYMENT_TARGET but actually have to specify a valid target now. Would it make sense to provide a default here?
I don't know what the correct (non-ARM) version would be? The same as LuaJIT's default, 10.4, doesn't work, but 10.9 seems to work:

   if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
     if(CMAKE_OSX_DEPLOYMENT_TARGET)
       set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET}")
     else()
       set(DEPLOYMENT_TARGET "MACOSX_DEPLOYMENT_TARGET=10.9")
     endif()
    else()
      set(DEPLOYMENT_TARGET "")
    endif()

This additional change makes this patch build correctly on Intel macOS, at least; lua seems to work fine in a cursory test. (You'd need to add a case for ARM hardware setting DEPLOYMENT_TARGET to 11.0, of course.)

Otherwise this change for the macOS build (that you now have to set the CMAKE_OSX_DEPLOYMENT_TARGET environment variable) should be documented in the build instructions (and in "following HEAD").

EDIT3 Out of interest, I also checked Linux x86_64; there the patch (especially the bumped LuaJIT) builds fine out of the box.

EDIT4 Testing a bit further, it seems there are in fact other changes in LuaJIT behavior -- for example, math.max seems to behave differently with the new version, leading to errors in lua plugins.

Can you comment on the LuaJIT bump, by the way? Is that a released (beta) version?

@jamessan jamessan removed the status:blocked-external Needs a third-party / external change or fix label Aug 27, 2020
@jamessan
Copy link
Member

Maybe it would be a good idea to separate out the libvterm bump for easier backporting

Agreed. Let's do that first, since it's a clean and obvious fix and then there can be follow up work for other issues specific to the macOS/arm problems.

set(LIBVTERM_URL https://github.com/neovim/libvterm/archive/65dbda3ed214f036ee799d18b2e693a833a0e591.tar.gz)
set(LIBVTERM_SHA256 95d3c7e86336fbd40dfd7a0aa0a795320bb71bc957ea995ea0e549c96d20db3a)
set(LIBVTERM_URL http://www.leonerd.org.uk/code/libvterm/libvterm-0.1.4.tar.gz)
set(LIBVTERM_SHA256 bc70349e95559c667672fc8c55b9527d9db9ada0fb80a3beda533418d782d3dd)
Copy link
Member

@justinmk justinmk Aug 30, 2020

Choose a reason for hiding this comment

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

yikes, no https? I really wish git-bzr did not mess up the hashes, that is the main problem with https://github.com/neovim/libvterm as a mirror . OTOH leonerd.org.uk has failed dozens of builds from network errors...

Copy link
Member

Choose a reason for hiding this comment

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

No, leonerd.org.uk doesn't support https... (I checked for #12797)

What is the issue with the hashes? That they have to be recomputed manually?

Copy link
Member

Choose a reason for hiding this comment

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

What is the issue with the hashes? That they have to be recomputed manually?

somehow git-bzr changes the hashes every time we update the mirror: https://github.com/neovim/bot-ci/blob/c799c16b003db67e353542ee7f1494731931dc6b/ci/sync-mirrors.sh#L46

not sure if we're using git-bzr wrong or if bzr just sucks.

Copy link
Member

Choose a reason for hiding this comment

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

actually it seems like that maybe isn't happening anymore ? if so then there's no reason to use leonerd.org.uk ...

Copy link
Member

Choose a reason for hiding this comment

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

except that the mirror isn't updated yet...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ups, I did not notice the missing s in http. I'll update the PR to use neovim/libvterm@54c03b2.

Copy link
Member

Choose a reason for hiding this comment

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

@qvacua the bump was already merged in #12797, by the way, so you can just rebase.

@qvacua
Copy link
Contributor Author

qvacua commented Aug 31, 2020

Neovim builds successfully and seems to work w/o problems on an arm64 Mac.

@clason : I bumped the LuaJIT version since there were recent commits which fixed the build on arm64 Macs. I am not sure about incompatibilities introduced by the bump though.

Regarding setting the deployment target: IMO, your suggestion is a good one. @justinmk , @jamessan: What is the officially supported minimum deployment target of Neovim? I guess 10.9, which @clason suggested, would also depend on the version of Xcode used. I think setting a default deployment target should be done in a different PR?

For the sake of completeness: AFAICS, there are usually three "sources" for deployment target when building on macOS

  1. libintl is usually installed by brew with deployment target equal to the macOS you're currently using.
  2. Setting DEPS_CMAKE_FLAGS="-DCMAKE_OSX_DEPLOYMENT_TARGET=xyz" will set the deployment target of LuaJIT, but not other dependencies as it seems. Other dependencies simply do not have that information which can be checked by otool by looking for the LC_VERSION_MIN_MACOSX keyword.
  3. Setting MACOSX_DEPLOYMENT_TARGET=xyz set the deployment target for other dependencies and the nvim binary itself.

It's not a big deal that the deployment targets of the dependencies and the nvim binary are different since no macOS specific APIs are used, I guess, but you most probably will get a warning at the end when building Neovim.

@mikelxc
Copy link

mikelxc commented Nov 17, 2020

Tried to build on MacBook Pro M1, LuaJIT failed to work out of box, an easy fix will be create a symlink for luajit in the bin folder and give it the name Lua.

However, even after that fix, still failed to build with error code

cd /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime/pack/dist/opt/matchit && /opt/homebrew/Cellar/cmake/3.18.4/bin/cmake -E copy_directory /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/runtime/pack/dist/opt/matchit /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime/pack/dist/opt/matchit
cd /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime && /opt/homebrew/bin/luajit /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/scripts/genvimvim.lua /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/src/nvim /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime/syntax/vim/generated.vim /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/funcs_data.mpack
cd /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime && /opt/homebrew/Cellar/cmake/3.18.4/bin/cmake -E copy_directory /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/runtime/doc doc
cd /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime/pack/dist/opt/vimball && /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ doc -c quit
cd /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime/pack/dist/opt/matchit && /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ doc -c quit
/bin/sh: line 1: 73068 Killed: 9               /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ doc -c quit
/bin/sh: line 1: 73069 Killed: 9               /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ doc -c quit
make[2]: *** [runtime/pack/dist/opt/matchit/doc/tags] Error 137
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [runtime/pack/dist/opt/vimball/doc/tags] Error 137
cd /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/runtime && /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ ++t\ doc -c quit
/bin/sh: line 1: 73071 Killed: 9               /tmp/neovim-20201117-69850-1umpkrt/neovim-0.4.4/build/bin/nvim -u NONE -i NONE -e --headless -c helptags\ ++t\ doc -c quit
make[2]: *** [runtime/doc/tags] Error 137
make[1]: *** [runtime/CMakeFiles/runtime.dir/all] Error 2
make: *** [all] Error 2

@clason
Copy link
Member

clason commented Nov 17, 2020

You are trying to build an older released version that doesn't have the necessary patches, and using homebrew to boot. Can you please try building master (git clone https://github.com/neovim/neovim.git, cd neovim, make)?

@mikelxc
Copy link

mikelxc commented Nov 17, 2020

截屏2020-11-17 下午7 19 41

截屏2020-11-17 下午7 20 02

Got the same error code for both brew install Neovim --HEAD and building from master

@clason
Copy link
Member

clason commented Nov 17, 2020

Thank you for testing. So it looks like neovim actually builds correctly, but the binary crashes or hangs(?) afterwards when generating help tags.

Could you try running env VIMRUNTIME=./runtime ./build/bin/nvim and see what happens?

@mikelxc
Copy link

mikelxc commented Nov 17, 2020

Thank you for testing. So it looks like neovim actually builds correctly, but the binary crashes or hangs(?) afterwards when generating help tags.

Could you try running env VIMRUNTIME=./runtime ./build/bin/nvim and see what happens?

This is what I get

[1]    42097 killed     env VIMRUNTIME=./runtime ./build/bin/nvim

I tried to delete the whole folder and clone it again and rebuilt it with
export MACOSX_DEPLOYMENT_TARGET=11.0
Still get the same error.

@clason
Copy link
Member

clason commented Nov 17, 2020

Can you get a stacktrace or something? That's not a lot to go on...

(And just to make sure -- you are using this PR and following the instructions in the description?)

@mikelxc
Copy link

mikelxc commented Nov 17, 2020

Not 100% sure if I'm on the right track, but this is what I got

Undefined symbols for architecture arm64:
  "_custom_ui_autocmds_groups", referenced from:
      _apply_autocmds_group in fileio.c.o
  "_custom_ui_rpcevent_subscribed", referenced from:
      _nvim_subscribe in vim.c.o
  "_custom_ui_start", referenced from:
      _ui_builtin_start in ui.c.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@qvacua
Copy link
Contributor Author

qvacua commented Nov 17, 2020

@mikelxc: At least on the DTK, the master does not run and is killed immediately similar to what you wrote. The reason is when the LuaJit library is linked, master sets some parameters which do not work on arm64 Macs. This PR sets those parameters only when appropriate. I've successfully compiled and run the branch of this PR on the DTK.

@qvacua
Copy link
Contributor Author

qvacua commented Nov 17, 2020

BTW: Compilation succeeds only when DEPS_CMAKE_FLAGS += -DCMAKE_OSX_DEPLOYMENT_TARGET=11.00 is set as in my first comment in this PR.

@qvacua
Copy link
Contributor Author

qvacua commented Nov 17, 2020

@mikelxc: The _custom_ui_autocmds_groups errors are specific to the master branch of my fork (for VimR). You should checkout the build-arm64-mac branch.

@mikelxc
Copy link

mikelxc commented Nov 18, 2020

It now builds without a problem after switching to the "build-arm64-mac" branch!

@stefanpenner
Copy link

For anyone having issues, or simply lazy (like me), the following steps can likely be blindly followed:

git clone git@github.com:neovim/neovim
cd neovim
git remote add qvacua git@github.com:qvacua/neovim.git
echo "DEPS_CMAKE_FLAGS += -DCMAKE_OSX_DEPLOYMENT_TARGET=11.00" >> local.mk
make SDKROOT=`xcrun --show-sdk-path`

Resulting in a functioning nvim at ./build/bin/nvim, and it is correctly built as arm64

~/s/n/neovim (build-arm64-mac)> file build/bin/nvim 
build/bin/nvim: Mach-O 64-bit executable arm64

@menssen
Copy link

menssen commented Nov 24, 2020

It's amazing how when somebody says "if you're lazy, just copy and paste this!" you tend to just do it, even when you know there's obviously a step missing. So if anybody else is as lazy as I was, here is the last comment, slightly corrected. (Either way, thanks @stefanpenner!)

git clone git@github.com:neovim/neovim
cd neovim
git remote add qvacua git@github.com:qvacua/neovim.git
git fetch qvacua
git checkout build-arm64-mac
echo "DEPS_CMAKE_FLAGS += -DCMAKE_OSX_DEPLOYMENT_TARGET=11.00" > local.mk
make SDKROOT=`xcrun --show-sdk-path`

@jamessan
Copy link
Member

Looks like LuaJIT/LuaJIT@ff34b48 brought out some issues in our test stack -- still not sure if it's in our code or busted.

Once we get a handle on those, we should be able to merge this PR.

@mattnibs
Copy link
Contributor

@jamessan is there any way I can help this along? Would be great to get this into master.

@jamessan
Copy link
Member

We need to figure out why some of our tests are failing like below with this PR and fix it.

  [  ERROR   ] 9 errors, listed below:
  [  ERROR   ] test/functional/plugin/lsp_spec.lua @ 265: LSP basic_init test should verify capabilities sent
  test/helpers.lua:73: exit code
  Expected objects to be the same.
  Passed in:
  (number) 101
  Expected:
  (number) 0
  ------------------------------------------------------------------------------
  $NVIM_LOG_FILE: Xtest-fake-lsp.log
  (last 999 lines)
  ERROR LSP: test/functional/fixtures/fake-lsp-server.lua:29: assert_eq failed: left == "\"shutdown\"", right == "\"test\""
  ERROR LSP: test/functional/fixtures/fake-lsp-server.lua:29: assert_eq failed: left == "{\
  ------------------------------------------------------------------------------
  
  
  stack traceback:
  	test/helpers.lua:73: in function 'eq'
  	test/functional/plugin/lsp_spec.lua:277: in function 'on_exit'
  	test/functional/plugin/lsp_spec.lua:109: in function 'test_rpc_server'
  	test/functional/plugin/lsp_spec.lua:269: in function <test/functional/plugin/lsp_spec.lua:265>

@clason
Copy link
Member

clason commented Dec 11, 2020

In particular, why the capabilities table is sorted differently in the two code paths that are compared there.

@mattnibs
Copy link
Contributor

I believe I have a fix for this here: qvacua#1

(Wasn't sure the appropriate was of including this with this pr).

qvacua and others added 4 commits December 13, 2020 21:03
This is properly handled in LuaJIT now and setting causes "Malformed
Mach-o file" error when running the resulting binary on arm64 Macs.
LuaJIT build now requires specifying a deployment target, so use the
same baseline as our nightly builds.

Co-authored-by: Christian Clason <christian.clason@uni-due.de>
Apparently the new version of LuaJIT changed the consistency with which it
sorted table dictionaries. IIRC lua sorts dictionary keys by memory address, so
it would appear that the reasons tests were previously passing was because of
a differentiation in the implementation of the lua runtime.

Ensure that array fields in the lsp protocol tables are consistently created,
by using ipair when generating arrays for completionItemKind and
symbolItemKind.

For CodeActionKind, the current implementation includes both the keys and the
values in the array. This is incorrect. Ensure that only the values are
included in the array and sort them for consistency.
@TC72
Copy link

TC72 commented Dec 14, 2020

It's amazing how when somebody says "if you're lazy, just copy and paste this!" you tend to just do it, even when you know there's obviously a step missing. So if anybody else is as lazy as I was, here is the last comment, slightly corrected. (Either way, thanks @stefanpenner!)

git clone git@github.com:neovim/neovim
cd neovim
git remote add qvacua git@github.com:qvacua/neovim.git
git fetch qvacua
git checkout build-arm64-mac
echo "DEPS_CMAKE_FLAGS += -DCMAKE_OSX_DEPLOYMENT_TARGET=11.00" > local.mk
make SDKROOT=`xcrun --show-sdk-path`

When I follow this I get:
FAILED: src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o

@clason
Copy link
Member

clason commented Dec 14, 2020

@TC72 make sure to make distclean beforehand. Also, this PR is now merged, so if you update neovim to HEAD, you should only need the last two lines. If these don't work for you, please open a new issue with full information to reproduce this (especially your system).

@Keating950
Copy link

@clason, for what it's worth, I didn't even need the last two lines to build successfully on my M1 mini.

@TC72
Copy link

TC72 commented Dec 15, 2020

@clason, for what it's worth, I didn't even need the last two lines to build successfully on my M1 mini.

Is there any chance you could walk through exactly how you did it. I've tried everything and still can't get it to build. There's obviously something wrong with my setup if it's working for others.

@yingzhu146
Copy link

ninja  -C build
ninja: Entering directory `build'
[301/321] Building C object src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o
FAILED: src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o 
/Library/Developer/CommandLineTools/usr/bin/cc -DINCLUDE_GENERATED_DECLARATIONS -DMIN_LOG_LEVEL=1 -DNVIM_MSGPACK_HAS_FLOAT32 -D_GNU_SOURCE -Dnvim_EXPORTS -Iconfig -I../src -Isrc/nvim/auto -Iinclude -I../.deps/usr/include/luajit-2.1 -isystem ../.deps/usr/include -isystem /opt/local/include -isystem /Library/Frameworks/R.framework/Headers -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -MD -MT src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o -MF src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o.d -o src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o -c ../src/nvim/tui/tui.c
../src/nvim/tui/tui.c:552:7: error: no member named 'i' in 'unibi_var_t'
      UNIBI_SET_NUM_VAR(data->params[0], standout);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Same here @TC72 - even after make distclean, and after deleting and pulling from master from fresh install

@TC72
Copy link

TC72 commented Dec 17, 2020

ninja  -C build
ninja: Entering directory `build'
[301/321] Building C object src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o
FAILED: src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o 
/Library/Developer/CommandLineTools/usr/bin/cc -DINCLUDE_GENERATED_DECLARATIONS -DMIN_LOG_LEVEL=1 -DNVIM_MSGPACK_HAS_FLOAT32 -D_GNU_SOURCE -Dnvim_EXPORTS -Iconfig -I../src -Isrc/nvim/auto -Iinclude -I../.deps/usr/include/luajit-2.1 -isystem ../.deps/usr/include -isystem /opt/local/include -isystem /Library/Frameworks/R.framework/Headers -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -g -arch arm64 -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fno-common -fdiagnostics-color=always -MD -MT src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o -MF src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o.d -o src/nvim/CMakeFiles/nvim.dir/tui/tui.c.o -c ../src/nvim/tui/tui.c
../src/nvim/tui/tui.c:552:7: error: no member named 'i' in 'unibi_var_t'
      UNIBI_SET_NUM_VAR(data->params[0], standout);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Same here @TC72 - even after make distclean, and after deleting and pulling from master from fresh install

There is a patch which fixes everything, I'm now able to build for a native version. Have a look at this thread:
#13533 (comment)

BUT, checking there now there may be a new issue.

carlocab added a commit to carlocab/homebrew-core that referenced this pull request Feb 10, 2021
Patch for Apple Silicon backported from

    neovim/neovim#12624

Follow up to Homebrew#68787.
BrewTestBot pushed a commit to Homebrew/homebrew-core that referenced this pull request Feb 10, 2021
Patch for Apple Silicon backported from

    neovim/neovim#12624

Follow up to #68787.

Closes #70053.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
@qvacua qvacua deleted the build-arm64-mac branch December 6, 2021 20:25
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.