lovemidi icon indicating copy to clipboard operation
lovemidi copied to clipboard

Compiling on OSX

Open agargara opened this issue 6 years ago • 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.

agargara avatar Aug 07 '17 09:08 agargara

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

SiENcE avatar Dec 17 '17 11:12 SiENcE

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.

jdeeny avatar Jan 19 '19 15:01 jdeeny

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

wmealing avatar Feb 18 '24 18:02 wmealing

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

SiENcE avatar Feb 18 '24 22:02 SiENcE

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)

wmealing avatar Feb 19 '24 01:02 wmealing

Requesting comments and feedback https://github.com/SiENcE/lovemidi/pull/5

wmealing avatar Feb 19 '24 09:02 wmealing

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

SiENcE avatar Feb 26 '24 20:02 SiENcE

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.

wmealing avatar Feb 29 '24 11:02 wmealing

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.

wmealing avatar Mar 30 '24 13:03 wmealing

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.

wmealing avatar Apr 02 '24 11:04 wmealing

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

SiENcE avatar Apr 16 '24 15:04 SiENcE

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.

wmealing avatar Apr 16 '24 15:04 wmealing

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

SiENcE avatar Apr 19 '24 22:04 SiENcE