lua-users home
lua-l archive

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


Hi everyone,

we use Lua as an embedded scripting language in a bioinformatics toolkit
(http://genometools.org). However, after a recent glibc update (2.10.1
here) all.c fails to build due to a name clash of the 'getline' macro
and a POSIX 2008 function of the same name:

[~/lua-5.1.4/etc] $ make one
gcc -O2 -Wall -I../src  all.c -lm
In file included from ../src/lobject.c:9,
                 from all.c:16:
/usr/include/stdio.h:653:33: error: macro "getline" passed 3 arguments,
but takes just 2
make: *** [one] Error 1

A simple workaround was to rename each occurence of the getline macro in
the Lua source to 'lgetline' or something like that. A similar issue
came up a few months ago
(http://lua-users.org/lists/lua-l/2009-05/msg00385.html) but I do not
see it being addressed up to now.

Is there anything you can do to fix this? We would prefer not to patch
around in our copy of the Lua source code, but rather have a clean copy
identical to the currently available release code.

Using 'gcc --std=c99' makes it compile again, but then again, --std
seems to be a GCC-specific option with portability implications...

Thanks in advance,
Sascha

-- 
Sascha Steinbiss
Center for Bioinformatics
University of Hamburg
Bundesstr. 43
20146 Hamburg
Germany

Email:  steinbiss@zbh.uni-hamburg.de
URL:    http://www.zbh.uni-hamburg.de/steinbiss
Phone:  +49 (40) 42838 7322
FAX:    +49 (40) 42838 7312