Package: luarocks
Version: 2.0.9-1
Severity: normal

Dear Maintainer,

When using luarocks to install a luarock that (1) requires compilation, and (2)
requires a specific library, luarocks seems to try and search for the library
first.  Unfortunately it also seems to use the crufty old "look in fixed
locations" method of doing so...

E.g., I tried to do "sudo luarocks install luasec", and the luasec module
requires libssl.  I have libssl installed, but luarocks couldn't find it,
because it was not looking in the proper location for Debian:

   $ sudo luarocks install luasec
   Installing http://luarocks.org/repositories/rocks/luasec-0.4.1-2.src.rock...
   Using http://luarocks.org/repositories/rocks/luasec-0.4.1-2.src.rock...
switching to 'build' mode
   Archive:  /usr/tmp/luarocks_luarocks-rock-
luasec-0.4.1-2-1537/luasec-0.4.1-2.src.rock
     inflating: luasec-0.4.1-2.rockspec
     inflating: luasec-0.4.1.tar.gz

   Error: Could not find expected file libssl.a, or libssl.so, or libssl.so.*
for OPENSSL -- you may have to install OPENSSL in your system and/or pass
OPENSSL_DIR or OPENSSL_LIBDIR to the luarocks command. Example: luarocks
install luasec OPENSSL_DIR=/usr/local

The problem of course is that Debian puts libraries in /usr/lib/x86_64-linux-
gnu, and luarocks was not looking there.

Manually specifying the location, as per the instructions in the error message,
made it work:

   $ sudo luarocks install luasec OPENSSL_LIBDIR=/usr/lib/x86_64-linux-gnu
   Installing http://luarocks.org/repositories/rocks/luasec-0.4.1-2.src.rock...
   Using http://luarocks.org/repositories/rocks/luasec-0.4.1-2.src.rock...
switching to 'build' mode
   Archive:  /usr/tmp/luarocks_luarocks-rock-
luasec-0.4.1-2-6124/luasec-0.4.1-2.src.rock
     inflating: luasec-0.4.1-2.rockspec
     inflating: luasec-0.4.1.tar.gz
   gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/buffer.c -o src/buffer.o
-I/usr/include
   # ... compilation lines omitted ...
   gcc -O2 -fPIC -I/usr/include/lua5.1 -c src/usocket.c -o src/usocket.o
-I/usr/include
   gcc -shared -o ssl.so -L/usr/local/lib src/buffer.o src/context.o src/io.o
src/ssl.o src/timeout.o src/usocket.o -L/usr/lib/x86_64-linux-gnu -lssl
-lcrypto
   Updating manifest for /usr/local/lib/luarocks/rocks

   luasec 0.4.1-2 is now built and installed in /usr/local/ (license: MIT)

I suppose the easy solution is to just hack Debian's version of luarocks to
know about Debian's particular library locations.

[Of course a much better solution would be to use some sort of less hacky
method of finding libraries, e.g. by using autoconf's "probe using the
compiler" but I suppose that's unlikely to happen.]

Thanks,

-miles



-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable'), (101, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.10-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=ja_JP.utf8, LC_CTYPE=ja_JP.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages luarocks depends on:
ii  liblua5.1-0-dev [liblua5.1-dev]  5.1.5-5
ii  lua5.1                           5.1.5-5
ii  wget                             1.14-2
ii  zip                              3.0-7

luarocks recommends no packages.

luarocks suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to