Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doesn't build and install on ubuntu 12.10, probably not on any debian-derived distro #25

Open
sam-github opened this issue Dec 19, 2012 · 2 comments

Comments

@sam-github
Copy link

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

@nikolas
Copy link

nikolas commented Jul 30, 2014

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

@sam-github
Copy link
Author

That's the same error I found, try using cmake directly, it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants