Opened 2 years ago
Closed 3 months ago
#66077 closed defect (fixed)
neovim 0.8.0: fails to install on macOS 13.0 arm64
Reported by: | assholehoff (Anton Dahlén) | Owned by: | raimue (Rainer Müller) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.8.0 |
Keywords: | arm64 | Cc: | l2dy (Zero King) |
Port: | neovim |
Description
Port seems to build just fine, but fails to install after reaching generating help tags with :info:build dyld[50164]: symbol not found in flat namespace '_luaL_checkversion_'
in the log. The compiled binary found in .../work/build/bin
fails to load with a similar error message.
Attachments (2)
Change History (13)
Changed 2 years ago by assholehoff (Anton Dahlén)
Changed 2 years ago by assholehoff (Anton Dahlén)
Attachment: | main.log.gz added |
---|
comment:1 Changed 2 years ago by benoitc (Benoit Chesneau)
comment:2 Changed 2 years ago by hexane360 (Colin Gilgenbach)
I believe the problem is with how MacPorts is installing luarocks, as per: https://github.com/luarocks/luarocks/issues/1209
Modifying the luarocks portgroup to specify --lua-dir and --lua-version seems to fix the issue for me:
--- macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/luarocks-1.0.tcl 2022-01-25 15:12:18 +++ macports/sources/rsync.macports.org/macports/release/tarballs/ports/_resources/port1.0/group/luarocks-1.0.tcl 2022-10-27 17:00:11 @@ -88,7 +88,7 @@ proc luarocks.setup {module vers {type "src.rock"} {docs {}} {source "custom"} {implementation "luarocks"}} { global name subport luarocks.branches luarocks.default_branch luarocks.dependencies global destroot prefix distpath distname worksrcpath os.platform - global configure.cc configure.cflags configure.ldflags + global configure.cc configure.cflags configure.ldflags macosx_deployment_target global luarocks.bin luarocks.branch global luarocks.suffix luarocks.bindir luarocks.rocksdir global luarocks.module luarocks.filename luarocks.distname luarocks.project luarocks.docs @@ -179,6 +179,7 @@ destroot.env-append CC="${configure.cc}" destroot.env-append "CFLAGS=${configure.cflags} [get_canonical_archflags cc]" destroot.env-append "LDFLAGS=${configure.ldflags} [get_canonical_archflags ld]" + destroot.env-append MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target} # https://github.com/luarocks/luarocks/wiki/Types-of-rocks switch -glob ${type} { @@ -200,7 +201,7 @@ build {} destroot.cmd ${luarocks.bin} - destroot.pre_args --tree ${destroot}${prefix} + destroot.pre_args --lua-dir=${prefix} --lua-version=${luarocks.branch} --tree ${destroot}${prefix} destroot.args make --deps-mode none destroot.post_args ${distpath}/${luarocks.distname}.rockspec @@ -230,7 +231,7 @@ build {} destroot.cmd ${luarocks.bin} - destroot.pre_args --tree ${destroot}${prefix} + destroot.pre_args --lua-dir=${prefix} --lua-version=${luarocks.branch} --tree ${destroot}${prefix} destroot.args build --deps-mode none destroot.post_args ${worksrcpath}/${luarocks.distname}.src.rock @@ -261,7 +262,7 @@ build {} destroot.cmd ${luarocks.bin} - destroot.pre_args --tree ${destroot}${prefix} + destroot.pre_args --lua-dir=${prefix} --lua-version=${luarocks.branch} --tree ${destroot}${prefix} destroot.args build --deps-mode none destroot.post_args ${worksrcpath}/${luarocks.distname}.all.rock
I'm too busy to make a PR right now, but hopefully this works for other people.
comment:3 follow-up: 4 Changed 2 years ago by elventear (Pepe Barbe)
I have the same error on x86_64 on macOS 13.0. I tried applying the Portgroup suggestion for luarocks, but that did not seem to help with the problem.
comment:4 Changed 2 years ago by assholehoff (Anton Dahlén)
Replying to elventear:
I have the same error on x86_64 on macOS 13.0. I tried applying the Portgroup suggestion for luarocks, but that did not seem to help with the problem.
Just to double check; you are getting the same error even after:
- uninstalling (or deactivating)
lua
andluarocks
- cleaning any failed build
- applying the patch
- rebuilding
lua
andluarocks
My x86-64 laptop is from 2014 so I can't run anything newer than 11 on it, but it worked for me there.
comment:5 Changed 2 years ago by elventear (Pepe Barbe)
Replying to assholehoff:
It was not clear that I had to uninstall other lua packages, so I decided to try and did not work. These are the steps that I followed:
- port uninstall lua* (breaking some packages).
- port reclaim.
- apply patch.
- fix broken packages, which installs lua and lua52 back.
- port install neovim.
And it failed the same for me.
I was able to install successfully with the following steps:
- selfupdate (i.e. no patch)
- port uninstall lua* (breaking some packages)
- port reclaim
- port install neovim
- fix broken packages.
Digging a bit deeper about the missing symbol, I think luaL_checkversion was added to Lua in version 5.2, and neovim uses Lua 5.1 and I have not been able to find that function in any of the Lua 5.1 docs. I wonder if the problem is that something is linking against the wrong version of Lua when there are other versions installed.
comment:6 follow-up: 7 Changed 13 months ago by psifertex (Jordan)
An incorrect dependency seems likely. Doing a fresh install of neovim, I see:
lua51 lua51-lpeg lua51-mpack lua53 lua53-luarocks
Can't think of a good reason _both_ would be installed as a dependency of neovim.
comment:7 follow-up: 9 Changed 13 months ago by l2dy (Zero King)
Replying to psifertex:
An incorrect dependency seems likely. Doing a fresh install of neovim, I see:
lua51 lua51-lpeg lua51-mpack lua53 lua53-luarocksCan't think of a good reason _both_ would be installed as a dependency of neovim.
lua53-luarocks
is installed as a build dependency for other Lua ports. It is possible to build ports for other Lua versions with it, but I'm not sure how robust that feature is.
I have updated the luarocks 1.0
port group to explicitly specify --lua-version
, but these Lua ports have been updated to use the newer luarocks_org 1.0
port group now, so it does not matter.
nvim
does not crash on my macOS 13 device and I don't own an arm64 one, so someone who is able to reproduce the issue has to help.
By the way, I'm accepting sponsorship for a new MacBook for MacPorts development. If anyone is interested, here is the link: https://github.com/sponsors/l2dy
comment:8 Changed 12 months ago by raimue (Rainer Müller)
Keywords: | arm64 added |
---|
comment:9 Changed 3 months ago by wryfi
Replying to l2dy:
lua53-luarocks
is installed as a build dependency for other Lua ports. It is possible to build ports for other Lua versions with it, but I'm not sure how robust that feature is.I have updated the
luarocks 1.0
port group to explicitly specify--lua-version
, but these Lua ports have been updated to use the newer `luarocks_org 1.0` port group now, so it does not matter.
I don't understand why lua-5.3 is being installed as a dependency of lua-5.1 ports. That just doesn't make any sense. Something is fishy about this. See my comment in #70420.
I confirm that nothing seems to be using the luarocks 1.0
port group any more, so the originally proposed fix here is no longer relevant.
The luarocks_org 1.0
port group does depend on the luarocks 1.1
port group though, so maybe a fix is needed there? It does seem to have a --lua-version
argument in build.pre_args
and destroot.pre_args
, but not a --lua-dir
argument.
comment:10 Changed 3 months ago by wryfi
Incidentally, for anyone following along here, as described in #70420, after uninstalling lua53-luarocks
and lua53
(and ignoring the warnings about breaking lua-luarocks
) neovim built for me. If you actually use lua-5.3 for something though, this will obviously not work for you.
comment:11 Changed 3 months ago by Chris Haumesser <5400416-wryfi@…>
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
same issue there.