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

Re: LUA



On Tue, 2002-02-05 at 12:47, Hans-Peter Nilsson wrote:
> > From: Bart Duchesne <bduc@xxxxxxx.com>
> > Date: 05 Feb 2002 12:22:38 +0100
> 
> > Does someone have any clue what is going wrong here ?
> 
> > gcc-cris -Wl,-soname=3Dliblua.so.4.1 -o ../lib/liblua.so -shared lapi.os lc=
> > ode.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 l=
> > vm.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
> 
> You need to link (as well as compile) with -mlinux.
> 
> BTW, I recommend that everybody use -fpic rather than -fPIC; you
> get ssmaller and faster code.  You need something significantly
> larger than glibc to get over the limit where you actually need
> -fPIC.
> 
> The ld segfault has been reported before and will be fixed in
> the next cris-dist release.

Ok, so far so good.
I now have a .so and .a file.
But when the linker wants to link with it I get an error concerning
underscores in the apps .o and no underscores in the .so !!??!!

See the log



> 
> brgds, H-P

gcc-cris -O2 -ansi -pedantic -Wall -I../../include     -D_GNU_SOURCE -D_GNU_SOURCE -D_REENTRANT   -c -o lua.o lua.c
gcc-cris -mlinux -o ../../bin/lua  lua.o -L../../lib -llua -llualib -lm
/usr/local/cris/lib/gcc-lib/cris/2.96/rld-cris: lua.o: uses _-prefixed symbols, but writing file with non-prefixed symbols
Bad value: failed to merge target specific data of file lua.o
/usr/local/cris/lib/gcc-lib/cris/2.96/linux/crt1.o: In function `_start':
/usr/local/cris/lib/gcc-lib/cris/2.96/linux/crt1.o(.text+0x1e): undefined reference to `main'
lua.o: In function `_lreset':
lua.o(.text+0x16): undefined reference to `_signal'
lua.o: In function `_lstop':
lua.o(.text+0x36): undefined reference to `_lua_setlinehook'
lua.o(.text+0x46): undefined reference to `_lua_setcallhook'
lua.o(.text+0x5a): undefined reference to `_lua_error'
lua.o: In function `_laction':
lua.o(.text+0x70): undefined reference to `_signal'
lua.o(.text+0x86): undefined reference to `_lua_setlinehook'
lua.o(.text+0x98): undefined reference to `_lua_setcallhook'
lua.o: In function `_ldo':
lua.o(.text+0xc6): undefined reference to `_lua_gettop'
lua.o(.text+0xda): undefined reference to `_lua_settop'
lua.o(.text+0xe4): undefined reference to `_signal'
lua.o(.text+0xf0): undefined reference to `__impure_ptr'
lua.o(.text+0x102): undefined reference to `_fprintf'
lua.o(.text+0x112): undefined reference to `__impure_ptr'
lua.o(.text+0x124): undefined reference to `_fprintf'
lua.o: In function `_print_message':
lua.o(.text+0x134): undefined reference to `__impure_ptr'
lua.o(.text+0x146): undefined reference to `_fprintf'
lua.o: In function `_print_version':
lua.o(.text+0x164): undefined reference to `_printf'
lua.o: In function `_assign':
lua.o(.text+0x17a): undefined reference to `_strchr'
lua.o(.text+0x18c): undefined reference to `_lua_pushstring'
lua.o(.text+0x196): undefined reference to `_lua_setglobal'
lua.o: In function `_getargs':
lua.o(.text+0x1b2): undefined reference to `_lua_newtable'
lua.o(.text+0x1c6): undefined reference to `___floatsidf'
lua.o(.text+0x1d6): undefined reference to `_lua_pushnumber'
lua.o(.text+0x1e2): undefined reference to `_lua_pushstring'
lua.o(.text+0x1ec): undefined reference to `_lua_settable'
lua.o(.text+0x20c): undefined reference to `_lua_pushlstring'
lua.o(.text+0x218): undefined reference to `___floatsidf'
lua.o(.text+0x228): undefined reference to `_lua_pushnumber'
lua.o(.text+0x232): undefined reference to `_lua_settable'
lua.o: In function `_l_getargs':
lua.o(.text+0x242): undefined reference to `_lua_touserdata'
lua.o: In function `_file_input':
lua.o(.text+0x25c): undefined reference to `_lua_dofile'
lua.o(.text+0x274): undefined reference to `__impure_ptr'
lua.o(.text+0x286): undefined reference to `_fprintf'
lua.o(.text+0x28e): undefined reference to `_perror'
lua.o: In function `_get_prompt':
lua.o(.text+0x2c0): undefined reference to `_lua_getglobal'
lua.o(.text+0x2ca): undefined reference to `_lua_tostring'
lua.o(.text+0x2e6): undefined reference to `_lua_settop'
lua.o: In function `_manual_input':
lua.o(.text+0x31a): undefined reference to `__impure_ptr'
lua.o(.text+0x326): undefined reference to `_fputs'
lua.o(.text+0x32c): undefined reference to `__impure_ptr'
lua.o(.text+0x33e): undefined reference to `_fgets'
lua.o(.text+0x350): undefined reference to `_printf'
lua.o(.text+0x35a): undefined reference to `_strlen'
lua.o(.text+0x38e): undefined reference to `_lua_pushlstring'
lua.o(.text+0x3a2): undefined reference to `_lua_pushlstring'
lua.o(.text+0x3aa): undefined reference to `_lua_gettop'
lua.o(.text+0x3b4): undefined reference to `_lua_concat'
lua.o(.text+0x3be): undefined reference to `_lua_tostring'
lua.o(.text+0x3c6): undefined reference to `_lua_dostring'
lua.o(.text+0x3d6): undefined reference to `_lua_settop'
lua.o: In function `_handle_argv':
lua.o(.text+0x41e): undefined reference to `_lua_dofile'
lua.o(.text+0x442): undefined reference to `_strchr'
lua.o(.text+0x4d4): undefined reference to `_lua_dofile'
lua.o(.text+0x512): undefined reference to `_lua_dostring'
lua.o(.text+0x526): undefined reference to `__impure_ptr'
lua.o(.text+0x53a): undefined reference to `_fprintf'
lua.o(.text+0x564): undefined reference to `_lua_setglobal'
lua.o(.text+0x576): undefined reference to `__impure_ptr'
lua.o(.text+0x588): undefined reference to `_fprintf'
lua.o: In function `_getstacksize':
lua.o(.text+0x5da): undefined reference to `_strtol'
lua.o(.text+0x5e6): undefined reference to `__impure_ptr'
lua.o(.text+0x5fc): undefined reference to `_fprintf'
lua.o: In function `_register_getargs':
lua.o(.text+0x62c): undefined reference to `_lua_newuserdatabox'
lua.o(.text+0x63c): undefined reference to `_lua_pushcclosure'
lua.o(.text+0x64a): undefined reference to `_lua_setglobal'
lua.o: In function `_openstdlibs':
lua.o(.text+0x65e): undefined reference to `_lua_baselibopen'
lua.o(.text+0x666): undefined reference to `_lua_iolibopen'
lua.o(.text+0x66e): undefined reference to `_lua_strlibopen'
lua.o(.text+0x676): undefined reference to `_lua_mathlibopen'
lua.o(.text+0x67e): undefined reference to `_lua_dblibopen'
lua.o: In function `_main':
lua.o(.text+0x6a8): undefined reference to `_lua_newthread'
lua.o(.text+0x6e0): undefined reference to `_lua_close'
collect2: ld returned 1 exit status
make: *** [../../bin/lua] Error 1