Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Linux Servers

Support::Linux Servers Support forum for Linux EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 02-02-2018, 08:09 PM
jdx's Avatar
jdx
Fire Beetle
 
Join Date: Feb 2018
Location: Nektulos Forest
Posts: 6
Default 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

Last edited by jdx; 02-02-2018 at 09:28 PM.. Reason: Indicate that the build failure has been solved
Reply With Quote
  #2  
Old 02-02-2018, 08:10 PM
jdx's Avatar
jdx
Fire Beetle
 
Join Date: Feb 2018
Location: Nektulos Forest
Posts: 6
Default

FWIW I have tried rerunning the installer and rebooting the VM. That shouldn't fix anything, and it didn't.
Reply With Quote
  #3  
Old 02-02-2018, 08:31 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,164
Default

Install libsodium
Reply With Quote
  #4  
Old 02-02-2018, 08:58 PM
jdx's Avatar
jdx
Fire Beetle
 
Join Date: Feb 2018
Location: Nektulos Forest
Posts: 6
Default

Quote:
Originally Posted by demonstar55 View Post
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.
Reply With Quote
  #5  
Old 02-02-2018, 09:16 PM
jdx's Avatar
jdx
Fire Beetle
 
Join Date: Feb 2018
Location: Nektulos Forest
Posts: 6
Default

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
Reply With Quote
  #6  
Old 02-02-2018, 09:27 PM
jdx's Avatar
jdx
Fire Beetle
 
Join Date: Feb 2018
Location: Nektulos Forest
Posts: 6
Default

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
Reply With Quote
  #7  
Old 02-03-2018, 03:00 AM
Akkadius's Avatar
Akkadius
Administrator
 
Join Date: Feb 2009
Location: MN
Posts: 2,071
Default

This is why we do this:

https://github.com/EQEmu/Server/blob...nstall.sh#L128
Reply With Quote
  #8  
Old 02-20-2018, 12:07 PM
jdx's Avatar
jdx
Fire Beetle
 
Join Date: Feb 2018
Location: Nektulos Forest
Posts: 6
Default

Quote:
Originally Posted by Akkadius View Post
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.
Reply With Quote
  #9  
Old 02-21-2018, 12:54 AM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

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?
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #10  
Old 02-24-2018, 02:58 AM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

Updated the install script to install the sodium library regardless of what's already installed. Should fix the problem.
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
Reply

Tags
encryption, loginserver, make, server, ubuntu


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:48 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3