FredyH / MySQLOO

MySQLOO
GNU Lesser General Public License v2.1
138 stars 55 forks source link

linux x64 error #35

Closed Kamelots closed 4 years ago

Kamelots commented 4 years ago

lua_run require("mysqloo")

require("mysqloo")... 18996: /srv/gmodds/garrysmod/lua/bin/gmsv_mysqloo_linux64.dll: error: symbol lookup error: undefined symbol: SSL_get_fd (fatal)

[ERROR] lua_run:1: Couldn't load module library!

  1. require - [C]:-1
    1. unknown - lua_run:1
FredyH commented 4 years ago

What linux distro/version are you using?

Kamelots commented 4 years ago

Distributor ID: Ubuntu Description: Ubuntu 16.04.6 LTS Release: 16.04 Codename: xenial

FredyH commented 4 years ago

Well it seems like you are missing openssl, you can just try installing it on your machine but it should be statically linked, so I am not sure why it's still requirng that. Can you run ldd on your dll for me and show me the output?

Jakobzs commented 4 years ago

Having the same issue here, the output looks like this: picture

Running on Ubuntu 18.04, OpenSSL version 1.1.1.

EDIT:

This is the output of using: ldd gmsv_mysqloo_linux64.dll

image

EDIT 2:

The issue has been fixed. The problem was that you had a "libmysqlclient.a" library already embedded in the repository which apparently does not play too well with other architectures.

The fix (For Ubuntu 18.04) is to remove "libmysqlclient.a" in the folder MySQL/lib64/linux, and then install the package libmysqlclient-dev.

emoyly commented 4 years ago

We were trying to migrate to the 64bit beta branch on our Ubuntu 16.04 server as well, and had some of these errors too.

We had the issue of not being able to require the module, and got that very same vague error saying that it Couldn't load module library!, just like @Kamelots While trying to figure out what exactly was wrong, we also tried to compile it on a Windows machine, but with no luck.

So after digging around a bit, we tried running the ldd command on the dll file, and the output looked a lot like the one posted by @Seraph2 After trying their solution (removing the libmysqlclient.a and installing libmysqlclient-dev), that made the output look like this output of ldd

But we still couldn't load the module on the actual server...

What ended up solving that for us, was upgrading our server from Ubuntu 16.04 to 18.04, then compiling it on a machine running that same version and distro.

FredyH commented 4 years ago

I reverted both the libraries back to mysql6's libmysqlclient because the new ones apparently require openssl to be linked to it, which was not documented anywhere.

Unfortunately that means that the new mysql8 authentication will not work with this library but I don't want to also add statically linked libssl because that will just cause even more issues.