-
Notifications
You must be signed in to change notification settings - Fork 33
Lovely project! I would like to run demo_luajit.lua on macOS #14
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
Comments
Hi @whoamigo |
Thank you for the fast response @r-lyeh but However, while checking the compilation output without the -w -g switches, I noticed that I'm anxious to see this working as I really love your project's goals 👍 |
Hmmm... Glad is not really mandatory on OSX as far as I know. I left it enabled because all demos worked and for consistency as well. I guess it could just work without glad at all. Ok, you could try to remove the glad headers in the |
Oh btw, silly me, you should compile the dynamic library with |
@r-lyeh wait a minute :) I just noticed my build commands were also pulling demo.c inside the dylib and |
Ok no hurries. If you use discord, we got a discord channel in https://discord.gg/hffwjfCJ |
Meanwhile I think I have a better build command here:
which gives me less GL macro redefinitions but unfortunately crashes LuaJIT with a SIGSEGV (Address boundary error). |
It gets past: local fwk=require('fwk')
print(fwk)
fwk.window_create(75.0,0) -- but crashes on window_create() Do you have some easier function to test it such as fwk.version or alike :) FFI bugs can be quite hard to understand. |
That command-line looks much better to me too. |
Ok, I've pushed a fix for the crash. Let me know how that goes. You might need to invoke |
Awesome, that did it! You may want to add this command to build the dylib on macOS:
Not sure about the need to add the opengl framework though, but the more the merrier ;). Keep up the good work! 👍 |
Aye cool! I'll add the info to the readme! Ty! |
Btw, does it work if you remove the |
Fix: #13, variadic data_count(...) Fix: #14 crash when no fwk.ini is present (@whoamigo), Upd: sfxr2wav.osx (@RafaVico), sfxr2wav.linux (@procedural), libassimp.so.5.1.4 (@procedural) Upd: dll, bindings, docs.
@r-lyeh P.S.- Steady at 9.7% CPU and 39.3 MB Memory (boot 1.64s, 60/62fps) ;) |
Fix: r-lyeh#13, variadic data_count(...) Fix: r-lyeh#14 crash when no fwk.ini is present (@whoamigo), Upd: sfxr2wav.osx (@RafaVico), sfxr2wav.linux (@procedural), libassimp.so.5.1.4 (@procedural) Upd: dll, bindings, docs. Former-commit-id: 5bb3826a1bfda14af2c081b1071dd32ac3a675da [formerly 623d27d] Former-commit-id: 6fc8726decd7a0c92d039f8adafef727368d6cc3
Fix: r-lyeh#13, variadic data_count(...) Fix: r-lyeh#14 crash when no fwk.ini is present (@whoamigo), Upd: sfxr2wav.osx (@RafaVico), sfxr2wav.linux (@procedural), libassimp.so.5.1.4 (@procedural) Upd: dll, bindings, docs. Former-commit-id: 5bb3826a1bfda14af2c081b1071dd32ac3a675da [formerly 623d27d] Former-commit-id: 6fc8726decd7a0c92d039f8adafef727368d6cc3 Former-commit-id: 3f7ba17
Fix: r-lyeh#13, variadic data_count(...) Fix: r-lyeh#14 crash when no fwk.ini is present (@whoamigo), Upd: sfxr2wav.osx (@RafaVico), sfxr2wav.linux (@procedural), libassimp.so.5.1.4 (@procedural) Upd: dll, bindings, docs. Former-commit-id: 5bb3826a1bfda14af2c081b1071dd32ac3a675da [formerly 623d27d] Former-commit-id: 6fc8726decd7a0c92d039f8adafef727368d6cc3 Former-commit-id: 3f7ba17 Former-commit-id: dd08f469fe072dab4f56adea3bfb72f19b5dabfd [formerly dabf664813ab0cd50ed64604a97d2b271f8576cc] [formerly 33d1107a08c533a4249fadfdc533bfd1cba17d44 [formerly 8e4c490]] Former-commit-id: 1131f06cacdc97983e79244770f95415bd1f564c [formerly 6586306975623b121e4a4a5b9d63f106719b14ce] Former-commit-id: b67aac2f42a428f955a24a5c9b27247889b14f4c
Fix: r-lyeh#13, variadic data_count(...) Fix: r-lyeh#14 crash when no fwk.ini is present (@whoamigo), Upd: sfxr2wav.osx (@RafaVico), sfxr2wav.linux (@procedural), libassimp.so.5.1.4 (@procedural) Upd: dll, bindings, docs. Former-commit-id: 5bb3826a1bfda14af2c081b1071dd32ac3a675da [formerly 623d27d] Former-commit-id: 6fc8726decd7a0c92d039f8adafef727368d6cc3 Former-commit-id: 3f7ba17 Former-commit-id: dd08f469fe072dab4f56adea3bfb72f19b5dabfd [formerly dabf664813ab0cd50ed64604a97d2b271f8576cc] [formerly 33d1107a08c533a4249fadfdc533bfd1cba17d44 [formerly 8e4c490]] Former-commit-id: 1131f06cacdc97983e79244770f95415bd1f564c [formerly 6586306975623b121e4a4a5b9d63f106719b14ce] Former-commit-id: b67aac2f42a428f955a24a5c9b27247889b14f4c Former-commit-id: 5c08bb9
On macOS 11.6.1, every other C demo runs fine, but running
luajit demo_luajit.lua
with LuaJIT 2.1.0-beta3 I get:luajit: dlopen(libfwk.dylib, 5): Symbol not found: _glad_glEnable Referenced from: libfwk.dylib Expected in: flat namespace in libfwk.dylib
I built
libfwk.dylib
with the following commands:I looks like I need to install glad2 somehow. Checked on the homebrew side but found no available formula with that name.
Thank you for any help getting past this point and good luck with your awesome project!
The text was updated successfully, but these errors were encountered: