On 16 January 2014 11:07, Alexey Melnichuk <[email protected]> wrote: > In my rockspec file i hav this defenitions[1]. > > platforms = { > unix = { modules = { > ["lzmq.timer"] = { > defines = {'USE_CLOCK_MONOTONIC', 'USE_GETTIMEOFDAY'}, > libraries = {"rt"}, > }, > }}, > macosx = { modules = { > ["lzmq.timer"] = { > defines = {'USE_GETTIMEOFDAY'}, > libraries = {}, > }, > }}, > }, > > I try build this on MacOS on travis-ci and get[2]: > gcc -O2 -fPIC -I... -c ... -DUSE_GETTIMEOFDAY -DUSE_GETTIMEOFDAY > gcc -bundle -undefined dynamic_lookup -all_load -o ... -lrt > > So LuaRocks use `defines` only from `macosx` (but duplicate defines), > but use `libraries` from `unix`.
I believe this is because platform overrides actually merge tables by traversing subtables and overwriting fields. Perhaps your "unix" table should be "linux" instead? -- Hisham ------------------------------------------------------------------------------ CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical Workloads, Development Environments & Everything In Between. Get a Quote or Start a Free Trial Today. http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk _______________________________________________ Luarocks-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/luarocks-developers
