lua-users home
lua-l archive

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


Asko Kauppi wrote:
> Lindas provide a wealth of opportunities for any kinds of inter-state
> communication needs. Now, what I'd very much like, is to have a group of
> interested people help me fine tune the API's, before we make this truly
> public. Having a go with Lanes in some real world projects would soon
> show places where the API is suboptimal, and needs for features that are
> not currently there.

I'm definitely interested in this.



The July 18 release on LuaForge gives me this error upon compile:

 cc -Wall -Werror -O2 -g   -D_GNU_SOURCE   -c -o lanes.o lanes.c
 In file included from /usr/include/sys/types.h:8,
                  from lanes.c:106:
 /usr/include/gentoo-multilib/amd64/sys/types.h:198: error: conflicting
  types for 'int64_t'
 threading.h:35: error: previous declaration of 'int64_t' was here
 make[1]: *** [lanes.o] Error 1

This is, AFAIK, a 64-bit-only error, because on 64-bit machines
<types.h> includes int64_t, which you are also defining in your
threading.h file.

However, including <sys/types.h> instead of the typedef on line 35 fixes
that error, and adding -fPIC to the CFLAGS in src/Makefile allows the
library to fully compile on a 64-bit Linux system.  `make test` works
with the library compiled this way, so I guess there's no other 64-bit
incompatibilities.

I believe -fPIC should work on 32-bit systems as well (I don't really
know, though), so adding it to the Makefile's CFLAGS probably won't
cause a problem.  I'm not quite sure what the best solution is for the
types.h include, as I haven't looked over the code yet.

Other than that, I haven't gotten around to any real testing yet :)

-- 
Irayo