lua-users home
lua-l archive

Trouble compiling Lua Socket...

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


G'Day,
	I am not sure if this is the correct place to bring such a question: if
not, I apologise in advance. I am trying to compile Lua Socket to give
it a try --- I believe I could make good use of the features it offers
--- however, I am getting an awfully large number of warnings, and
finally an error I cannot make any sense of.
	When I compile Lua Socket (v2.0 beta 3) I receive a large number of
warnings of the pattern ``X is a GCC extension'', before finally
receiving the following error:
		select.c: In function 'return_fd':
		select.c:169: error: impossible constraint in 'asm'
Which, to my understanding, relates to using in-line assembly. When I
check out the related function (with macro expansion, so I can see
everything that is happening), I come across this:
static void return_fd(lua_State *L, fd_set *set, int max_fd,
 int itab, int tab, int start) {
 int fd;
 for (fd = 0; fd < max_fd; fd++) {
 if ((((set)->__fds_bits)[((fd) / (8 * sizeof (__fd_mask)))] &
((__fd_mask) 1 << ((fd) % (8 * sizeof (__fd_mask)))))) {
 lua_pushnumber(L, ++start);
 lua_pushnumber(L, fd);
 lua_gettable(L, itab);
 lua_settable(L, tab);
 }
 }
}
	The error relates to the if(FD_ISSET(fd, set)) line, however, it does
not appear to have any in-line assembly. I am using a GCC 4.0.1
crosscompiler (arm-linux), I also tried a 3.4.1 crosscompiler and had
exactly the same problems, however, my regular (i686-linux) 3.3.5
compiler worked fine, without even a single warning. Does anyone have
any suggestions as to how I may solve this problem and get Lua Socket to
compile?
	-- Matthew

AltStyle によって変換されたページ (->オリジナル) /