lua-users home
lua-l archive

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


On 6/12/2012 4:43 PM, Michal Kottman wrote:
On 12 June 2012 22:13, Luiz Henrique de Figueiredo
<lhf@tecgraf.puc-rio.br>  wrote:
don't actually have an OSX platform to test on so I don't know how
well/if it works yet.
It does not work for me (Lion):

$ make
g++ -O2 -Werror -Wall -MD -Isrc -c -o  objs/tuna.o src/tuna.cpp
src/tuna.cpp:27: error: thread-local storage not supported for this target

Do I have to do something special to compile under OSX?
I have managed to get the 'tuna.so' module compiled on Mac OS X. I had
to change the compiler to clang++, add a -pthread flag and
remove/rename mmap constants to match the Mac API [1]. Note that I did
not test it yet, I am trying to get the examples compiled too...

[1] https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man2/mmap.2.html

Here is a diff of what I had to do to get it compiled (this would have
to be adapted to suit both Linux and Mac):

Thank you very much. I have an OSX platform at work I can use to test on, I never planned on supporting it but certainly no reason it shouldn't work.

-Curt