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

  • 4 weeks later...

I got some error related to boost while using Cmake to generate the c++ files.

Could not find the following static Boost libraries:

boost_system

boost_filesystem

boost_thread

boost_program_options

boost_iostreams

 

If you got the same error, remember to choose x64 if your Cmake and boost are x64 version.

image.png.3252ea4f9cbd3f73d09c36fc05eb4a6d.png

Edited by qyq
Link to comment
Share on other sites

  • 2 months later...

Have an error on configure with CMake. Not sure if it's significant or not. I have tried configuring 32 and 64 bit and both have this warning.

Getting this error on CMake configure with latest git pull:

CMake Warning (dev) at cmake/macros/FindOpenSSL.cmake:220 (math):
Unexpected character in expression at position 2: c

Link to comment
Share on other sites

Hello there, i am new here and i hope some one can help me to understand this error. I am a little noob at compiling but in debian i can do alot.

So i have a Debian 10 VM that run Trinitycore. I want Compile the new Version of 3.3.5a on it but its stuck. I dont know its a Error at my Server or not?

Can some on Explain whats going wrong?

-- Detected 64-bit platform
-- UNIX: Using default configuration directory
-- UNIX: Using default library directory
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Detected compiler: /usr/bin/cc
-- Clang: All warnings enabled
-- cotire 1.7.10 loaded.
-- Using mysql-config: /usr/bin/mysql_config
-- Found MySQL library: /usr/lib/x86_64-linux-gnu/libmariadb.so
-- Found MySQL headers: /usr/include/mariadb
-- Found MySQL executable: /usr/bin/mysql
-- Found git binary : /usr/bin/git

* TrinityCore revision   : 7450be4cfd3f 2020-02-10 22:33:38 +0100 (3.3.5 branch)
* TrinityCore buildtype  : RelWithDebInfo

* Install core to        : /home/t2k/server
* Install libraries to   : /home/t2k/server/lib
* Install configs to     : /home/t2k/server/etc

* 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 all warnings      : Yes
* Use coreside debug     : No  (default)
* Show source tree       : Yes (hierarchical)
* Use GIT revision hash  : Yes (default)

-- Boost version: 1.67.0
-- Found the following Boost libraries:
--   system
--   filesystem
--   thread
--   program_options
--   iostreams
--   regex
-- Found OpenSSL library: /usr/lib/x86_64-linux-gnu/libssl.so;/usr/lib/x86_64-linux-gnu/libcrypto.so
-- Found OpenSSL headers: /usr/include
-- Found Readline library: /usr/lib/x86_64-linux-gnu/libreadline.so
-- Include dir is: /usr/include

* Script configuration (static):
    |
    +- worldserver
    |   +- Commands
    |   +- Custom
    |   +- EasternKingdoms
    |   +- Events
    |   +- Kalimdor
    |   +- Northrend
    |   +- OutdoorPvP
    |   +- Outland
    |   +- Pet
    |   +- Spells
    |   +- World
    |

