robbielyman / seamstress

seamstress is an art engine
GNU General Public License v3.0
123 stars 12 forks source link

Issue loading lpeg dependency #121

Closed whitmo closed 3 months ago

whitmo commented 8 months ago

Description

Installed lpeg via luarocks, attempted to import it via seamstress cmd prompt:

...
> seamstress version: 1.4.1
> require'lpeg'
error loading module 'lpeg' from file '/opt/homebrew/lib/lua/5.4/lpeg.so':
    dlopen(/opt/homebrew/lib/lua/5.4/lpeg.so, 0x0006): symbol not found in flat namespace '_lua_settable'
stack traceback:
    [C]: in ?
    [C]: in function 'require'
    stdin:1: in main chunk

Information

whitmo commented 8 months ago

per @ryleelyman :

"i suspect the problem is that seamstress is compiling its own lua rather than using the one on your system."

Suggested possible solution of homebrew recipe optionally using local lua rather than statically compiled lua.

robbielyman commented 6 months ago

just to circle back on this: my build of seamstress 2 (which is not really ready for use yet) can successfully find lpeg. i'll leave this open until i merge the seamstress 2 branch, but i'll also comment here when it's sort of minimally ready for use :)

robbielyman commented 3 months ago

hey, i just wanted to follow up on this: i can no longer reproduce. steps:

$ luarocks path
export LUA_PATH='/opt/homebrew/Cellar/luarocks/3.11.1/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?.lua;/opt/homebrew/share/lua/5.4/?/init.lua;/opt/homebrew/lib/lua/5.4/?.lua;/opt/homebrew/lib/lua/5.4/?/init.lua;./?.lua;./?/init.lua;/Users/rylee/.luarocks/share/lua/5.4/?.lua;/Users/rylee/.luarocks/share/lua/5.4/?/init.lua'
export LUA_CPATH='/opt/homebrew/lib/lua/5.4/?.so;/opt/homebrew/lib/lua/5.4/loadall.so;./?.so;/Users/rylee/.luarocks/lib/lua/5.4/?.so'
...

if i then run those two export commands, the following works fine:

$ seamstress
SEAMSTRESS
seamstress version: 1.4.6
>> searching for MIDI mapping: /Users/rylee/seamstress/data/script/script.pmap
>> MIDI mapping file not present, using defaults
> require'lpeg'
table: 0x6000022ea440   /opt/homebrew/lib/lua/5.4/lpeg.so