lua-users home
lua-l archive

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



On Nov 14, 2013, at 7:55 PM, Jose Torre-Bueno <jtorrebueno@cox.net> wrote:

This is probably a very newbe question but I have had an attempt to install luasockets fail and it seems to involve the linker failing to find object files.
I have luasocket unpacked to /usr/bin/luasocket-2.0.2.  Make compiles correctly when run in this directory but when it attempts to link I get a storm of messages about _LuaL and _Lua functions missing.  I have luaxlib.o in /usr/include/lua5.2.  (this is under OSX if that makes a difference).  

Further study partially answers some of this:
1) As far as I can tell luasocket-2.0.2 only works with Lua 5.1 and not 5.2
2) The config of the makefile has the settings for OSX commented out.  I assume I need to edit the config to activate the OSX defines
3) it expects the share directory to be /usr/local/share/lua/5.1
4) it expects the library to be /usr/local/lib/lua/5.1

Some things I have not figured out yet:
Where does it expect lua5.1 itself to be?
the definition of LAUINC is commented out but it is used later define CFLAGS, is it really not needed in 5.1?
Where should the source directory be when I start?

Does anybody have advice on having a simultaneous installs of 5.1 and 5.2?


In any case make seems to be unable to find the Lua library files.  FWIW the Lua interpreter works fine but this is the first time I have attempted to use Lua with a C program. I assume that either I have something installed in a non standard location that is baffling make or there is some environmental parameter I need to set so make can find the object files.

I have /usr/bin and /usr/local/bin on the path, do I need to add /usr/include to the path?

As a follow on question is there some customary arrangement of files that Lua accessory programs expect to find resources in by default? I know that by the appropriate use of environmental variables and package.path I can store files anyplace but it seems to me that there are advantages to putting things in the default locations other programs expect them. 

Jose de la Torre-Bueno, Ph.D.
Empowered Energy Solutions Inc.
Intellectual Property & Technology Management
T (619) 977-0553
F (760) 295-7119