kernelsauce / turbo

Turbo is a framework built for LuaJIT 2 to simplify the task of building fast and scalable network applications. It uses a event-driven, non-blocking, no thread design to deliver excellent performance and minimal footprint to high-load applications while also providing excellent support for embedded uses.
http://turbo.readthedocs.io/
Apache License 2.0
528 stars 84 forks source link

LIBTFFI not loading on Linux / Ubuntu #197

Closed luastoned closed 9 years ago

luastoned commented 9 years ago

The problem exists because Ubuntu does not set LD_LIBRARY_PATH but uses ldconfig

The old way will never get invoked, the whole if statement is redundant (not ok checked twice).

name = name or os.getenv("TURBO_LIBTFFI") or "libtffi_wrap"
-- But only if name is not given as argument.
if not name and not ok then
    ok, lib = pcall(ffi.load, "/usr/local/lib/libtffi_wrap.so")
end
kernelsauce commented 9 years ago

Oh, thank you. Thats a bad one on me. Should be corrected in master now. Please verify @luastoned.

luastoned commented 9 years ago

:+1: