tgstation / BSQL

Asynchronous SQL support for BYOND
MIT License
5 stars 12 forks source link

Not woking on CentOS 7 #10

Closed Redict closed 6 years ago

Redict commented 6 years ago

rust-g loading successfully, but BSQL fails:

world/New
TestStart
Init time elapsed
Beginning test
BSQL_DEBUG: /world/proc/_BSQL_Internal_Call: Initialize()
runtime error: Unable to load library libBSQL.so

Library built with gcc 8.1.0

Cyberboss commented 6 years ago

As trouble shooting steps, can you place the lib next to the dmb, in .byond/bin, and .byond/lib please?

Redict commented 6 years ago

@Cyberboss runtime error: Unable to load library /root/.byond/bin/libBSQL.so

Actually the binary. On Ubuntu works fine as I see... libBSQL.zip

Cyberboss commented 6 years ago

run ldd on the binary and post the readout please?

Redict commented 6 years ago
./libBSQL.so: /lib/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ./libBSQL.so)
./libBSQL.so: /lib/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by ./libBSQL.so)
./libBSQL.so: /lib/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ./libBSQL.so)
        linux-gate.so.1 =>  (0xf77c1000)
        libmariadb.so.3 => /lib/libmariadb.so.3 (0xf7716000)
        libstdc++.so.6 => /lib/libstdc++.so.6 (0xf762a000)
        libm.so.6 => /lib/libm.so.6 (0xf75e8000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf75cd000)
        libc.so.6 => /lib/libc.so.6 (0xf7401000)
        libpthread.so.0 => /lib/libpthread.so.0 (0xf73e6000)
        libz.so.1 => /lib/libz.so.1 (0xf73cf000)
        libdl.so.2 => /lib/libdl.so.2 (0xf73ca000)
        libssl.so.10 => /lib/libssl.so.10 (0xf7361000)
        libcrypto.so.10 => /lib/libcrypto.so.10 (0xf7177000)
        /lib/ld-linux.so.2 (0xf77c2000)
        libgssapi_krb5.so.2 => /lib/libgssapi_krb5.so.2 (0xf712b000)
        libkrb5.so.3 => /lib/libkrb5.so.3 (0xf7055000)
        libcom_err.so.2 => /lib/libcom_err.so.2 (0xf7050000)
        libk5crypto.so.3 => /lib/libk5crypto.so.3 (0xf701b000)
        libresolv.so.2 => /lib/libresolv.so.2 (0xf7002000)
        libkrb5support.so.0 => /lib/libkrb5support.so.0 (0xf6ff2000)
        libkeyutils.so.1 => /lib/libkeyutils.so.1 (0xf6fed000)
        libselinux.so.1 => /lib/libselinux.so.1 (0xf6fc6000)
        libpcre.so.1 => /lib/libpcre.so.1 (0xf6f61000)
Cyberboss commented 6 years ago

Was this compiled locally? If you pulled the binary from an ubuntu version, differences in the glibc might be causing errors. Best bet would be to compile it on the machine that's running it.

I'll try to spin up a Cent OS Dockerfile to test this when I get home

Redict commented 6 years ago

It was compiled locally with no errors.

[root@sosaki artifacts]# cmake3 ..
-- The C compiler identification is GNU 8.1.0
-- The CXX compiler identification is GNU 8.1.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /root/BSQL/artifacts
[root@sosaki artifacts]# make
Scanning dependencies of target BSQL
[ 10%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/BSQL.cpp.o
[ 20%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/API.cpp.o
[ 30%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/Library.cpp.o
[ 40%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/Connection.cpp.o
[ 50%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/MySqlConnection.cpp.o
[ 60%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/Operation.cpp.o
[ 70%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/MySqlConnectOperation.cpp.o
[ 80%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/MySqlQueryOperation.cpp.o
[ 90%] Building CXX object src/BSQL/CMakeFiles/BSQL.dir/Query.cpp.o
[100%] Linking CXX shared library libBSQL.so
[100%] Built target BSQL
Redict commented 6 years ago

Ok, fixed by export LD_LIBRARY_PATH=/usr/local/lib/ and remakeing

Redict commented 6 years ago

Actually fresh binaries for CentOS 7 if you need it. binary.zip