Skip to content

Dependency on luaossl troublingΒ #802

@a-schaefers

Description

@a-schaefers

Hi Leafo πŸ‘‹ πŸ˜„

So I just can't get this lib to build on arch linux for the life of me. I was able to get it going on macos, though [ツ)_/Β―

Please just close this if I'm the problem or if this is a dupe. But in my research tonight, I believe I am not the only one.

Currently as I see it, https://github.com/wahern/luaossl appears unmaintained, 13 pull requests open, no updates in 3 years, and better options may be out there?

wahern/luaossl#220

Here this guy tried Lua both 5.3, 5.4, OpenSSL 3.5 and I tried Luajit with Both 3.5 and 1.1.

I did manage to get it to build with luajit, but only after jumping through quite a few hoops, so I was surprised to test my app on linux and run in to trouble - usually other way around. If it matters, here is how I got it working on mac:

export LUA_VERSION=5.1
export LUA_DIR=/opt/homebrew/opt/openresty/luajit
export PATH="$LUA_DIR/bin:$HOME/bin:$PATH"
export LAPIS_OPENRESTY="/opt/homebrew/bin/openresty"
export CRYPTO_DIR="/opt/homebrew/opt/openssl@3"
export CRYPTO_LIBDIR="$CRYPTO_DIR/lib"
export CRYPTO_INCDIR="$CRYPTO_DIR/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"

# with lua symlinked to luajit and front of my PATH
# + with luarocks compiled from source in the above environment and again put on path front

# finally I can cd to lapis and do this:
eval "$(luarocks --lua-version=5.1 --tree=lua_modules path)
luarocks make --only-deps --tree=lua_modules $PROJECT-0.1-1.rockspec \
  CRYPTO_INCDIR=/opt/homebrew/opt/openssl@3/include \
  CRYPTO_LIBDIR=/opt/homebrew/opt/openssl@3/lib \
  OPENSSL_INCDIR=/opt/homebrew/opt/openssl@3/include \
  OPENSSL_LIBDIR=/opt/homebrew/opt/openssl@3/lib

# with lapis listed in my dependencies among other things, it builds

The luaossl issue tracker is choke full of people struggling to build.

I don't mean to be a downer, i love lapis so much and have had SO MUCH FUN building things with it, and I hate web dev.

A quick search, I found https://github.com/zhaozg/lua-openssl and https://github.com/lunarmodules/luasec and I'm also wondering how much lift it would be to make the switch to one of these? I don't mean to create a bunch of work, but maybe it needs to be done? If it's already on the map, again sorry.

Trying to figure out how to save other people some time. This already sunk my night. πŸ˜† If there's a straight forward path to buildling lapis without ssl deps ...

(I already tried a couple hacks, couldn't get it to go after purging luaossl and some modules I think were depending on it, it ended up going back to utf8 stuff I think and I gave up, decided the better path might be to just switch ssl libs in the lapis codebase...),

...i'd be open to that too, because i think we could just fall back to using libcurl or something?

Cheers 🍻

Related issues in lapis open status: #632 #766 #783
and closed: #799 #698 #688 #667 #612 #595 #576 #560 #545 #539

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions