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

LUA



Hi,

I'm trying to build LUA (www.lua.org) for the etrax, it is a small
embeddable interpreter (like perl but MUCH smaller).
It consists of a shared library that one can embed in its own
applications and there is a small frontend applications written so that
'scripting' can be done.
I allready changed the compiler and tools options, compiling the sources
and creating a liblua.a goes well, but when making the shared library, I
get a segmentation fault.

I included my config (it is placed in the top LUA directory) and a
capture of the stdout and stderr of the compilation.

Does someone have any clue what is going wrong here ?





# configuration file for making Lua 4.1
# see INSTALL for installation instructions

# == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT =======================

# ------------------------------------------------------------------ Lua

# Lua uses double for numbers. To change this, uncomment one of the lines below.
# You can also define LUA_USER_H as a header file containing these definitions.
# See etc/luser_*.h for examples.
#NUMBER= -DLUA_NUMBER=double -DLUA_NUMBER_SCAN='"%lf"' -DLUA_NUMBER_FMT='"%.16g"'
#NUMBER= -DLUA_NUMBER=float -DLUA_NUMBER_SCAN='"%f"'  -DLUA_NUMBER_FMT='"%.8g"'
#NUMBER= -DLUA_NUMBER=long  -DLUA_NUMBER_SCAN='"%ld"' -DLUA_NUMBER_FMT='"%ld"'
#NUMBER= -DLUA_NUMBER=int   -DLUA_NUMBER_SCAN='"%d"'  -DLUA_NUMBER_FMT='"%d"'
# Also, define lua_str2number accordingly and perhaps lua_number2str.

# If you want support for pipes, uncomment the following line.
# You need popen in your C library.
POPEN= -DPOPEN

# ------------------------------------------------------------------ C compiler

# You need an ANSI C compiler. gcc is a popular one.
CC= gcc-cris
WARN= -ansi -pedantic -Wall

# On IRIX, cc is a good ANSI compiler.
#CC= cc
#WARN= -ansi -fullwarn

# On Solaris, cc is an optional software package.
# You may have to add -Dsparc if you use -Xc.
#CC= cc
#WARN= -Xc # -Dsparc

# On AIX, cc might not be ANSI by default. Use c89 or xlc, or cc -qlanglvl=ansi.
#CC= cc
#WARN= -qlanglvl=ansi

# ------------------------------------------------------------------ C options

# Write here any options you may need for your C compiler
# If you are using gcc, -O3 will get you a faster but larger code.
# You can also add -fomit-frame-pointer.
MYCFLAGS= -O2

# Write here any options you may need for your C linker
MYLDFLAGS=

# ------------------------------------------------------------------ C library

# If your C library is not POSIX compliant, comment the following line.
#POSIX= -D_POSIX_SOURCE

# In Debian, our libc is GNU :)
POSIX = -D_GNU_SOURCE

# If your C library does not have the newer ANSI functions strerror, strcoll,
# and locale support, uncomment the following line. SunOs 4.1.x is one example.
#OLD_ANSI= -DOLD_ANSI

# In SunOs 4.1.x, standard headers in /usr/include are not ANSI,
# so uncomment the following line to avoid prototypes warnings.
#EXTRA_INCS= -I/usr/5include

# The stand-alone Lua interpreter needs the math functions, which are usually
# in libm.a (-lm).  If your C library already includes the math functions,
# or if you are using a modified interpreter that does not need them,
# then comment the following line or add the appropriates libraries.
EXTRA_LIBS= -lm

# ------------------------------------------------------------------ librarian

# This should work in all Unix systems.
AR= ar-cris rcu

# If your system doesn't have (or need) ranlib, use RANLIB=true.
# On some systems, "ar s" does what ranlib would do.
RANLIB= ranlib-cris
#RANLIB= ar s
#RANLIB= true

# ------------------------------------------------------------------ stripper

# This should work in all Unix systems, but you may want to add options.
STRIP= strip-cris

# ------------------------------------------------------------------ install

# Locations for "make install". You may need to be root do "make install".
INSTALL_ROOT= /usr/local
INSTALL_BIN= $(INSTALL_ROOT)/bin
INSTALL_INC= $(INSTALL_ROOT)/include
INSTALL_LIB= $(INSTALL_ROOT)/lib
INSTALL_MAN= $(INSTALL_ROOT)/man/man1

# You might prefer to use "install" if you have it.
INSTALL_EXEC= cp
INSTALL_DATA= cp
#INSTALL_EXEC= install -m 0755
#INSTALL_DATA= install -m 0644

# == END OF USER SETTINGS. DO NOT CHANGE ANYTHING BELOW THIS LINE =============

V=4.1

BIN= $(LUA)/bin
INC= $(LUA)/include
LIB= $(LUA)/lib

INCS= -I$(INC) $(EXTRA_INCS)
DEFS= $(COMPAT) $(NUMBER) $(OLD_ANSI) $(EXTRA_DEFS) $(POSIX)

CFLAGS= $(MYCFLAGS) $(WARN) $(INCS) $(DEFS) -D_REENTRANT

# (end of config)

# Addition for PIC code

%.os: %.c
	$(CC) $(CFLAGS) -mlinux -o $@ -fPIC -c $<
cd include; make all
make[1]: Entering directory `/home/bd/srcinstall/lua-4.1-alpha/include'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bd/srcinstall/lua-4.1-alpha/include'
cd src; make all
make[1]: Entering directory `/home/bd/srcinstall/lua-4.1-alpha/src'
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lapi.o lapi.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lcode.o lcode.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o ldebug.o ldebug.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o ldo.o ldo.c
In file included from ldo.c:8:
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h: In function `setjmp':
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:78: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:79: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:80: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:81: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:82: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:83: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:84: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:85: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h: In function `longjmp':
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:107: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:108: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:109: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:110: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:111: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:112: warning: ANSI C forbids newline in string constant
/usr/local/cris/lib/gcc-lib/cris/2.96/include/setjmp.h:113: warning: ANSI C forbids newline in string constant
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lfunc.o lfunc.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lgc.o lgc.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o llex.o llex.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lmem.o lmem.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lobject.o lobject.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lopcodes.o lopcodes.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lparser.o lparser.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lstate.o lstate.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lstring.o lstring.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o ltable.o ltable.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o ltests.o ltests.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o ltm.o ltm.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lundump.o lundump.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lvm.o lvm.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT   -c -o lzio.o lzio.c
ar-cris rcu ../lib/liblua.a lapi.o lcode.o ldebug.o ldo.o lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltests.o ltm.o lundump.o lvm.o lzio.o
ranlib-cris ../lib/liblua.a
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lapi.os -fPIC -c lapi.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lcode.os -fPIC -c lcode.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o ldebug.os -fPIC -c ldebug.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o ldo.os -fPIC -c ldo.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lfunc.os -fPIC -c lfunc.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lgc.os -fPIC -c lgc.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o llex.os -fPIC -c llex.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lmem.os -fPIC -c lmem.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lobject.os -fPIC -c lobject.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lopcodes.os -fPIC -c lopcodes.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lparser.os -fPIC -c lparser.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lstate.os -fPIC -c lstate.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lstring.os -fPIC -c lstring.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o ltable.os -fPIC -c ltable.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o ltests.os -fPIC -c ltests.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o ltm.os -fPIC -c ltm.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lundump.os -fPIC -c lundump.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lvm.os -fPIC -c lvm.c
gcc-cris -O2 -ansi -pedantic -Wall -I../include      -D_GNU_SOURCE -D_REENTRANT -mlinux -o lzio.os -fPIC -c lzio.c
gcc-cris -Wl,-soname=liblua.so.4.1 -o ../lib/liblua.so -shared lapi.os lcode.os ldebug.os ldo.os lfunc.os lgc.os llex.os lmem.os lobject.os lopcodes.os lparser.os lstate.os lstring.os ltable.os ltests.os ltm.os lundump.os lvm.os lzio.os
collect2: ld terminated with signal 11 [Segmentation fault], core dumped
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lapi.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lapi.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lcode.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lcode.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: ldebug.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file ldebug.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: ldo.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file ldo.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lfunc.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lfunc.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lgc.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lgc.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: llex.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file llex.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lmem.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lmem.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lobject.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lobject.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lopcodes.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lopcodes.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lparser.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lparser.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lstate.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lstate.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lstring.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lstring.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: ltable.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file ltable.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: ltests.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file ltests.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: ltm.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file ltm.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lundump.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lundump.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lvm.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lvm.os
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lzio.os: uses non-prefixed symbols, but writing file with _-prefixed symbols
Bad value: failed to merge target specific data of file lzio.os
/usr/local/cris/lib/gcc-lib/cris/2.96/crt0.o: In function `start0':
/home/cii/DEBIAN/WORK/cris/cris-dist-1.16-1/cris-dist-1.16/./gnu-toplev/libgloss/cris/crt0.c:403: undefined reference to `main'
make[1]: *** [../lib/liblua.so] Error 1
make[1]: Leaving directory `/home/bd/srcinstall/lua-4.1-alpha/src'
make: *** [all] Error 2