-- Configuring done
-- Generating done
-- Build files have been written to: /home/t2k/TrinityCore/build
[  0%] Built target Detour
[  0%] Built target fmt
[  1%] Built target Recast
[  5%] Built target g3dlib
[  5%] Built target sfmt
[  6%] Built target argon2
[  6%] Built target gsoap
[  7%] Built target mpq
[ 10%] Built target jemalloc
[ 10%] Built target revision_data.h
[ 10%] Building CXX object src/common/CMakeFiles/common.dir/Common.cpp.o
[ 10%] Building CXX object src/common/CMakeFiles/common.dir/Collision/BoundingIntervalHierarchy.cpp.o
[ 10%] Building CXX object src/common/CMakeFiles/common.dir/GitRevision.cpp.o
[ 10%] Building CXX object src/common/CMakeFiles/common.dir/Banner.cpp.o
fatal error: C++17 was disabled in PCH file but is currently enabled
fatal error: 1 error generated.
C++17 was disabled in PCH file but is currently enabled
1 error generated.
make[2]: *** [src/common/CMakeFiles/common.dir/build.make:120: src/common/CMakeFiles/common.dir/Collision/BoundingIntervalHierarchy.cpp.o] Fehler 1
make[2]: *** Es wird auf noch nicht beendete Prozesse gewartet....
make[2]: *** [src/common/CMakeFiles/common.dir/build.make:106: src/common/CMakeFiles/common.dir/GitRevision.cpp.o] Fehler 1
fatal error: C++17 was disabled infatal error:  PCHC++17  filewas  butdisabled  isin  currently enabled
PCH file but is currently enabled
1 error generated.
1 error generated.
make[2]: *** [src/common/CMakeFiles/common.dir/build.make:78: src/common/CMakeFiles/common.dir/Banner.cpp.o] Fehler 1
make[2]: *** [src/common/CMakeFiles/common.dir/build.make:92: src/common/CMakeFiles/common.dir/Common.cpp.o] Fehler 1
make[1]: *** [CMakeFiles/Makefile2:1032: src/common/CMakeFiles/common.dir/all] Fehler 2
make: *** [Makefile:130: all] Fehler 2

 

Edited by t2k
Link to comment
Share on other sites

try to set cmake prefixes manually, as me:

cmake ../ \
 -DCMAKE_INSTALL_PREFIX="$SRVPATH/$EMU_VER" \
 -DCONF_DIR="$SRVPATH/$EMU_VER/etc" \
 -DLIBSDIR="$SRVPATH/$EMU_VER/libs" \
 -DMYSQL_EXECUTABLE="/usr/bin/mysql" \
 -DMYSQL_INCLUDE_DIR="/usr/include/mariadb" \
 -DMYSQL_LIBRARY="/usr/lib/x86_64-linux-gnu/libmariadbclient.so" \
 -DSCRIPTS=static \
 -DTOOLS=1 \
 -DWITH_WARNINGS=0 \
&> $LOG_FILE \
&& make -j $CPU
&>> $LOG_FILE

It also seems that you have lost ZLIB1g-DEV

 

 

Link to comment
Share on other sites

  • 3 weeks later...

Im tring to use cmake and I keep encountering this error after resting up al the programs to do the core installation. ive been trying to find solutions online and im completely lost. as a note im trying to set up 3.3.5

 

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/Wow server/build/CMakeFiles/CMakeTmp

Run Build Command(s):C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe cmTC_bcfc6.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=15.0 /v:m && Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27035 for x86
  Copyright (C) Microsoft Corporation.  All rights reserved.
 
  cl /c /Zi /W1 /WX- /diagnostics:classic /Od /Ob0 /Oy- /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /D _MBCS /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_bcfc6.dir\Debug\\" /Fd"cmTC_bcfc6.dir\Debug\vc141.pdb" /Gd /TC /analyze- /errorReport:queue "C:\Wow server\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c"
  CheckIncludeFile.c
 
C:\Wow server\build\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Wow server\build\CMakeFiles\CMakeTmp\cmTC_bcfc6.vcxproj]

 

full log: https://pastebin.com/hWCwwnsT

 

discord: kylezzz101#3942

Edited by Kylezzz101
Link to comment
Share on other sites

  • 2 months later...

Hello,

I just compiled and build for the first time my server and I get this error:

Used MySQL library version (5.7.30 id 50730) does not match the version id used to compile TrinityCore (id 50724). Search on forum for .

MySQL 5.7.30 is the only one I have installed and I have no idea whats wrong. Also, the error does not give me any tip which version of MySQL I have to use. I have libmysql.dll on my server.

 

Thanks in advance.

Link to comment
Share on other sites

Hello guys, 

I have an issue with recompiling my old TC core (2015) on Windows 10, like in the attached screenshot.

Steps I took:

1. Install Git Extensions (2.27.0) 64-bit

