orbitalquark / textadept

Textadept is a fast, minimalist, and remarkably extensible cross-platform text editor for programmers.
https://orbitalquark.github.io/textadept
MIT License
640 stars 38 forks source link

Enabling spell on macOS: missing symbol lua_newuserdata #181

Closed clayton256 closed 2 years ago

clayton256 commented 2 years ago

I've got another macOS issue... When I try to enable the spell check module I get an error on startup about a missing symbol:

error loading module 'spellcheck.spellosx' from file '/Users/mark/.textadept/modules/spellcheck/spellosx.so':
    dlopen(/Users/mark/.textadept/modules/spellcheck/spellosx.so, 0x0006): symbol not found in flat namespace '_lua_newuserdata'

Looking around it appears lua_newuserdata has been replaced with lua_newuserdatauv.

I started installing docker to try to build ta and then the spell lib to see if I could confirm this change but I will need to try again another day.

orbitalquark commented 2 years ago

Sorry for the inconvenience. You shouldn't have to install Docker and build yourself. The prebuilt binaries from GitHub should just work. If you are using Textadept 11.3 or earlier, make sure you download the textadept-spellcheck archive for it: https://github.com/orbitalquark/textadept-spellcheck/releases/tag/textadept_11.3

On a side note, you are correct that lua_newuserdata was replaced by lua_newuserdatauv, but that was for Lua 5.4.0, which was released quite some time ago. This makes me think you have an old spellcheck module, but please forgive me if I'm mistaken.

clayton256 commented 2 years ago

Sorry - I forgot to follow up on this. Yes, I must have pickup up an old set of modules somehow. Applying a fresh archive to my install did the trick. The spell module now works and I love it!

I install/upgrade textadept via brew and I keep my customizations in a $HOME/.textadept directory. I see that the brew formula does not include the modules. I wonder if the modules should be added to the formula or if they should be in a separate formula?

Thanks for everything!

Mark

On Mar 3, 2022, at 10:28 PM, orbitalquark @.***> wrote:

Sorry for the inconvenience. You shouldn't have to install Docker and build yourself. The prebuilt binaries from GitHub should just work. If you are using Textadept 11.3 or earlier, make sure you download the textadept-spellcheck archive for it: https://github.com/orbitalquark/textadept-spellcheck/releases/tag/textadept_11.3

On a side note, you are correct that lua_newuserdata was replaced by lua_newuserdatauv, but that was for Lua 5.4.0, which was released quite some time ago. This makes me think you have an old spellcheck module, but please forgive me if I'm mistaken. — Reply to this email directly, view it on GitHub https://github.com/orbitalquark/textadept/issues/181#issuecomment-1058790852, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANUZGCGCQ3AN3KFYL4SV63U6F7O7ANCNFSM5P4JHOVA. You are receiving this because you authored the thread.

orbitalquark commented 2 years ago

I am not familiar with brew and cannot answer that question, unfortunately. However, I'm glad the issue is resolved :)

rgieseke commented 2 years ago

For the modules the manual has:

On macOS, it is recommended to create a ~/.textadept/ directory (if it does not already exist) and unpack the modules there (thus creating or merging the modules/ directory).

I think that's the right way for Homebrew. If packagers (of any kind) change the defaults packaged with it it makes it difficult to help someone on the respective platform (since you are not sure what their defaults are anymore).