2011-01-22 08:53:04     "Unable to resolve symbol"

Document created by Aaronwu Employee on Aug 26, 2013
Version 1Show Document
  • View in full screen mode

2011-01-22 08:53:04     "Unable to resolve symbol"

Gilles Ganault (FRANCE)

Message: 97621   

 

Hello

 

I can successfully compile and use a Lua module using the 2007 release of the toolchain (the Blackfin-based appliance used that version, so I guess it's safer to use the same toolchain),  but, although I can compile them OK, I get the following error when trying to load standard modules like LuaSocket:

 

 

 

============

 

appliance> ./lua

 

Lua 5.1.4  Copyright (C) 1994-2008 Lua.org, PUC-Rio

 

> require "socket"

 

error loading module 'socket' from file './socket.so':

 

        Unable to resolve symbol

 

stack traceback:

 

        [C]: ?

 

        [C]: in function 'require'

 

        stdin:1: in main chunk

 

        [C]: ?

 

============

 

 

Here's LuaSocket's config + makefile:

 

============

 

workstation# cat /var/tmp/luasocket-2.0.2/config

 

 

 

export PATH:=$(PATH):/usr/src/baps/opt/uClinux/bfin-linux-uclibc/bin

 

 

 

TARGET_CROSS=bfin-linux-uclibc-

 

CC=$(TARGET_CROSS)gcc

 

LD=$(CC)

 

STRIP=$(TARGET_CROSS)strip

 

AR=$(TARGET_CROSS)ar rcu

 

RANLIB=$(TARGET_CROSS)ranlib

 

DEF=-DLUASOCKET_DEBUG

 

LUAINC=-I/var/tmp/lua-5.1.4/src

 

CFLAGS= $(LUAINC) $(DEF) -O2 -Wall -pedantic -fpic

 

#LDFLAGS= -O -shared -fpic

 

LDFLAGS= -shared -fpic

 

============

 

workstation# cat /var/tmp/luasocket-2.0.2/src/makefile

 

 

 

all: $(SOCKET_SO) $(MIME_SO)

 

 

 

$(SOCKET_SO): $(SOCKET_OBJS)

 

        $(LD) $(LDFLAGS) -o $@ $(SOCKET_OBJS)

 

 

 

$(MIME_SO): $(MIME_OBJS)

 

        $(LD) $(LDFLAGS) -o $@ $(MIME_OBJS)

 

============

 

 

I have no clue as to whether the issue comes from the switches used to compile LuaSocket, Lua, or if the uClinux-dist I'm using lacks something that Lua/LuaSocket requires.

 

Thank you for any help.

QuoteReplyEditDelete

 

 

2011-01-24 13:07:09     Re: "Unable to resolve symbol"

Gilles Ganault (FRANCE)

Message: 97645   

 

In case someone else has the same issue... the error message above has nothing to do with compiling: LuaSocket expects files to be located at specific locations and have a specific name. I was focusing so much on compiling settings that I didn't pay attention to installation requirements.

 

  w3.impa.br/~diego/software/luasocket/installation.html

Attachments

    Outcomes