2. Install Visual Studio 2019

3. Install Win64 OpenSSL v1.0.2u to the /bin directory

4. Install and add to Windows path boost_1_73_0-msvc-14.2-64.exe

5. Install CMake-3.17.3-win64-x64.msi

6. Install and configure MySQL

7. Pulled the Core Source to a folder

8. Created a Build folder

9. Run CMake and got the error.

 

I've tried changing the compiler to Visual Studio 2013 - same error

I've tried changing CMake to v2.8.12.2 - same error

I've tried changing Win64 OpenSSL v1.1.1g 64bit/32/bit - same error

 

This is driving me crazy... :(

Any help would be greatly appreciated.

 

Thanks a lot!

error.jpg

Link to comment
Share on other sites

  • 4 months later...

Hello guys, 

I have an issue with recompiling Trinitycore 3.3.5 on Server 2019 with Bots, like in the attached.

Steps I took:

1. Install Git-2.28.0-64-bit

2. Install Visual Studio 2019

3. Install Win64OpenSSL-1_1_1h to the /bin directory

4. Install and add to Windows path boost_1_72_0-msvc-14.2-64.exe

5. Install cmake-3.18.4-win32-x86.msi

6. Install and configure MySQL

7. Pulled the Core Source to a folder

8. Pulled the bots Source to the same folder ( https://github.com/trickerer/Trinity-Bots )

9. Run bot Patch  -> patch -p1 < NPCBots.patch (no Error)

8. Created a Build folder

9. Run CMake (no error)

10. Run Visual Studio 2019 get errors see attach.

If i compile without bots it works fine.

Please Help!

VisualStudio_2019_error.txt

Link to comment
Share on other sites

  • 2 months later...
  • 1 year later...

You need to drag and copy the lib folder that its present in the C:\Program Files\MySQL\MySQL Server 5.XXX  ,   to the core folder and then try to open the bnet and world server again.

Edited by rezhak
misstype
Link to comment
Share on other sites

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

I'm getting this error on a `make` attempt:

 

[ 16%] Building CXX object src/server/database/CMakeFiles/database.dir/Database/MySQLConnection.cpp.o
/home/wotlkserver/TrinityCore/src/server/database/Database/MySQLConnection.cpp: In member function ‘virtual uint32 MySQLConnection::Open()’:
/home/wotlkserver/TrinityCore/src/server/database/Database/MySQLConnection.cpp:148:34: error: ‘MYSQL_OPT_SSL_ENFORCE’ was not declared in this scope
         mysql_options(mysqlInit, MYSQL_OPT_SSL_ENFORCE, (char const*)&opt_use_ssl);
                                  ^~~~~~~~~~~~~~~~~~~~~
/home/wotlkserver/TrinityCore/src/server/database/Database/MySQLConnection.cpp:148:34: note: suggested alternative: ‘MYSQL_OPT_LOCAL_INFILE’
         mysql_options(mysqlInit, MYSQL_OPT_SSL_ENFORCE, (char const*)&opt_use_ssl);
                                  ^~~~~~~~~~~~~~~~~~~~~
                                  MYSQL_OPT_LOCAL_INFILE
make[2]: *** [src/server/database/CMakeFiles/database.dir/Database/MySQLConnection.cpp.o] Error 1
make[1]: *** [src/server/database/CMakeFiles/database.dir/all] Error 2
make: *** [all] Error 2
 

 

Here's the output of the cmake, it it helps:

[wotlkserver@barleycorn build]$ cmake ../ -DCMAKE_INSTALL_PREFIX=/home/wotlkserver/trinitycore
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- Check for working C compiler: /opt/rh/devtoolset-8/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-8/root/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: /opt/rh/devtoolset-8/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-8/root/usr/bin/c++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected 64-bit platform
-- UNIX: Using default configuration directory
-- UNIX: Configuring uninstall target
-- UNIX: Created uninstall target
-- UNIX: Using default system linker
-- UNIX: Detected compiler: /opt/rh/devtoolset-8/root/usr/bin/cc
-- GCC: Minimum version required is 8.3.0, found 8.3.1 - ok!
-- GCC: SFMT enabled, SSE2 flags forced
-- Using mysql-config: /bin/mysql_config
-- Found MySQL library: /usr/lib64/mysql/libmysqlclient.so
-- Found MySQL headers: /usr/include/mysql
-- Found MySQL executable: /bin/mysql
-- Found Git: /bin/git (found suitable version "1.8.3.1", minimum required is "1.7")

* TrinityCore revision   : b0bba61460ec+ 2022-04-11 21:07:25 +0300 (3.3.5 branch)
* TrinityCore buildtype  : RelWithDebInfo

* Install core to        : /home/wotlkserver/trinitycore
* Install configs to     : /home/wotlkserver/trinitycore/etc

* Build world/auth       : Yes (default)
* Build with scripts     : Yes (static)
* Build map/vmap tools   : Yes (default)
* Build unit tests       : No (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)

-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found Boost: /usr/local/lib/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.71") found components: system filesystem program_options iostreams regex
-- Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM
-- Performing Test boost_filesystem_copy_links_without_NO_SCOPED_ENUM - Success
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7")
-- Looking for strtod_l
-- Looking for strtod_l - not found
-- Found OpenSSL: /usr/lib64/libcrypto.so (found version "1.0.2k") found components: Crypto SSL
-- Found OpenSSL library: /usr/lib64/libssl.so;/usr/lib64/libcrypto.so
-- Found OpenSSL headers: /usr/include
-- Looking for MADV_FREE
-- Looking for MADV_FREE - not found
-- Found Readline: /usr/lib64/libreadline.so (found version "6.2")
-- Found Readline library: /usr/lib64/libreadline.so
-- Found Readline headers: /usr/include
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found

* Script configuration (static):
    |
    +- worldserver
    |   +- Battlefield
    |   +- Commands
    |   +- Custom
    |   +- EasternKingdoms
    |   +- Events
    |   +- Kalimdor
    |   +- Northrend
    |   +- OutdoorPvP
    |   +- Outland
    |   +- Pet
    |   +- Spells
    |   +- World
    |

-- Configuring done
-- Generating done
-- Build files have been written to: /home/wotlkserver/TrinityCore/build
 

 

Any help is greatly appreciated.

 

 

Link to comment
Share on other sites

  • 7 months later...

pthread.h - not found

 

Determining if the include file pthread.h exists failed with the following output:
Change Dir: C:/Users/Caktoos.ir/Desktop/server lich/CMakeFiles/CMakeTmp

Run Build Command(s):f:/Program Files/Microsoft Visual Studio/2019/Enterprise/MSBuild/Current/Bin/MSBuild.exe cmTC_ca7e6.vcxproj /p:Configuration=Debug /p:Platform=Win32 /p:VisualStudioVersion=16.0 /v:m && Microsoft (R) Build Engine version 16.11.2+f32259642 for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30147 for x86
  Copyright (C) Microsoft Corporation.  All rights reserved.
  CheckIncludeFile.c
  cl /c /Zi /W1 /WX- /diagnostics:column /Od /Ob0 /Oy- /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_ca7e6.dir\Debug\\" /Fd"cmTC_ca7e6.dir\Debug\vc142.pdb" /external:W1 /Gd /TC /analyze- /errorReport:queue "C:\Users\Caktoos.ir\Desktop\server lich\CMakeFiles\CMakeTmp\CheckIncludeFile.c"
C:\Users\Caktoos.ir\Desktop\server lich\CMakeFiles\CMakeTmp\CheckIncludeFile.c(1,10): fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory [C:\Users\Caktoos.ir\Desktop\server lich\CMakeFiles\CMakeTmp\cmTC_ca7e6.vcxproj]

 

plz help me to fix this !

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.


×
×
  • Create New...