lua-users home
lua-l archive

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


>> I've made sure to link my final application with "-pagezero_size 10000
>> -image_base 100000000" but it doesn't seem to make a difference.
>
> If the command-line tool works, but your application doesn't, then
> you'll have to closely check your build process. Compare the
> headers of your binary and the 'luajit' command-line tool binary
> with otool -l.

I'm not completely sure what I'm looking at but I definitely can tell
that __PAGEZERO is the right size and __TEXT is in the right place.
Everything else within my limited experience at understanding Mach-O
LOOKS right; I'd be happy to pastebin up the output if it'd help.

> Maybe write a trivial 10-liner that just opens a
> state and prints hello?

Using the same build rules as my main application but only including a
single source file that's just "lua_State* L = luaL_newstate();
luaL_openlibs(L);" I can step through it into init_top before it
bombs. Comparing otool -l output here is likewise uninformative to my
untrained eye.

I also tried stripping out the excess ldflags so it's just "-lluajit
-pagezero_size 10000 -image_base 100000000" and it still crashes. I
trimmed out all of the cflags I could think of and it still crashes.
Pretty frustrating.

On the other hand I made a new project that links to -lluajit without
any other non-default project settings and it didn't crash, so it's
obviously a build setting issue... the question is, what? I don't have
the experience with this kind of thing to know what might or might not
be influential here.

/s/ Adam