lua-users home
lua-l archive

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


I've run into some problems getting luaexpat running on osx. I'm using lua 5.1 and I've installed expat 2.0 with a default make install. When I tried to install luaexpat I ran into some difficulties because it was expecting a compat 5.1 install, so i made some changes to avoid that.
I changed my config file to:
--------------------
LUA_LIBDIR= /usr/local/lib/lua/5.1
LUA_DIR= /usr/local/share/lua/5.1
LUA_INC= /usr/local/include
EXPAT_INC= /usr/local/include

LIB_OPTION= -bundle -undefined dynamic_lookup #for MacOS X

LIBNAME= $T.dylib.$V
#COMPAT_DIR= ../compat/src

CWARNS = -Wall -pedantic \
        -Waggregate-return \
        -Wcast-align \
        -Wmissing-prototypes \
        -Wstrict-prototypes \
        -Wnested-externs \
        -Wpointer-arith \
        -Wshadow \
        -Wwrite-strings

#CFLAGS = $(CWARNS) -ansi -O2 -I$(LUA_INC) \
#   -I$(COMPAT_DIR) -I$(EXPAT_INC)

CFLAGS = $(CWARNS) -ansi -O2 -I$(LUA_INC) -I$(EXPAT_INC)

CC = gcc
----------------------

I also commented out the following line in lxplib.c
#include "compat-5.1.h"

i make and everything goes fine, and i move lxp.dylib into /usr/local/ lib/lua/5.1/
and move lom.lua into /usr/local/share/lua/5.1/

however, when I try the example from http://www.keplerproject.org/ luaexpat/examples.html everything works until the call to lxp.new, when I get the following:

dyld: lazy symbol binding failed: Symbol not found: _luaL_findstring
  Referenced from: /usr/local/lib/lua/5.1/lxp.dylib
  Expected in: dynamic lookup

dyld: Symbol not found: _luaL_findstring
  Referenced from: /usr/local/lib/lua/5.1/lxp.dylib
  Expected in: dynamic lookup


Sorry if I'm missing something obvious...second day checking lua out and haven't read much of pil yet..