nwnxee / unified

Binaries available under the Releases tab on Github
https://nwnxee.github.io/unified
GNU General Public License v3.0
131 stars 92 forks source link

PostgreSQL libmariadbclient #421

Closed hartontw closed 5 years ago

hartontw commented 5 years ago

[Ubuntu 18.04] With PostgreSQL installed and running, the chosen user/role (the same is running the server) can create tables and I've tested with some queries of all kind.

...
D [15:46:20] [NWNX_Core] [NWNXCore.cpp:261] Loading plugin NWNX_SQL.so
E [15:46:20] [NWNX_Core] [NWNXCore.cpp:269] Failed to load plugin (NWNX_SQL.so) because 'Plugin failed to load: libmariadbclient.so.18: cannot open shared object file: No such file or directory'.
F [15:46:20] [NWNX_Core] [NWNXCore.cpp:403] The server encountered a fatal error 'Plugin failed to load: libmariadbclient.so.18: cannot open shared object file: No such file or directory' during setup and must now terminate.
ASSERTION FAILURE
  Summary: Failed at (/root/nwnxee/NWNXLib/Log.cpp:70)
  Backtrace:
    ./NWNX_Core.so(_ZN7NWNXLib8Platform5Debug13GetStackTraceB5cxx11Eh+0x29) [0xf7d262f1]
    ./NWNX_Core.so(_ZN7NWNXLib6Assert4FailEPKcS2_iS2_+0xc1) [0xf7c9989f]
    ./NWNX_Core.so(_ZN7NWNXLib3Log13InternalTraceENS0_7Channel4EnumES2_PKcS4_iS4_+0x14d) [0xf7c99a9d]
    ./NWNX_Core.so(_ZN4Core8NWNXCore19CreateServerHandlerEPN7NWNXLib3API11CAppManagerE+0x802) [0xf7c97072]
    ./nwserver-linux(+0x1dc70) [0x565e0c70]
    /lib32/libc.so.6(__libc_start_main+0xf1) [0xf76d2e81]
    ./nwserver-linux(+0x216de) [0x565e46de]

My environment:

...
export NWNX_SQL_TYPE=PostgreSQL
export NWNX_SQL_HOST=localhost
export NWNX_SQL_USERNAME=nwnx
export NWNX_SQL_PASSWORD=nwn
export NWNX_SQL_DATABASE=nwn_db
...

I've tried to install libmariadbclient but I think it is not a postgres dependency.

Daztek commented 5 years ago

Did you compile NWNXEE yourself or did you download the binaries? If it's the latter, NWNX_SQL needs both the PostgreSQL and MySQL libraries.

Try installing libmariadbclient18:i368: sudo apt install libmariadbclient18:i368

hartontw commented 5 years ago

Thanks, your solution works to solve this issue in particular but I still getting errors:

...
D [19:42:13] [NWNX_Core] [NWNXCore.cpp:261] Loading plugin NWNX_SQL.so
E [19:42:13] [NWNX_Core] [NWNXCore.cpp:269] Failed to load plugin (NWNX_SQL.so) because 'Plugin failed to load: libpq.so.5: cannot open shared object file: No such file or directory'.
F [19:42:13] [NWNX_Core] [NWNXCore.cpp:403] The server encountered a fatal error 'Plugin failed to load: libpq.so.5: cannot open shared object file: No such file or directory' during setup and must now terminate.
...

I've found a "solution" to this issue. Find ``libpq.so.5``` and symblink it to /usr/lib/ but:

D [20:46:38] [NWNX_Core] [NWNXCore.cpp:261] Loading plugin NWNX_SQL.so
E [20:46:38] [NWNX_Core] [NWNXCore.cpp:269] Failed to load plugin (NWNX_SQL.so) because 'Plugin failed to load: libpq.so.5: wrong ELF class: ELFCLASS64'.
F [20:46:38] [NWNX_Core] [NWNXCore.cpp:403] The server encountered a fatal error 'Plugin failed to load: libpq.so.5: wrong ELF class: ELFCLASS64' during setup and must now terminate.
ASSERTION FAILURE

Should I install postgresql for x86?

Daztek commented 5 years ago

Yeah, try libpq5:i386

You might also need libpq-dev:i386, but I'm not sure about that one.

hartontw commented 5 years ago

Only libpq5:i386 is needed. It's running.

From first error to running:

sudo apt install libmariadbclient18:i368
sudo apt install libpq5:i368

Thanks a lot. You can close the issue if you want.

Daztek commented 5 years ago

You're welcome!