lua-users home
lua-l archive

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


On Saturday, August 06, 2011 02:53:17 PM Hisham wrote:
> On Sat, Aug 6, 2011 at 3:09 PM, Steve Litt 
<slitt@troubleshooters.com> wrote:
> > Hi all,
> > 
> > I can't install luasocket. Here's what happens when I try:
> > 
> > root@mydesk:/d/at/lua/sockets# luarocks install luasocket
> > /* All single C files compile just fine */
> > gcc -shared -O -fpic -o socket.so.2.0.2 luasocket.o timeout.o
> > buffer.o io.o auxiliar.o options.o inet.o tcp.o udp.o except.o
> > select.o usocket.o
> > /usr/bin/ld: luasocket.o: relocation R_X86_64_32 against `.data'
> > can not be used when making a shared object; recompile with
> > -fPIC luasocket.o: could not read symbols: Bad value
> > collect2: ld returned 1 exit status
> > make[1]: *** [socket.so.2.0.2] Error 1
> > make[1]: Leaving directory
> > `/tmp/luarocks_luasocket-2.0.2-4-7249/luasocket-2.0.2/src'
> > make: *** [all] Error 2
> 
> You're running LuaRocks 2.0.2. Please try the latest version,
> 2.0.4.1. There were fixes related to -fPIC since.

OK, so far so good. I uninstalled my current luarocks and luasocket, 
downloaded the 2.0.4.1 tarball, ./configure;make;make install, and it 
worked. However, my Lua sockets program still croaked because my 
require statement couldn't find the luasockets programs stored in 
/usr/local/lib/luarocks. So, for Ubuntu 11.04, where must I tell 
./configure to put the rocks? Alternatively, how can I modify my Ubuntu 
11.04 installed to find its rocks below /usr/local/lib/luarocks, either 
permanently or as a command line arg to the shebang line?

Thanks

SteveT

-- 
Steve Litt
Author: The Key to Everyday Excellence
http://www.troubleshooters.com/bookstore/key_excellence.htm
Twitter: http://www.twitter.com/stevelitt