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

Error for arm_64 #4

Closed
mathjiajia opened this issue Feb 4, 2023 · 3 comments
Closed

Error for arm_64 #4

mathjiajia opened this issue Feb 4, 2023 · 3 comments

Comments

@mathjiajia
Copy link

gcc-12 -o lua/init.so -std=gnu11 -O2 init.c -shared -fPIC
Undefined symbols for architecture arm64:
  "_concat_str", referenced from:
      _opt in ccF3WkBG.o
      _luaopen_init in ccF3WkBG.o
  "_lua_call", referenced from:
      _luaopen_init in ccF3WkBG.o
  "_lua_getfield", referenced from:
      _luaopen_init in ccF3WkBG.o
      _luaopen_init in ccF3WkBG.o
  "_lua_gettop", referenced from:
      _luaopen_init in ccF3WkBG.o
  "_lua_pushlstring", referenced from:
      _luaopen_init in ccF3WkBG.o
  "_lua_remove", referenced from:
      _luaopen_init in ccF3WkBG.o
  "_nvim_set_option_value", referenced from:
      _opt in ccF3WkBG.o
  "_os_isdir", referenced from:
      _luaopen_init in ccF3WkBG.o
  "_runtimepath_default", referenced from:
      _luaopen_init in ccF3WkBG.o
  "_stdpaths_user_data_subpath", referenced from:
      _luaopen_init in ccF3WkBG.o
ld: symbol(s) not found for architecture arm64
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
@nullchilly
Copy link
Owner

Tested on my phone (arm64)

Screenshot_2023-05-27-18-54-11-699_com termux

@mathjiajia
Copy link
Author

Almost the same error message:

:!make  | tee /var/folders/g3/cq4ycwvn7lq36dxq7qk8znzc0000gn/T/nvim.jia/xvqQJD/0
mkdir -p lua/config
gcc -o lua/init.so init.c -std=gnu11 -O2 -shared -fPIC
Undefined symbols for architecture arm64:
  "_concat_str", referenced from:
      _opt in init-5cb8a5.o
      _luaopen_init in init-5cb8a5.o
  "_do_cmdline_cmd", referenced from:
      _luaopen_init in init-5cb8a5.o
  "_nvim_set_option_value", referenced from:
      _opt in init-5cb8a5.o
      _luaopen_init in init-5cb8a5.o
  "_os_isdir", referenced from:
      _luaopen_init in init-5cb8a5.o
  "_runtimepath_default", referenced from:
      _luaopen_init in init-5cb8a5.o
  "_stdpaths_user_data_subpath", referenced from:
      _luaopen_init in init-5cb8a5.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [all] Error 1

(1 of 2): mkdir -p lua/config
Error detected while processing /Users/jia/.config/nvim/init.vim:
line    8:
E5108: Error executing lua [string ":lua"]:6: module 'init' not found:
        no field package.preload['init']
        no file './init.lua'
        no file '/Users/jia/neovim/.deps/usr/share/luajit-2.1.0-beta3/init.lua'
        no file '/usr/local/share/lua/5.1/init.lua'
        no file '/usr/local/share/lua/5.1/init/init.lua'
        no file '/Users/jia/neovim/.deps/usr/share/lua/5.1/init.lua'
        no file '/Users/jia/neovim/.deps/usr/share/lua/5.1/init/init.lua'
        no file './init.so'
        no file '/usr/local/lib/lua/5.1/init.so'
        no file '/Users/jia/neovim/.deps/usr/lib/lua/5.1/init.so'
        no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
        [C]: in function 'require'
        [string ":lua"]:6: in main chunk
Press ENTER or type command to continue

@nullchilly nullchilly reopened this May 27, 2023
@nullchilly
Copy link
Owner

I borrowed my friend's M1 and debugged it finally!

image

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

No branches or pull requests

2 participants