SiENcE/lovemidi

Compiling on OSX

Opened this issue · 13 comments

Hello there, thank you for your wonderful contribution to LOVE! I'm working on a visualizer for live music performance and I really want to get your code working so I can trigger events with my midi keyboard.

I'm trying to compile your code on OSX and face the following error:

src/luamidi.cpp:97:3: error: use of undeclared identifier 'luaL_typerror'; did you mean 'luaL_argerror'?

(There are more errors, all similar.)

Googling the error makes it seem like I might need to use Lua 5.1 instead of Lua 5.2 to compile? Unfortunately it would be difficult for me to downgrade, so that's a last resort for me. Do you think that is really the problem? If so, maybe I can learn how to port Lua 5.1 to 5.2.

EDIT: Well, the good news is I got it to compile and it seems to run fine now! The bad news is, as I suspected, I had to downgrade to Lua 5.1. Homebrew versioning is not nice these days so I uninstalled the homebrew version of Lua and compiled 5.1 myself.

Hi. I take a look into it, when i do upgrade this libray soon.

On linux, this is solved by installing the compat- versions of lua and pointing the makefile at the correct version. Maybe a more universal solution is including the luajit headers instead of the lua-5.1 headers. Comments on the love discord hinted in this direction.

So, I have a basic compile working, it probably needs some reviews/suggestions. Are you taking PR's for this feature ?

Yes, of course. But I can't validate it because I don't have OSX to test at the moment.

I will clean up the version on my repository, try and get it to the same point as the windows DLLs. I am building the M1/M2/M3 .dylib file for arm64 and not intel based macs. Macs are weird.

I should note that I could not get the version of rtmidi included in this repo to build. (I dont think it supports macos arm)

Requesting comments and feedback #5

I have merged two other open pull requests. There is now a conflict in the makefile. Please take a look at it. Thank you

As stated in the MR, This is not a trivial fix and I'll need some time to address it, if I'm capable and have the time.

I've got a little further, I have it working, but still need the lua 5.1 sources (now removed) from this repo to work correctly.

I can create a MR , but it drags back in all the lua source that you have just removed.

Let me know what you wantand I can go ahead with a plan.

hey. i can't see the mr/pr.

The pr has not been made as it drags back in the newly deleted LuaJIT directory. As it appears that you do want it, I'll do it next time I'm at that machine.

Just make the pr, i review it. Why is it needed to include it?