Murga-Projects Forums

Full Version: Lua stand-alone audio library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
ok, I had a look at the issue reported by jpjacobs, and, to my dislike, also on my machine I cannot get proteaAudio working under murgaLua Linux.

I'm wondering what could be the cause of it, my first guess was that there is something missing in murgaLua like bindings to libdl or so. Indeed, a test of murgaLua with ldd returned "Not a dynamic executable." However, then I realized that murgaLua is packed with upx, after decompression it obviously shows its binding to libdl.

So I do not have the slightest clue why there is this error. Since proteaAudio works with the unchanged standard Lua, this gives me the impression that there's something special with murgaLua. Has anyone ever been successful in creating a dynamic lua C module working with murgaLua under Linux? If yes, I'd be really keen on peeping in the Makefile. Please, if someone knows something about this, let me know, I'll happily adapt my build script.

Quote:
Has anyone ever been successful in creating a dynamic lua C module working with murgaLua under Linux?

I'm no expert, but I've never successfully built a Linux C library for murgaLua, but I haven't had any success with Lua either.

znarf Wrote:
ok, I had a look at the issue reported by jpjacobs, and, to my dislike, also on my machine I cannot get proteaAudio working under murgaLua Linux.

I'm wondering what could be the cause of it, my first guess was that there is something missing in murgaLua like bindings to libdl or so. Indeed, a test of murgaLua with ldd returned "Not a dynamic executable." However, then I realized that murgaLua is packed with upx, after decompression it obviously shows its binding to libdl.

So I do not have the slightest clue why there is this error. Since proteaAudio works with the unchanged standard Lua, this gives me the impression that there's something special with murgaLua. Has anyone ever been successful in creating a dynamic lua C module working with murgaLua under Linux? If yes, I'd be really keen on peeping in the Makefile. Please, if someone knows something about this, let me know, I'll happily adapt my build script.


What type of error do you get? (Is it a segmentation fault or a linker problem)

I did try it and it works without a problem. It looks like you are using an older compiler, because I had to make a few changes to compile it, but then it worked without any problems.

To comile it with a newer compiler. you have to add "#include <cstdlib>" to playAudioRt.cpp and proAudioRt.cpp. proAudioRt.cpp also needs "<cstring>" and "<climits>", while "<cstdio>" is not needed. If this changes are made it should also compile with a current gcc.

Of course you also have to explictely link it to liblua.so either statically (which doesn't make sense) or dynamically. Therefore you need a compatible liblua.so.5.1 installed in a place where the dynamic linker can find it. While murgaLua is statically linked against liblua, it unfortunatelly doesn't extort those symbols and it also has no dependency for liblua set. Therefore your library needs the liblua dependency, so that the linker can load it and resolve those symbols. If you wan't to use a precompiled library that isn't exlicitely linked against liblua, then you can still preload it like: "LD_PRELOAD=/usr/lib/liblua.so murgaLua my_app.lua"

Juergen

znarf Wrote:
ok, I had a look at the issue reported by jpjacobs, and, to my dislike, also on my machine I cannot get proteaAudio working under murgaLua Linux.


I am currently trying your lib with all the official murgaLua ports.

I didn't have any probs with Intel Linux, however, the new OpenMoko murgaLua does have some problems that I had to patch RtAudio itself in order to fix.

I have a lot of testing left to do, but it is something that I'd like to bundle with the final runtimes (if you don't mind).

As to when that will be, I don't know as I am very busy with work and I keep on making little tweaks to murgaLua.

Cheers
John de Murga

Hi,
thanks again for your feedback. I've updated proteaAudio according to Juergen's suggestions (additional includes) and moved the files in the zip archives to single subfolders (thanks to Jan-Pieter for this idea).

Quote:
the new OpenMoko murgaLua does have some problems that I had to patch RtAudio itself in order to fix.

I've updated rtAudio to the brand-new 4.0.5 release, which seems to fix a few issues.

Quote:
I have a lot of testing left to do, but it is something that I'd like to bundle with the final runtimes (if you don't mind).

Of course you are very welcome to bundle proteaAudio, as one of my motivations when writing it was to give something back to murgaLua.
If possible, I'd also like to apply your patches to the proteaAudio stand-alone release, in order to keep future improvements compatible.

Regards,
Gerald

znarf Wrote:
Hi,
thanks again for your feedback. I've updated proteaAudio according to Juergen's suggestions (additional includes) and moved the files in the zip archives to single subfolders (thanks to Jan-Pieter for this idea).

"rtaudio/RtAudio.cpp" is still missing the "#include <climits>". Otherwise I get an error, because INT_MAX is undeclared.

Also you did link explicitly against /usr/lib/liblua5.1.so which is an error. First the name should be liblua.so.5.1 and second if you link explicitly, the user has to provide the library "liblua5.1.so" (which is ill named), even if the symbols can be provided otherwise. If you use "-llua" then the compiler uses lazy linking and if the symbols can be resolved otherwise (from LD_PRELOAD or they are already imported from the interpreter or another library) the linker doesn't insist to load it.

Juergen

Juergen Wrote:
"rtaudio/RtAudio.cpp" is still missing the "#include <climits>". Otherwise I get an error, because INT_MAX is undeclared.
Also you did link explicitly against /usr/lib/liblua5.1.so which is an error.

I'd like to apologize, both things are fixed now in the source package.

Thanks for reporting,
Gerald

Pages: 1 2
Reference URL's