lua-users home
lua-l archive

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


Roberto,

thanks for responding.
So I changed the following line:

COPT = -O2 -DNDEBUG -fPIC

and got:

dhcppc1:/usr/local/lpeg-0.7 # make
gcc -O2 -DNDEBUG -fPIC -Wall -Wextra -pedantic -Waggregate-return -Wcast-align -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wshadow -Wwrite-strings -Wcast-qual  -ansi -I../lua -shared -o lpeg.so lpeg.c
lpeg.c: In function ‘printinst’:
lpeg.c:262: warning: format ‘%02d’ expects type ‘int’, but argument 2 has type ‘long int’
lpeg.c:270: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
lpeg.c:279: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
lpeg.c:298: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
lpeg.c:306: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
lpeg.c:311: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long int’
lpeg.c: At top level:
lpeg.c:330: warning: ‘printcap’ defined but not used

then, I tried

COPT = -O2 -DNDEBUG -ld%

and this seems to work:

dhcppc1:/usr/local/lpeg-0.7 # make
make: `lpeg.so' is up to date.
dhcppc1:/usr/local/lpeg-0.7 # lua test.lua
General tests for LPeg library
+
+
+
+
+
OK

Thanks ever so much... now, I have still another question, that is
maybe related.
I tried to make luaJIT on the same machine with 'make linux' and
got:

cd src && make linux
make[1]: Entering directory `/usr/local/LuaJIT-1.1.3/src'
make all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl"
make[2]: Entering directory `/usr/local/LuaJIT-1.1.3/src'
gcc -O3 -fomit-frame-pointer -Wall -DLUA_USE_LINUX  -I../dynasm   -c -o ljit_dasm.o ljit_dasm.c
ljit_dasm.c:35:2: error: #error "No support for this architecture (yet)"
make[2]: *** [ljit_dasm.o] Error 1
make[2]: Leaving directory `/usr/local/LuaJIT-1.1.3/src'
make[1]: *** [linux] Error 2
make[1]: Leaving directory `/usr/local/LuaJIT-1.1.3/src'
make: *** [linux] Error 2

Is there a workaround for ljit_dasm not working?

Thank you again,

Best regards,

Axel




-------- Original-Nachricht --------
> Datum: Thu, 25 Oct 2007 17:28:35 -0200
> Von: roberto@inf.puc-rio.br
> An: Lua list <lua@bazar2.conectiva.com.br>
> Betreff: Re: Problems making lpeg on Suse 10.2 64bit

> > I am not really an expert in making C files ... what changes
> > could make this makefile work ?
> 
> Did you tried this?
> 
> > I guess you should add the '-fPIC' option to the makefile...
> 
> 
> -- Roberto

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger