lua-users home
lua-l archive

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


On Thu, 25 Nov 2010 21:47:01 +0100, Ico <lua@zevv.nl> wrote:
>That's because the current directory '.' is usually not in your $PATH,
>so that's ok. If you would place the binary in /bin, you'd be able to
>run it with just 'lua'

Thanks for the tip, but moving "lua" to /bin still displays the same
error message.

>You might want to try to build a statically linked lua binary to make
>sure no other dependencies are needed for running it. You could
>redo the latest stage of building the binary by hand, and add the
>'-static' flag. Something like
>
>  your-cross-gcc -static -o lua lua.o liblua.a
>
>might do it.

No more luck :-/

Here's the modified Makefile:
===========
$(LUA_T): $(LUA_O) $(LUA_A)
        #ORIGINAL $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
        $(CC) -o $@ $(MYLDFLAGS) -static $(LUA_O) $(LUA_A) $(LIBS)

$(LUAC_T): $(LUAC_O) $(LUA_A)
        #$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
        $(CC) -o $@ $(MYLDFLAGS) -static $(LUAC_O) $(LUA_A) $(LIBS)
===========

Recompiled the whole thing:
===========
ubuntu:/usr/src/lua-5.1.4# make generic
...
bfin-uclinux-gcc -Wall -O2    -c -o linit.o linit.c
bfin-uclinux-ar rcu liblua.a lapi.o lcode.o ldebug.o ldo.o ldump.o
lfunc.o lgc.o llex.o lmem.o lobject.o lopcodes.o lparser.o lstate.o
lstring.o ltable.o ltm.o lundump.o lvm.o lzio.o lauxlib.o lbaselib.o
ldblib.o liolib.o lmathlib.o loslib.o ltablib.o lstrlib.o loadlib.o
linit.o
bfin-uclinux-ranlib liblua.a
bfin-uclinux-gcc -Wall -O2    -c -o lua.o lua.c
#ORIGINAL bfin-uclinux-gcc -o lua  lua.o liblua.a -lm
bfin-uclinux-gcc -o lua  -static lua.o liblua.a -lm
bfin-uclinux-gcc -Wall -O2    -c -o luac.o luac.c
bfin-uclinux-gcc -Wall -O2    -c -o print.o print.c
#bfin-uclinux-gcc -o luac  luac.o print.o liblua.a -lm
bfin-uclinux-gcc -o luac  -static luac.o print.o liblua.a -lm
make[1]: Leaving directory `/usr/src/lua-5.1.4'

ubuntu:/usr/src/lua-5.1.4# file lua
lua: ELF 32-bit LSB executable, Analog Devices Blackfin, version 1
(SYSV), statically linked, not stripped

ubuntu:/usr/src/lua-5.1.4# file luac
luac: ELF 32-bit LSB executable, Analog Devices Blackfin, version 1
(SYSV), statically linked, not stripped
===========

Finally, downloaded "lua" and "luac" on the device, but I get the same
"applet not found" message.

Since it's apparently not a Lua error, I'll go ask in the Blackfin
forum.

Thanks guys for the help :-)