Open AlbertoGP opened 2 years ago
The fix is in #67, but GitHub is not linking them automatically.
This leaves only one warning:
/usr/bin/ld: liblua.a(loslib.o): in function `os_tmpname':
loslib.c:(.text+0x4e4): warning: the use of `tmpnam' is dangerous, better use `mkstemp'
There is a note about this in lua/src/luaconf.h
:
lua_tmpnam is the function that the OS library uses to create a temporary name. LUA_TMPNAMBUFSIZE is the maximum size of a name created by lua_tmpnam. CHANGE them if you have an alternative to tmpnam (which is considered insecure) or if you want the original tmpnam anyway. By default, Lua uses tmpnam except when POSIX is available, where it uses mkstemp.
If I understand this correctly, when running on Linux it would not use tmpnam
anyway. If so, it would be nice to quiet this warning too.
Looking in lua/src/luaconf.h
, LUA_USEMKSTEMP
depends on LUA_USE_LINUX
, which is set in lua/src/Makefile
depending on the value of PLATS
.
There it says “CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT” so I guess I’m supposed to set PLAT= linux
.
However, setting PLAT=linux
there does not have any effect when building from the project root load81/
because the Makefile
there asks explicitly for the ansi
target:
lua/src/liblua.a:
-(cd lua && $(MAKE) ansi)
If I change ansi
to linux
here, the tmpnam
warning goes away. It does need libreadline-dev
/libreadline-devel
installed though.
It still says ar: 'u' modifier ignored since 'D' is the default (see 'U')
as before, I guess it is needed for other versions of ar
.
It compiles and runs fine, this is just some warnings with GCC 10.2.1 20201203 on Linux ppc64le. I’m preparing a pull request.