lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Just tried upgrading to Lua 5.1 "final/rc",
and testing with running luaglut from lua.

Sadly, none of my 2 Mac targets work without
first patching the regular Lua distribution ? :(

1) "MacLua" - Mac OS 9 / Mac OS X (Carbon)
The CFM targets didn't work at all, since
none of the Mac patches had been included.

After applying the old patch for the beta,
and updating the exported symbols, it compiled.

Running the MacLua/Luac sample programs required:

2) "lua" - Mac OS X : make && sudo make install
The Mach-O targets didn't include the ".bundle"
suffix in the default search paths, only ".so" ?

So it couldn't find the modules to load, without
renaming them or adding symbolic links to them...

File type is: "luaglut.bundle: Mach-O bundle ppc",
it is called ".so" on Linux and ".dll" on Windows.

Luaglut also had to be updated, since the old
functions "dobuffer" and "loadlib" went missing.

But I guess that was an intended change, so I
just updated the code to use the new functions:

i.e. lua_dobuffer -> luaL_loadbuffer + lua_pcall

Finally, it did work OK! Just wondered what the
status of including the Mac patches were, or if
Mac is not really a supported platform for Lua ?
(all patches at

The GLUT demos are working fine in both Mac OS.
(both spinning the teapot, and loading textures)

Is it possible to add support for CFM libraries
and Mach-O loadable bundles (i.e. .bundle) yet ?

#if defined(LUA_USE_MACOSX)
	"./?.bundle;"  LUA_CDIR"?.bundle;" LUA_CDIR"loadall.bundle;" \
	"./?.so;"  LUA_CDIR"?.so;" LUA_CDIR""
	"./?.so;"  LUA_CDIR"?.so;" LUA_CDIR""

Added *both* .bundle and .so, since some use "so".
(for instance: Perl uses .bundle, Python uses .so)


The default Lua "make install" is also missing the
*extra* ranlib after install as required by Darwin:

ld: table of contents for archive: /usr/local/lib/liblua.a is out of date; rerun ranlib(1) (can't load from it)