Hello All;
I trying to compile Lua to Haiku but it fail. I know, already exist a Lua port to Haiku, but I’m trying to put Lua while builds Haiku, to make my custom build, along other softwares, like bash, sed, etc… I wrote a Jamfile to compile it, like this bellow:
SubDir HAIKU_TOP src bin lua src ;
CCFLAGS on lua = -O2 -Wall -c ;
Main lua : lua.c ;
LinkLibraries lua : liblua ;
Library liblua : lapi.c lbaselib.c ldblib.c ldo.c lfunc.c linit.c llex.c lmem.c lobject.c loslib.c lstate.c lstrlib.c ltablib.c lundump.c lzio.c
lauxlib.c lcode.c ldebug.c ldump.c lgc.c liolib.c lmathlib.c loadlib.c lopcodes.c lparser.c lstring.c ltable.c ltm.c lvm.c print.c ;
I put Lua in the directory haiku/src/bin/lua/ , and it compiles well, but when is linking, occurs an error! Bellow, the output:
[root@riemann src]# jam lua
…patience…
…found 1233 target(s)…
…updating 33 target(s)…
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lua.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lapi.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lbaselib.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/ldblib.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/ldo.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lfunc.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/linit.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/llex.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lmem.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lobject.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/loslib.o
In file included from loslib.c:8:
…/…/…/…/headers/posix/errno.h:19: warning: errno' redefined ../../../../headers/build/os/support/Errors.h:403: warning: this is the location of the previous definition Cc ../../../../generated/objects/haiku/x86/release/bin/lua/src/lstate.o Cc ../../../../generated/objects/haiku/x86/release/bin/lua/src/lstrlib.o Cc ../../../../generated/objects/haiku/x86/release/bin/lua/src/ltablib.o Cc ../../../../generated/objects/haiku/x86/release/bin/lua/src/lundump.o Cc ../../../../generated/objects/haiku/x86/release/bin/lua/src/lzio.o Cc ../../../../generated/objects/haiku/x86/release/bin/lua/src/lauxlib.o In file included from lauxlib.c:9: ../../../../headers/posix/errno.h:19: warning:
errno’ redefined
…/…/…/…/headers/build/os/support/Errors.h:403: warning: this is the location of the previous definition
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lcode.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/ldebug.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/ldump.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lgc.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/liolib.o
In file included from liolib.c:8:
…/…/…/…/headers/posix/errno.h:19: warning: `errno’ redefined
…/…/…/…/headers/build/os/support/Errors.h:403: warning: this is the location of the previous definition
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lmathlib.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/loadlib.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lopcodes.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lparser.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lstring.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/ltable.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/ltm.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lvm.o
Cc …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/print.o
Archive …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/liblua.a
/tmp/develop/haiku/haiku/generated/cross-tools/bin/i586-pc-haiku-ar: creating …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/liblua.a
Ranlib …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/liblua.a
Link …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lua
/tmp/develop/haiku/haiku/generated/cross-tools/i586-pc-haiku/bin/ld: crti.o: No such file: No such file or directory
collect2: ld returned 1 exit status
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:…/…/…/…/generated/objects/linux/lib ; …/…/…/…/build/scripts/rm_attrs …/…/…/…/generated/objects/linux/x86/release/tools/rm_attrs -f “…/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lua”
/tmp/develop/haiku/haiku/generated/cross-tools/bin/i586-pc-haiku-gcc -lm -o “…/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lua” “…/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lua.o”
“…/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/liblua.a” ;
…failed Link …/…/…/…/generated/objects/haiku/x86/release/bin/lua/src/lua …
…failed updating 1 target(s)…
…updated 32 target(s)…
I don’t know what’s happening, anyone may help!?
Cheers