EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   encryption.cpp.o compile failure on Ubuntu 16.04.3 LTS (https://www.eqemulator.org/forums/showthread.php?t=41742)

jdx 02-02-2018 08:09 PM

encryption.cpp.o compile failure on Ubuntu 16.04.3 LTS
 
-SOLVED- Install libsodium 1.0.9


Fresh VM install of Ubuntu 16.04.3 LTS.
Fresh pull of install.sh.

Looks like the crypto constants and functions are not defined where encryption.cpp can use them. But there are no failures to include header files so that's a bit weird.

Code:

vagrant@ubuntu-xenial:/home/eqemu/server_source/Server/build$ make
[ 97%] Built target common
[ 97%] Built target luabind
[ 97%] Built target libuv
[ 97%] Built target fmt
[ 97%] Built target shared_memory
[ 97%] Built target world
[ 97%] Built target zone
[ 97%] Built target ucs
[ 97%] Built target queryserv
[ 97%] Built target eqlaunch
[ 97%] Building CXX object loginserver/CMakeFiles/loginserver.dir/encryption.cpp.o
/home/eqemu/server_source/Server/loginserver/encryption.cpp: In function ‘std::__cxx11::string eqcrypt_argon2(const string&)’:
/home/eqemu/server_source/Server/loginserver/encryption.cpp:78:13: error: ‘crypto_pwhash_STRBYTES’ was not declared in this scope
  ret.resize(crypto_pwhash_STRBYTES);
            ^
/home/eqemu/server_source/Server/loginserver/encryption.cpp:80:56: error: ‘crypto_pwhash_OPSLIMIT_SENSITIVE’ was not declared in this scope
  if (crypto_pwhash_str(&ret[0], &msg[0], msg.length(), crypto_pwhash_OPSLIMIT_SENSITIVE, crypto_pwhash_MEMLIMIT_SENSITIVE) != 0) {
                                                        ^
/home/eqemu/server_source/Server/loginserver/encryption.cpp:80:90: error: ‘crypto_pwhash_MEMLIMIT_SENSITIVE’ was not declared in this scope
  if (crypto_pwhash_str(&ret[0], &msg[0], msg.length(), crypto_pwhash_OPSLIMIT_SENSITIVE, crypto_pwhash_MEMLIMIT_SENSITIVE) != 0) {
                                                                                          ^
/home/eqemu/server_source/Server/loginserver/encryption.cpp:80:122: error: ‘crypto_pwhash_str’ was not declared in this scope
  if (crypto_pwhash_str(&ret[0], &msg[0], msg.length(), crypto_pwhash_OPSLIMIT_SENSITIVE, crypto_pwhash_MEMLIMIT_SENSITIVE) != 0) {
                                                                                                                          ^
/home/eqemu/server_source/Server/loginserver/encryption.cpp: In function ‘bool eqcrypt_verify_hash(const string&, const string&, const string&, int)’:
/home/eqemu/server_source/Server/loginserver/encryption.cpp:147:78: error: ‘crypto_pwhash_str_verify’ was not declared in this scope
  return crypto_pwhash_str_verify(&pwhash[0], &password[0], password.length()) == 0;
                                                                              ^
loginserver/CMakeFiles/loginserver.dir/build.make:182: recipe for target 'loginserver/CMakeFiles/loginserver.dir/encryption.cpp.o' failed
make[2]: *** [loginserver/CMakeFiles/loginserver.dir/encryption.cpp.o] Error 1
CMakeFiles/Makefile2:692: recipe for target 'loginserver/CMakeFiles/loginserver.dir/all' failed
make[1]: *** [loginserver/CMakeFiles/loginserver.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2


jdx 02-02-2018 08:10 PM

FWIW I have tried rerunning the installer and rebooting the VM. That shouldn't fix anything, and it didn't.

demonstar55 02-02-2018 08:31 PM

Install libsodium

jdx 02-02-2018 08:58 PM

Quote:

Originally Posted by demonstar55 (Post 257346)
Install libsodium

I've got both libsodium18 and libsodium-dev installed. The installer script does this before attempting to make loginserver/CMakeFiles/loginserver.dir/encryption.cpp.o. I'll keep digging.

jdx 02-02-2018 09:16 PM

Looks like the new symbols and at least 1 function were added to libsodium in 1.0.9. I'll see if I can convince Debian to install 1.0.9.

http://rpms.remirepo.net/compat_repo...at_report.html

jdx 02-02-2018 09:27 PM

Yep that did it.

https://download.libsodium.org/libso...m-1.0.9.tar.gz

For posterity: By default these will install to /usr/local/lib but EQEmu will want them in /usr/lib/i386-linux-gnu

Akkadius 02-03-2018 03:00 AM

This is why we do this:

https://github.com/EQEmu/Server/blob...nstall.sh#L128

jdx 02-20-2018 12:07 PM

Quote:

Originally Posted by Akkadius (Post 257361)

If libsodium 1.8 is the incorrect version to use, which in my case it was, then the first branch of your conditional takes an incorrect action.

N0ctrnl 02-21-2018 12:54 AM

I'd be curious why it needs libsodium19 all the sudden. Was the code changed to use functions in 1.0.9?

Edit: Unless libsodium18 was never sufficient and 1.0.9+ is needed regardless and the 1.0.11 dep catches it. I admit I've only ever tried the installer on a minimal install of Ubuntu. Was this some other load than that?

N0ctrnl 02-24-2018 02:58 AM

Updated the install script to install the sodium library regardless of what's already installed. Should fix the problem.


All times are GMT -4. The time now is 06:39 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.