[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: "dynamic libraries not enabled"?
- From: Gilles Ganault <gilles.ganault@...>
- Date: Thu, 20 Jan 2011 17:50:52 +0100
Hello
For some reason, I get the following error when running the Lua
interpreter and attempting to load a module:
==========
/tmp> lua
Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio
> require "sqlite3"
error loading module 'sqlite3' from file './sqlite3.so':
dynamic libraries not enabled; check your Lua installation
==========
FWIW, I didn't see any error when cross-compiling the interpreter. Has
someone seen this and knows what the problem is?
Since I could successfully compile SQLite3 and then LuaSQL for
SQLite3, I assume it's the interpreter that's the problem, but I don't
have another module to make sure.
Here's the Makefile I used to compile Lua:
=========== My calling makefile
export PATH:=$(PATH):/opt/uClinux/bfin-linux-uclibc/bin
UCLINUX_DIST=/usr/src/uClinux-dist
STAGING_DIR=$(UCLINUX_DIST)/staging
TARGET_CROSS=bfin-linux-uclibc-
CC=$(TARGET_CROSS)gcc
STRIP=$(TARGET_CROSS)strip
AR=$(TARGET_CROSS)ar rcu
RANLIB=$(TARGET_CROSS)ranlib
.PHONY: lua
lua:
cd lua-5.1.4/src && $(MAKE) generic
=========== src/Makefile
MYCFLAGS = -DLUA_USE_POSIX -DLUA_USE_DLOPEN
CFLAGS = -O2 -Wall $(MYCFLAGS)
LDFLAGS=-lcrypt
MYLIBS= -ldl
LIBS = -Wl,-E -lm $(MYLIBS)
....
$(LUA_T): $(LUA_O) $(LUA_A)
$(CC) -o $@ $(LIBS) $(LDFLAGS) $(LUA_O) $(LUA_A)
$(LUAC_T): $(LUAC_O) $(LUA_A)
$(CC) -o $@ $(LIBS) $(LDFLAGS) $(LUAC_O) $(LUA_A)
...
generic:
$(MAKE) all
===========
Thank you.