wahern / luaossl

Most comprehensive OpenSSL module in the Lua universe.
http://25thandclement.com/~william/projects/luaossl.html
Other
140 stars 49 forks source link

aarch64 compilation fails #192

Open bugsyb opened 3 years ago

bugsyb commented 3 years ago

On aarch64 system (ubuntu focal) following happens:

Installing https://luarocks.org/luaossl-20200709-0.src.rock

Error: Failed installing dependency: https://luarocks.org/luaossl-20200709-0.src.rock - Could not find library file for CRYPTO
  No file libcrypto.a in /usr/lib
  No file libcrypto.a in /usr/lib/x86_64-linux-gnu
  No file libcrypto.so in /usr/lib
  No file libcrypto.so in /usr/lib/x86_64-linux-gnu
  No file matching libcrypto.so.* in /usr/lib
  No file matching libcrypto.so.* in /usr/lib/x86_64-linux-gnu
You may have to install CRYPTO in your system and/or pass CRYPTO_DIR or CRYPTO_LIBDIR to the luarocks command.

It looks like it tries to specifically find x84_64 binaries, but missed existing ones aarch64:

# find /usr -iname "libcrypto*"
/usr/lib/aarch64-linux-gnu/libcrypto.a
/usr/lib/aarch64-linux-gnu/pkgconfig/libcrypto.pc
/usr/lib/aarch64-linux-gnu/libcrypto.so
/usr/lib/aarch64-linux-gnu/libcrypto.so.1.1

Workaround is below, but would be cool to get it automatically discovered: luarocks luaossl 20190731-0 CRYPTO_LIBDIR=/usr/lib/aarch64-linux-gnu/ OPENSSL_LIBDIR=/usr/lib/aarch64-linux-gnu/

daurnimator commented 2 years ago

This looks like a misconfigured luarocks insallation; rather than anything this repo can address.

Note that this repo also has a make based flow available for compilation+installation.