Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lua compilation and tmpnam #1

Open
richfitz opened this issue Mar 10, 2015 · 1 comment
Open

lua compilation and tmpnam #1

richfitz opened this issue Mar 10, 2015 · 1 comment

Comments

@richfitz
Copy link
Member

Since rlite includes lua there are more tricks in compilation. I see

gcc -std=gnu99 -shared -Wl,-soname,libhirlite.so.0.1 -o libhirlite.so  ../deps/lua/src/lapi.o ../deps/lua/src/lcode.o ../deps/lua/src/ldebug.o ../deps/lua/src/ldo.o ../deps/lua/src/ldump.o ../deps/lua/src/lfunc.o ../deps/lua/src/lgc.o ../deps/lua/src/llex.o ../deps/lua/src/lmem.o ../deps/lua/src/lobject.o ../deps/lua/src/lopcodes.o ../deps/lua/src/lparser.o ../deps/lua/src/lstate.o  ../deps/lua/src/lstring.o ../deps/lua/src/ltable.o ../deps/lua/src/ltm.o ../deps/lua/src/lundump.o ../deps/lua/src/lvm.o ../deps/lua/src/lzio.o ../deps/lua/src/strbuf.o ../deps/lua/src/fpconv.o ../deps/lua/src/lauxlib.o ../deps/lua/src/lbaselib.o ../deps/lua/src/ldblib.o ../deps/lua/src/liolib.o ../deps/lua/src/lmathlib.o ../deps/lua/src/loslib.o ../deps/lua/src/ltablib.o ../deps/lua/src/lstrlib.o ../deps/lua/src/loadlib.o ../deps/lua/src/linit.o ../deps/lua/src/lua_cjson.o ../deps/lua/src/lua_struct.o ../deps/lua/src/lua_cmsgpack.o ../deps/lua/src/lua_bit.o rlite.o page_skiplist.o page_string.o page_list.o page_btree.o page_key.o page_multi_string.o page_long.o type_string.o type_list.o type_set.o type_zset.o type_hash.o util.o restore.o dump.o sort.o pqsort.o utilfromredis.o hyperloglog.o sha1.o crc64.o lzf_c.o lzf_d.o scripting.o rand.o hirlite.o
../deps/lua/src/loslib.o: In function `os_tmpname':
loslib.c:(.text+0x29d): warning: the use of `tmpnam' is dangerous, better use `mkstemp'

which seems ominous. I've out worked out tmpnam is being used when rlite is compiled by itself or if mkstemp is being used. The lua target is ansi (see lua: target in src/rlite/Makefile) and that defines -DLUA_ANSI. If LUA_USE_LINUX (even on OSX) is defined that defines LUA_USE_POSIX and that defines LUA_USE_MKSTEMP which sets up using the mkstemp.

@richfitz
Copy link
Member Author

I can get local compilation and compilation on docker working, but I'm seeing issues on travis so I've rolled the version back a little.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant