lua-users home
lua-l archive

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


On 3/11/2009, at 4:41 PM, Hisham wrote:

On Sun, Nov 1, 2009 at 7:15 AM, Geoff Leyland <geoff_leyland@fastmail.fm > wrote:
I changed lines 223&4 of cfg.lua to

defaults.variables.CC = "export MACOSX_DEPLOYMENT_TARGET=10.6; gcc -arch
i686 -arch x86_64"
defaults.variables.LD = "export MACOSX_DEPLOYMENT_TARGET=10.6; gcc -arch
i686 -arch x86_64"

Which got me a a universal binary for lfs:

Alternatively, you could have edited your ~/.luarocks/config.lua file and added:

variables = {
CC = "export MACOSX_DEPLOYMENT_TARGET=10.6; gcc -arch i686 -arch x86_64", LD = "export MACOSX_DEPLOYMENT_TARGET=10.6; gcc -arch i686 -arch x86_64"
}

and that would override the defaults set by luarocks.cfg.

That's a better solution!

The documentation on http://www.luarocks.org/en/Creating_a_rock suggests that external dependencies work like this:

external_dependencies = {
   LIBDATE = {
      headers = "libdate.h"
   }
}

But that should be "header" not "headers".

I agree that it's hard to know what the right thing is on OS X - perhaps it's as simple as suggesting what you did above in the documentation. I'm trying make a rock for rima at the moment - once I've got through that, I might be in a position to have more of an opinion.

Cheers,
Geoff