luacrypto
luacrypto copied to clipboard
doesn't build and install on ubuntu 12.10, probably not on any debian-derived distro
Debian/ubuntu name the lua package lua5.1, lua5.2, etc... so the ./configure in luacrypto fails to find lua. I modified the configure.ac to look for lua5.1 package, ran autoreconf, and it detected lua5.1.
But, it doesn't build:
make[2]: Entering directory `/home/sroberts/s/luacrypto/luacrypto/src'
/bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -module -avoid-version -o crypto.la -rpath lcrypto.lo -lssl -lcrypto
libtool: link: only absolute run-paths are allowed
No idea what's going on here, so, I abandoned the directions in INSTALL, and tried cmake. This works better:
cmake CMakeLists.txt
make
make install
But, it doesn't install into a location where lua's package.cpath will search:
/usr/local/lib/lua/crypto.so
is not in package.cpath:
% lua -e "print(package.cpath)" ./?.so;/usr/local/lib/lua/5.1/?.so;/usr/lib/i386-linux-gnu/lua/5.1/?.so;/usr/lib/lua/5.1/?.so;/usr/local/lib/lua/5.1/loadall.so
I know that autodetection of lua is painful and non-standard, but two suggestions:
Modify INSTALL to recommend people use cmake if they have it (and consider removing the auto- cruft from the repo, it should be in released tarballs, if you release, but doesn't have to be checked in).
Train cmake to derive the crypto.so install path from package.cpath (probably most portable), or try to get the path from pkg-config:
pkg-config lua5.1 --define-variable=prefix=/usr/local --variable=INSTALL_CMOD /usr/local/lib/i386-linux-gnu/lua/5.1
The crypto.so did appear to be built correctly, with cmake, though, once I move once I've moved it into the package.cpath: % lua -l crypto -e "print(crypto._DESCRIPTION)" LuaCrypto is a Lua wrapper for OpenSSL
I'm failing to compile this on Ubuntu 12.04.4. configure works but I can't make.
$ make
make all-recursive
make[1]: Entering directory `/home/nnyby/src/luacrypto'
Making all in src
make[2]: Entering directory `/home/nnyby/src/luacrypto/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/lua5.1 -g -O2 -MT lcrypto.lo -MD -MP -MF .deps/lcrypto.Tpo -c -o lcrypto.lo lcrypto.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/lua5.1 -g -O2 -MT lcrypto.lo -MD -MP -MF .deps/lcrypto.Tpo -c lcrypto.c -fPIC -DPIC -o .libs/lcrypto.o
mv -f .deps/lcrypto.Tpo .deps/lcrypto.Plo
/bin/bash ../libtool --tag=CC --mode=link gcc -g -O2 -module -avoid-version -o crypto.la -rpath lcrypto.lo -lssl -lcrypto
libtool: link: only absolute run-paths are allowed
make[2]: *** [crypto.la] Error 1
make[2]: Leaving directory `/home/nnyby/src/luacrypto/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nnyby/src/luacrypto'
make: *** [all] Error 2
That's the same error I found, try using cmake directly, it works.