[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.3.0 (rc3) now available
- From: Edward Berner <erb@...>
- Date: Sun, 04 Jan 2015 02:48:05 -0800
On 1/2/2015 5:36 AM, Luiz Henrique de Figueiredo wrote:
Lua 5.3.0 (rc3) is now available for testing at
http://www.lua.org/work/lua-5.3.0-rc3.tar.gz
MD5 5dd17d29fbb70139d315e2cea751a128 -
SHA1 83e26c3c21abe7c309c5e9df08b6a7a7db85ef2a -
This is a release candidate for the final release of Lua 5.3.0.
[...]
All feedback welcome. Thanks.
--lhf
Compiles nicely on Solaris. Thanks!
It builds without warnings with gcc 4.8.1 and Solaris Studio 12.3. The
gcc included with Solaris 10 (gcc 3.4.3) complains about a visibility
attribute not being supported, and about luaD_throw in ldo.c being a
noreturn function that does return (neither of those warnings is new to
RC3). (The visibility attribute warnings can be silenced using the
existing configurable parameter LUAI_FUNC in luaconf.h.)
To get support for hexadecimal floating point constants when using gcc
on Solaris it seems to be necessary to link to values-xpg6.o. The
Solaris Studio compilers include it automatically in c99 mode, but gcc
doesn't (yet?). If I understand correctly, explicitly linking
values-xpg6.o in a library can cause surprising behavior if the
application using the library didn't expect to suddenly get c99
behaviors. So Lua itself probably shouldn't link to values-xpg6.o, but
if there is a section in the readme or other documentation for platform
specific notes, maybe it could be mentioned there.
For more information about values-xpg6.o, there is a gcc bug:
-std=c99 does not enable c99 mode in Solaris C library
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=40411
A couple mailing list discussions:
-xc99=all and libraries on Solaris 10
http://lists.gnu.org/archive/html/autoconf/2010-02/msg00013.html
Re: -xc99=all and libraries on Solaris 10
http://lists.gnu.org/archive/html/autoconf/2010-12/msg00059.html
And the Open Solaris source code:
http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/common/common/values-xpg6.c
http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libc/inc/xpg6.h
So, anyway... I built Lua, linked with values-xpg6.o, and ran the test
suite with "_U=true". All of the tests except two completed
successfully. The two failing tests were lines 285 and 295 of
files.lua, which try to read from a write only file; I traced the
failure down to Solaris not setting ferror():
#include <stdio.h>
#include <errno.h>
int main (int argc, char *argv[]) {
int c, e;
FILE *f;
f = fopen ("/tmp/z", "w");
if (f == NULL) {
perror ("fopen");
return 1;
}
clearerr (f);
errno = 0;
c = getc (f);
e = errno;
printf ("c = %d\n", c);
printf ("errno = %d\n", e);
printf ("ferror(f) = %d\n", ferror(f));
printf ("feof(f) == %d\n", feof(f));
fclose (f);
return 0;
}
On Solaris:
c = -1
errno = 9
ferror(f) = 0
feof(f) == 0
On Linux and OpenBSD:
c = -1
errno = 9
ferror(f) = 1
feof(f) == 0
Oh well, an operating system anomaly but not an issue with Lua itself.
In summary: looks good on Solaris. Thanks.
--
Edward Berner