Jump to content
TrinityCore

Compile or cmake problems


Joy
 Share

Recommended Posts

  • Replies 2.9k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi Guys,I do not understand English

My problem is in Cmake , please help 

-----------------------------------------------------------------

Looking for pthread.h

Looking for pthread.h - not found

Found Threads: TRUE

CMake Error at cmake/macros/FindBoost.cmake:1231 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
dep/boost/CMakeLists.txt:44 (find_package)

 

Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM

Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM - Failed

Looking for open

Looking for open - found

------------------------------------------------------------------

My Systeam : Windows 32bit
Boost 32bit
Visual Studio 2017

Boost 1.63.0     Help Please 

errorr.JPG

Link to comment
Share on other sites

  • 2 weeks later...

AliStorM tell Cmake where to find all of its files temporarily by changing the values in the red sections to the correct directories, or you can edit the dep/boost/CMakeLists.txt and set the correct file paths in the code.

 

Anyone mind giving me a little pointer in the right direction while building on MSVC? Google is not my friend today :(

5>Main.obj : error LNK2019: unresolved external symbol _SSLeay_version referenced in function __catch$??R<lambda_f672a1af9453efdbe45f4f917e2d47a8>@@QBEXXZ$0
5>scripts.lib(cs_server.obj) : error LNK2001: unresolved external symbol _SSLeay_version
5>common.lib(OpenSSLCrypto.obj) : error LNK2019: unresolved external symbol _CRYPTO_num_locks referenced in function "void __cdecl OpenSSLCrypto::threadsCleanup(void)" (?threadsCleanup@OpenSSLCrypto@@YAXXZ)
5>common.lib(OpenSSLCrypto.obj) : error LNK2019: unresolved external symbol _CRYPTO_set_locking_callback referenced in function "void __cdecl OpenSSLCrypto::threadsCleanup(void)" (?threadsCleanup@OpenSSLCrypto@@YAXXZ)
5>common.lib(OpenSSLCrypto.obj) : error LNK2019: unresolved external symbol _CRYPTO_THREADID_set_numeric referenced in function "void __cdecl threadIdCallback(struct crypto_threadid_st *)" (?threadIdCallback@@YAXPAUcrypto_threadid_st@@@Z)
5>common.lib(OpenSSLCrypto.obj) : error LNK2019: unresolved external symbol _CRYPTO_THREADID_set_callback referenced in function "void __cdecl OpenSSLCrypto::threadsCleanup(void)" (?threadsCleanup@OpenSSLCrypto@@YAXXZ)
5>common.lib(ARC4.obj) : error LNK2019: unresolved external symbol _EVP_CIPHER_CTX_init referenced in function "public: __thiscall ARC4::ARC4(unsigned int)" (??0ARC4@@QAE@I@Z)
5>common.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _HMAC_CTX_init referenced in function "public: __thiscall HmacHash::HmacHash(unsigned int,unsigned char *)" (??0HmacHash@@QAE@IPAE@Z)
5>common.lib(HMACSHA1.obj) : error LNK2019: unresolved external symbol _HMAC_CTX_cleanup referenced in function "public: __thiscall HmacHash::~HmacHash(void)" (??1HmacHash@@QAE@XZ)

 

I can only assume this is a libmysql issue but im not sure how to fix it, this is what im using:

MSVC 2017, MySQL 5.6, boost 1.69, openssl 32bit

Edited by Cynthetic
Link to comment
Share on other sites

  • 1 month later...

Hi all,

after some years i have compiled again trinitycore 3.3.5, all gone smooth on compilation, but when i try to start the worldserver i get:

/....../DatabaseWorkerPool.cpp:60 in DatabaseWorkerPool FATAL ERROR:
Used MySQL library version (6.1.11) does not match the version used to compile TrinityCore (5.7.16). Search on forum for .
 

Now i read the faq that tell to recomplie it, but libraries on my system never changed from the time of compilation till the time of start the binaries, so is impossible that there are inconsistences. But anyway i have tried, and as predicted, no luck same result.

I'm using gentoo linux as distribution,

my db ver is: mysql  Ver 15.1 Distrib 10.1.37-MariaDB, for Linux (i686) using readline 7.0

kernel rev: Linux version 4.14.65-gentoo (gcc version 6.4.0 (Gentoo 6.4.0-r1 p1.3))

 

Any idea how can resolve this?

Link to comment
Share on other sites

Maybe i figured out the problem.


Now gentoo when you  want to emerge mysql (or mariadb) use dev-db/mysql-connector-c for client libraries


dev-db/mysql-connector-c has version 6.1.11 as the error says, that's different from the mysql/mariadb version number.


I'm recompiling now trinity with client libraries compiled from package dev-db/mysql and not from dev-db/mysql-connector-c


Later i'll post if i solved or not.

Edited by purpe
Link to comment
Share on other sites

  • 2 months later...

Hello,

I recently just updated to the latest version on master (8.1.5.30706, SHA: 138e822d859fd9ff9d79e1ce16823992ad43aec4) and noticed that my linux build was no longer compiling. The build was failing on a few variables in 'UpdateFields.h' due to the variables being named the same as their struct/class

UpdateFields.h : 384 : UpdateFieldArray<QuestLog, 100, 35, 36> QuestLog;
UpdateFields.h : 482 : UpdateFieldArray<DynamicUpdateField<Research, -1, -1>, 1, 20, 21> Research;
UpdateFields.h : 495 : DynamicUpdateField<SpellPctModByLabel, 0, 17> SpellPctModByLabel;
UpdateFields.h : 496 : DynamicUpdateField<SpellFlatModByLabel, 0, 18> SpellFlatModByLabel;
UpdateFields.h : 577 : UpdateFieldArray<RestInfo, 2, 461, 462> RestInfo;
UpdateFields.h : 586 : UpdateFieldArray<PVPInfo, 6, 551, 552> PvpInfo;

It compiles fine in visual studio but fails with gcc. I am not familiar enough with gcc to know if there are any settings that would allow this. However, in the mean time, I was able to get it to compile by providing the namespace for the struct. It works but might not be the best solution or fit with the coding standards. Heres the updates below.

UpdateFields.h : 384 : UpdateFieldArray<UF::QuestLog, 100, 35, 36> QuestLog;
UpdateFields.h : 482 : UpdateFieldArray<DynamicUpdateField<UF::Research, -1, -1>, 1, 20, 21> Research;
UpdateFields.h : 495 : DynamicUpdateField<UF::SpellPctModByLabel, 0, 17> SpellPctModByLabel;
UpdateFields.h : 496 : DynamicUpdateField<UF::SpellFlatModByLabel, 0, 18> SpellFlatModByLabel;
UpdateFields.h : 577 : UpdateFieldArray<UF::RestInfo, 2, 461, 462> RestInfo;
UpdateFields.h : 586 : UpdateFieldArray<UF::PVPInfo, 6, 551, 552> PvpInfo;

I was thinking about making a pull request for it but wanted to make sure it was correct first. Also, wasn't sure how the pull request process works in github. Let me know if there are any issues with this or if there is anything that needs to be changed.

Thank you,
Chaz H

  • Like 1
Link to comment
Share on other sites

  • 1 month later...

EDIT: I found the solution. I forgot to specify the platform as Win64, which meant that CMake was looking for the 32 bit libraries, which I don't have.

I am attempting to compile TrinityCore for 3.3.5a. CMake says that it cannot find the Boost and OpenSSL libraries. I definitely have the correct ones, installed in the correct directories.

https://pastebin.com/94g2kebN

I've re-installed these things many times and nothing seems to help. 

Enviroment variable BOOST_ROOT is set correctly to C:/local/boost_1_66_0. I have the boost 1.66.0 msvc-14.1 64-bit version. OpenSSL is 1.0.2 64-bit version. The reason for using those specific versions instead of the newer ones is that I read in windows requirements guide that 1.66.0 is the minimum required version, and 1.70.0 did not work. As for OpenSSL, I read in some troubleshooting post that you cannot use the 1.1.x versions of OpenSSL – even though the requirements page states that you can use them, so I installed 1.0.2 instead. I always make sure to uninstall any previously installed versions before I install new ones, I do not have multiple versions installed.

Edited by edes
solution
Link to comment
Share on other sites

  • 2 weeks later...

I have seen several post (here, stackoverflow, and the emu forum) going back over a year with this issue:

CMake Error at cmake/macros/FindBoost.cmake:1231 (message):
Unable to find the requested Boost libraries.

Boost version: 1.66.0

Boost include path: C:/boost_1_66_0

Could not find the following static Boost libraries:

boost_system
boost_filesystem
boost_thread
boost_program_options
boost_iostreams

No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost. If you still have problems search on forum for TCE00020.
Call Stack (most recent call first):
dep/boost/CMakeLists.txt:41 (find_package)

 

I haven't seen anyone post a solution. I followed the Trinity Wiki Requirements section and I received this same error. The Wiki Requirements specifically say " we recommend to compile all on 64 bits mode ". So I installed VS2017 x64, CMake x64, Boost msi x64, OpenSSL x64, etc. However CMake defaults everything to being x86. EVENTUALLY, I gave up trying to make CMake work with x64, removed everything, started over using only x86 dependencies. This resolved the issue. I fought with this for far longer than I'd like to admit before giving up.

 

Because of all of the frustration that this has caused, for myself and several others, I'm requesting someone who knows more than I do, please go through the Windows Requirements on the Trinity Wiki to update/change the instructions regarding compiling in x64?

Or update the cmakelist.txt to be compatible with x64? please?

Edited by canemuto
Link to comment
Share on other sites

Hi,
 

i'm not a expert at this full topic.
But have fight this issue for myself.
I have solve this with this steps.

Software Version use, base on the Wiki. 

  1. Visual Studio 2019 (MSVC 16.2)
  2. Boost 1.70 (set Env BOOST_ROOT=C:/SDK/boost_1_70_0)
    1. Setup from boost_1_70_0-unsupported-msvc-14.2-64.exe
  3. cmake 3.15 (cmake-3.15.1-win64-x64.msi)

Fix on the Master Branch.

  1. Remove or Rename \TrinityCore\cmake\macro\FindBoost.txt. So cmake pickup lastest FindBoost.cmake from  C:\Program Files\CMake\share\cmake-3.15\Modules\FindBoost.cmake .  To find Boost 1.70.0.
  2. Fix TrinityCore\CMakeLists.txt . Add 
    cmake_policy(SET CMP0074 OLD) 
  3. Fix src/common/Utilities/TaskScheduler.h with patch from 3.5.5 for Visual Studio 2019 see https://github.com/TrinityCore/TrinityCore/pull/2363  Keyword use const . Line ~123 
    1.     /// Container which provides Task order, insert and reschedule operations.
          struct Compare
          {
      1. OLD: bool operator() (TaskContainer const& left, TaskContainer const& right)
        NEW     bool operator() (TaskContainer const& left, TaskContainer const& right) const

 

Mybe this helps a bit.

Edited by yastoyerte
  • Upvote 1
Link to comment
Share on other sites

I ran into a handful of issues while compiling both 32 bit and 64 bit versions of the server. This is a small collection of the issues I ran into and the solutions that worked. Thank you everyone who contributes to this forum and helps people resolve these issues.

CMake Errors

Keywords: FindBoost - Boost libraries

Example:

  1. CMake Error at cmake/macros/FindBoost .cmake:1231 (message):
  2. Unable to find the requested Boost libraries.
  3. No Boost libraries were found.

Problem: CMake can't find Boost.

Solution: Remove or Rename \TrinityCore\cmake\macro\FindBoost.txt I renamed mine to FindBoost.old

           Credit: yastoyerte

VB Compiling Errors

Keywords: LNK1104 - libboost
Example:

  1. LINK : fatal error LNK1104 : cannot open file 'libboost_filesystem-vc141-mt-gd-1_65_1.lib' [C:\Users\Alan\Downloads\AshamaneCore-master\build\CMakeFiles\CMakeTmp\cmTC_09a14.vcxproj]
  2. LINK : fatal errorLNK1104 : no se puede abrir el archivo 'libboost_filesystem-vc141-mt-gd-1_64.lib' [C:\Users\ivan\Desktop\Server7.2\TrinityCoreBuild\CMakeFiles\CMakeTmp\cmTC_70757.vcxproj]

Problem: Wrong, bad, or incompatible version of Boost.
Solution: Remove your current version and replace with an older or newer version. I had to go from 1_70_0 to 1_66_0.
    Credit: Aokromes

Keywords: LNK2019 - External Symbol
Example:

  1. error LNK2019: unresolved external symbol mysql_close referenced in function "public: virtual __cdecl MySQLConnection::~MySQLConnection
  2. error LNK2019: unresolved external symbol mys ql_server_init referenced in function "bool __cdecl Sta rtD B(void) "

Problem: SQL, Boost, OpenSSL or something you downloaded and isntalled is either 32bit or 64bit. Check everything and make sure they are all the same type.
Solution: Make sure you all of your programs, libraries, etc. are all either 32bit or 64bit. Don't mix and match.
    Credit: Nay

Thank you again to everyone who contributes. I hope this helps someone.

Link to comment
Share on other sites

  • 4 weeks later...

ive tried both boost 1.66 and boost 1.60 and both are giving errors, i also seem to be having problems with openSSL and ive tried 2 versions of that aswell. this is the error i get while using all 64bit programs and 2 versions of openSSL and Boost installed on my system

* TrinityCore revision : 07e2264964ef+ 2019-08-23 19:28:21 +0200 (3.3.5 branch)

 

* Install core to : C:/Program Files (x86)/TrinityCore

 

* Build world/auth : Yes (default)

* Build with scripts : Yes (static)

* Build map/vmap tools : Yes (default)

* Build core w/PCH : Yes (default)

* Build scripts w/PCH : Yes (default)

* Show compile-warnings : No (default)

* Use coreside debug : No (default)

* Show source tree : Yes (hierarchical)

* Use GIT revision hash : Yes (default)

 

Entering C:/Trinity/dep

Entering C:/Trinity/dep/threads

Returning to C:/Trinity/dep

Entering C:/Trinity/dep/boost

CMake Warning (dev) at dep/boost/CMakeLists.txt:50 (find_package):
Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.

Environment variable Boost_ROOT is set to:

C:/local/boost_1_66_0

For compatibility, CMake is ignoring the variable.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Boost (missing: system filesystem thread program_options
iostreams regex) (found suitable version "1.66.0", minimum required is
"1.59")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:2142 (find_package_handle_standard_args)
dep/boost/CMakeLists.txt:50 (find_package)

 

Returning to C:/Trinity/dep

Returning to C:/Trinity

Link to comment
Share on other sites

  • 2 weeks later...

Uhhh, i tried to install with guide, but failed...I found some similar mistakes and solutions, but its not working...Visual Studio 2017 community installed, MSBuild exist, Win 10 SDK included and etc...I am very tired and lost a lot of time. I hope for your help^_^

 

P.S. Visual Studio 14 2015 works without this mistake, but vs 14 2015 is old version for master 8.2...Welp it's other story

damn_cmake_mistake.PNG

damn_cmake_mistake2.PNG

UPD - Solution: It was just corrupted Win 10 SDK and corrupted some crt libs...Great :D

Edited by DonPompon
Found solution in my problem
Link to comment
Share on other sites

  i tried to install bfa on debian, but can't.

Debian VM on vbox

config -- https://pastebin.com/nRXiKChf

use clang for making bin

install script -- https://pastebin.com/YGuGRGDn

compile log of install script -- https://pastebin.com/muqPs48q

what wrong? Help me if You can.

wotlk and cata compiling normally,

 

Edited by Lucian_by
update compile info
Link to comment
Share on other sites

  • 2 weeks later...
  • Aokromes changed the title to Compile or cmake problems
  • Aokromes pinned this topic
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...