stetre / moonglfw

Lua bindings for GLFW
Other
67 stars 13 forks source link

ld: library not found for -llua5.4 #8

Closed salping closed 1 year ago

salping commented 1 year ago

When I try to install with macOS Ventura, following the steps, I get the error ld: library not found for -llua5.4. I installed lua@5.3 and luarocks like I was told to.

I'm on a MacBook air 2020 m1 running macOS ventura.

salping commented 1 year ago

UPDATE: also got "couldn't find " errors, but I copied the lua headers directly into /usr/local/include/ and that led me to the ld: library not found error UPDATE 2: i copied the lua libraries into usr/local/lib and moonglfw compiles without error, but when i try to run the examplr program and i get a "module not found" error for moonglfw.

stetre commented 1 year ago

Please, add the following command at the very beginning of the example script (before the require), then copy the output here:

print(package.cpath)

salping commented 1 year ago

i did that and got /opt/homebrew/lib/lua/5.4/?.so;/opt/homebrew/lib/lua/5.4/loadall.so;./?.so

stetre commented 1 year ago

Are you using Lua version 5.4 or 5.3? I just noticed that the instructions in the readme are not updated (they should say brew install lua@5.4, I believe).

salping commented 1 year ago

well, when i run lua -v it says 5.4, which i assume is due to the installation of luarocks. i did install 5.3, though

stetre commented 1 year ago

Maybe there is some version conflict. If you don't need Lua 5.3, try uninstalling it, reinstalling 5.4, and then rebuilding the library.

Unfortunately I don't have a MacOS machine so I cannot try the installation myself (the instructions to install on MacOS were provided by another user who was interested in doing it).

salping commented 1 year ago

i think i'll just wait until i get a pc later this year and try it then