lua-users home
lua-l archive

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


On 12/22/2014 6:34 AM, Luiz Henrique de Figueiredo wrote:
Lua 5.3.0 (rc2) is now available for testing at
	http://www.lua.org/work/lua-5.3.0-rc2.tar.gz

MD5	61726271cf342794909a1752ea0c0aae  -
SHA1	457be7b889f7825c3b9c8b9a4b95b85c0c0b434d  -

This is a release candidate for the final release of Lua 5.3.0.

A few things have changed since beta that we'd like to test in the wild.
In particular, we made some changes in luaconf.h and in the Makefile
that we'd like to test. Please try compiling the current code in as many
platforms as possible. We expect the compilation will go smoothly as usual
but please report any warnings or other glitches.


Solaris is being a bit of a pain.

(I'm testing this with Solaris 10 on both sparc and amd64. Haven't tested other versions.)

None of the makefile targets will build.  They get the following error:

$ make solaris
make all SYSCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT" SYSLIBS="-ldl" gcc -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_POSIX -DLUA_USE_DLOPEN -D_REENTRANT -c lapi.c
In file included from /usr/include/iso/stdarg_c99.h:34,
                 from /usr/include/stdarg.h:33,
                 from lapi.c:13:
/usr/include/sys/feature_tests.h:341:2: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications require the use of c99"

The relevant comment from /usr/include/sys/feature_tests.h is:

/*
 * It is invalid to compile an XPG3, XPG4, XPG4v2, or XPG5 application
 * using c99.  The same is true for POSIX.1-1990, POSIX.2-1992, POSIX.1b,
 * and POSIX.1c applications. Likewise, it is invalid to compile an XPG6
 * or a POSIX.1-2001 application with anything other than a c99 or later
 * compiler.  Therefore, we force an error in both cases.
 */

This seems to be triggered by the fact that lprefix.h sets _XOPEN_SOURCE to 600.

At this point in the release cycle I think the best fix is probably to add "-std=gnu99" to SYSCFLAGS in the solaris target of the makefile. Alternatively one could add "-D_XOPEN_SOURCE=500" to the SYSCFLAGS, but maybe it was set to 600 for a reason and I'm not sure what the implications are of changing it to 500.

Pedantically, one wonders if lprefix.h should refrain from setting _XOPEN_SOURCE if LUA_USE_C89 is set, or perhaps set _XOPEN_SOURCE to 500 when LUA_USE_C89 is set. But it is quite possible that real world convenience should trump pedantic correctness here.

It does compile okay after changing to a c99 compiler. The "c99" compiler from Solaris Studio 12.3 compiles with no warnings. The bundled gcc (version 3.4.3 plus patches) produces some warnings but in my experience that is not unexpected from an older gcc. Using a locally built gcc 4.8.1 produces only one warning, listed below, which may be an artifact of compiling in c99 mode.

lcode.c: In function 'constfolding':
lcode.c:791:5: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
     if (luai_numisnan(n) || isminuszero(n))
     ^

I haven't spent enough time yet with the test suite on Solaris to say whether there are any issues worth reporting.

--
Edward Berner