On 9 December 2014 at 21:01, Mike Pall <mike-1412@xxxxxxxxxx> wrote: > Ciprian Tomoiaga wrote: >> I have a C function containing OpenMP clause which I call with ffi. On my >> machine, the program terminates with a segmentation fault. However, it >> works without a problem on a Mac and on another machine. > > The most likely cause is the dreaded pthread issue: the main > executable must be compiled/linked with -pthread (note: this is > not the same as -lpthread!). Otherwise a shared library which is > loaded later on and uses threads may cause a crash. > > The easiest way to test this hypothesis is to rebuild LuaJIT with: > > make TARGET_FLAGS=-pthread > > ... and then try again. > > --Mike > Thank you for the extremely fast reply! I recompiled with the specified opition, but it still crashes. :( Do I have any other options? Thanks, Ciprian