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

moonfltk in Lua 5.3 #2

Open
minosimo opened this issue Oct 13, 2023 · 5 comments
Open

moonfltk in Lua 5.3 #2

minosimo opened this issue Oct 13, 2023 · 5 comments

Comments

@minosimo
Copy link

I found stetre/moonfltk#29, but I can't seem to get freeflow to run. I think I got the dependencies all installed ok, but when running main.lua I get

luajit: error loading module 'moonfltk' from file '/home/simon/.luarocks/lib64/lua/5.1/moonfltk.so':
/home/simon/.luarocks/lib64/lua/5.1/moonfltk.so: undefined symbol: lua_newuserdatauv
stack traceback:

Since stetre does not want to officially support 5.1 I thought I'd ask here. I really believe in the idea behind freeflow and would love to try it out and contribute!

@jmthackett
Copy link
Owner

jmthackett commented Oct 13, 2023

Hi Simon!

It is great that you want to try this out, thanks!

Good find on that issue. I ended up building moonfltk by running make LUAVER=5.1 in the moonfltk repo, and then copying src/moonfltk.so in the freeflow repo to the root of the freeflow repo. Luajit should pick it up then.

The problem you'll likely have is that I've not finished porting it to FLTK yet, and it is buggy and a bit broken. It also has some pretty bad code in it. So, be forewarned.

What kind of contribution would you be interested in making? I'm curious to know if you had anything in mind.

(edited for clarity)

@minosimo
Copy link
Author

I tried that as well, but moonfltk.so ends up identical with 5.1 or 5.4

As a first contribution I thought I'd add some Fedora instructions for the dependencies. I have some experience writing lua plugins for REAPER, so I hope to be of small use somewhere.

@jmthackett
Copy link
Owner

In which case I'll have a look in the morning and see what I can work out

@jmthackett
Copy link
Owner

Can you share your cpath? Like so:

$ luajit
LuaJIT 2.1.1696795921 -- Copyright (C) 2005-2023 Mike Pall. https://luajit.org/
JIT: ON SSE3 SSE4.1 BMI2 fold cse dce fwd dse narrow loop abc sink fuse
> =package.path
./?.lua;/usr/share/luajit-2.1/?.lua;/usr/local/share/lua/5.1/?.lua;/usr/local/share/lua/5.1/?/init.lua;/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua
> =package.cpath
./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so
> 

@minosimo
Copy link
Author

I've been using luarocks so I set the LUA_PATH using luarocks path --bin --lua-version=5.1

> =package.path
/usr/share/lua/5.1/?.lua;/usr/share/lua/5.1/?/init.lua;/usr/lib64/lua/5.1/?.lua;/usr/lib64/lua/5.1/?/init.lua;./?.lua;./?/init.lua;/home/simon/.luarocks/share/lua/5.1/?.lua;/home/simon/.luarocks/share/lua/5.1/?/init.lua
> =package.cpath
/usr/lib64/lua/5.1/?.so;/usr/lib64/lua/5.1/loadall.so;./?.so;/home/simon/.luarocks/lib64/lua/5.1/?.so

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