lua-users home
lua-l archive

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


Sean Conner <sean@conman.org> [15-01-27 19:52]:
> It was thus said that the Great Meino.Cramer@gmx.de once stated:
> > Hi,
> > 
> > currently I am experimenting with a embedded system and
> > need funktions like sleep, ppoll and such in lua.
> > 
> > I installed luaposix, because both were documented on the web.
> > 
> > But there was neither available via luaposix.
> > 
> > A "search" via luarocks shows different other posix related
> > stuff...
> > 
> > I am confused...
> > 
> > Is there anything better than luaposix which has more posix stuff...
> 
>   It depends upon how much of Posix you want.  I have my own Posix layer [1]
> but it's not one single module but a collection of modules.  I have one for
> signals:
> 
> 	https://github.com/spc476/lua-conmanorg/blob/master/src/signal-posix.c
> 
> one for select/poll [2]:
> 
> 	https://github.com/spc476/lua-conmanorg/blob/master/src/pollset.c
> 
> one for process related calls (fork(), wait(), etc)
> 
> 	https://github.com/spc476/lua-conmanorg/blob/master/src/process.c
> 
> one for time releated calls (including sleep) [3]:
> 
> 	https://github.com/spc476/lua-conmanorg/blob/master/src/clock.c
> 
> one for network stuff:
> 
> 	https://github.com/spc476/lua-conmanorg/blob/master/src/net.c [4]
> 
> and one for filesystem related calls:
> 
> 	https://github.com/spc476/lua-conmanorg/blob/master/src/fsys.c
> 
>   The documentation ... could be better, and there are no rockspecs as of
> yet (because of the lack of documentation).  The stuff works (I'm use it for
> both personal and work related projects) and (disclaimer here) I like my API
> better than luaposix or lposix, as I didn't slavishly follow the C API [5]
> (this is probably more noticable in the network API than some of the other
> ones).  Is what I have better than luaposix?  Eh ... hard to say.
> 
>   -spc
> 
> [1]	https://github.com/spc476/lua-conmanorg
> 	There are a few non-Posix modules there as well.
> 
> [2]	epoll under Linux; poll otherwise.  select() is available, but only
> 	if poll isn't.  The API is the same for all three.
> 
> [3]	No support yet for Mac OS-X, which doesn't support the latest Posix
> 	spec for time-releated calls.
> 
> [4]	Supports IPv4, IPv6 and Unix sockets.  This is a wrapper around the
> 	lower level network calls---there's no code that talks HTTP, FTP,
> 	SMTP, etc, unlike luasocket.
> 
> [5]	If I want the C API, I would use C.
> 

Hi Sean,

I cloned the sources and did a make, which fails on my embedded
system:

Arietta G25 A:LUAADDONS/lua-conmanorg>make
gcc -std=c99 -g -Wall -Wextra -pedantic  -shared -fPIC -o lib/tcc.so
src/tcc.c -ltcc
src/tcc.c:49:20: fatal error: libtcc.h: No such file or directory
 #include <libtcc.h>
                     ^
                     compilation terminated.
                     Makefile:106: recipe for target 'lib/tcc.so'
                     failed
                     make: *** [lib/tcc.so] Error 1
                     [1]    2101 exit 2     make


...tcc was missing.

I tried to install tcc on the embedded system, but that failed with:

In file included from tcc.h:291:0,
                 from tcc.c:24:
                 arm-gen.c:27:2: error: #error "Currently TinyCC only
                 supports float computation with VFP instructions"
                  #error "Currently TinyCC only supports float
                  computation with VFP instructions"

The embedded system does not have any FPU and does softfp.

Am I offline now ... or ? ;)

Best regards,
Meino