Jump to content
TrinityCore

[SOLVED]Compile error


UareBugged
 Share

Recommended Posts

--- Canned message start ---

If this is your 1st time with TrinityCore read http://collab.kpsn.org/display/tc/TrinityCore+Home

Also read http://www.trinitycore.org/f/topic/1518-trouble-with-your-trinity-install-readme-1st-faqs/

         and http://www.trinitycore.org/f/topic/10656-updating-or-starting-with-trinitycore-issues/

Since those threads are big, use control+f to find your keyword on them, also try different keywords.

Also please Look in upper right hand corner of the forum, there is a button labeled search field, feel free to search for your issues first before posting, most questions like this one have already been answered.

If you still cannot find the answers you seek feel free to make a post and tell us the steps you took to resolve this issue and we will do our best to help you.

--- Canned message end ---

Link to comment
Share on other sites

hi,

Ive tried to Compile with VS2013 on Windows 10 x64

* TrinityCore revision : ce0ce25a666f 2016-04-20 12:59:57 +0200 (6.x branch)

 

 

char const* GitRevision::GetFullVersion()
{
#if PLATFORM == PLATFORM_WINDOWS
# ifdef _WIN64
    return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Win64, " _BUILD_DIRECTIVE ")";
# else
    return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Win32, " _BUILD_DIRECTIVE ")";
# endif
#else
    return _PACKAGENAME " rev. " VER_PRODUCTVERSION_STR " (Unix, " _BUILD_DIRECTIVE ")";
#endif

 

Fehler    27    error C2146: Syntaxfehler: Fehlendes ';' vor Bezeichner '_BUILD_DIRECTIVE'    E:\src\common\GitRevision.cpp    57    1    common
Fehler    28    error C2065: '_BUILD_DIRECTIVE': nichtdeklarierter Bezeichner    E:\src\common\GitRevision.cpp    57    1    common
Fehler    29    error C2143: Syntaxfehler: Es fehlt ';' vor 'Zeichenfolge'    E:\src\common\GitRevision.cpp    57    1    common

 

how to fix it :-)

Link to comment
Share on other sites

Having issues with latest ( b82ffb8  at the time of writing).

My compile script can be found here, starting on line 57 and ending on line 68 for the purposes of relevance.

I looked at #14657, which seemed to be someone with the same issue, but no love there. I'm not running Arch.

CentOS 7.2 x64, cmake3 version 3.5.1 (I also have cmake 2.8.11 installed, but I'm explicitly referencing cmake3 in my build script), gcc 4.8.5. I successfully built the server on March 15th and this is the first time I've tried since (my last successful build was 632e667). SELinux is set to permissive.

When running make, I get the following error:

[  5%] Building C object dep/jemalloc/CMakeFiles/jemalloc.dir/src/arena.c.o

In file included from /home/XXXXX/TrinityCore/dep/jemalloc/include/jemalloc/internal/jemalloc_internal.h:568:0, 

     from /home/XXXXX/TrinityCore/dep/jemalloc/src/arena.c:2:/home/XXXXX/TrinityCore/dep/jemalloc/include/jemalloc/internal/util.h:88:49: error: expected ';', ',', or ')' before 'nptr'

 uintmax_t malloc_strtoumax(const char *restrict nptr,

 

make[2]: *** [dep/jemalloc/CMakeFiles/jemalloc.dir/src/arena.c.o] Error 1

make[1]: *** [dep/jemalloc/CMakeFiles/jemalloc.dir/all] Error 2

make: *** [all] Error 2

Edited by velinath
7.2, not 7.1 - tried after updating.
Link to comment
Share on other sites

Nothing changed the way Jemalloc is used recently.

I don't really have a fix for your issue but you can try one of these:

  • Make sure that the build directory has been cleaned up before compiling again
  • Disable Jemaloc by using -DNOJEM=1
  • Change from GCC to Clang (it's also generally faster compiliing)
  • Upvote 1
Link to comment
Share on other sites

Clearing out the build directory seems to have done it. There was stuff in there from as far back as June of 2015, so immediate assumption is that it had something to do with old stuff that needed to get rebuilt, or something that cmake 2 left behind. I'll add a full clear of the build directory, not just clearing the one file, to the build script.

Thanks very much for the help on this one. I was banging my head against it for hours and didn't think to try the basic "clear out the old stuff" step.  Really appreciated.

I don't have a wiki account, but the RHEL docs could be updated - in the interest of ease of use - to:

yum install epel-release -y && yum install cmake3

rather than what's there. Plus, that way, no need to build cmake 3 from source.

As a side note - and now is when I'm starting to stray from original scope - but as someone who has zero experience with clang as a compiler, is it worth making the switch?

Link to comment
Share on other sites

Clang is supposed to be a drop in replacement for GCC. Simply install it, change CC and CXX (or equivalent of update-alternatives on CentOS) and you are good to go. Clang is most of times faster than GCC and it shows some better warnings. However GCC 6.1 was released recently and it looks good.

Give it a try, you can always go back with a command.

 

Ref the wiki, anyone can make edits, thanks!

Link to comment
Share on other sites

Cool. I'll hop in and mess around with the CentOS/RHEL install instructions in the wiki then. I've got a dev Fedora box that I'll stick Clang on and give it a shot. Appreciate the advice and help!

edit: After testing on my Fedora box, all that needs to happen is:

yum remove gcc gcc-c++ && yum install clang

and clang will just start working, with no further changes. It's also way faster. Thanks again for the advice.

Edited by velinath
Link to comment
Share on other sites

  • 1 month later...

Greetings community, as I'm trying to generate the code for the 6.xx core on cmake I find that If I use Boost 1.55 the code generation is completed with no issues, however, when I try to compile the core, I get several errors, then I found out that I have to use a newer version of Boost to get rid of them. Problem is, when I switch to a newer version of boost (tried versions 1.59 and newest 1.61), cmake does not recognize them leading to the errors shown in this picture.

What I do to switch between versions is go into Control Panel -> System and Security -> System -> Advanced System Configuration -> Environment Variables and set the path there.

So how can I solve this? thanks!

compile.jpg

Link to comment
Share on other sites

12 hours ago, Nay said:

Do you have Boost 1.61 compiled for VS 2013 64 bits? https://sourceforge.net/projects/boost/files/boost-binaries/1.61.0/ boost_1_61_0-msvc-12.0-64.exe

Do you have a BOOST_ROOT env var set to Boost dir? e.g C:/boost_1_61_0 (no slash at the end)

Thanks Nay, you helped realize that I had installed  boost_1_61_0-msvc-14.0-64.exe instead of  boost_1_61_0-msvc-12.0-64.exe and that worked.

Link to comment
Share on other sites

  • 9 months later...
Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By PavelFreeman
      Hello, I want to compile Trinity, but I get this errors...

      Did everything according to the documentation (https://trinitycore.atlassian.net/wiki/spaces/tc/pages/2130077/Installation+Guide) for Windows 10.

      Visual Studio 2019.
    • By aicam
      Hello everyone,
       
      I searched through all threads that may help but I could not find any related answer. So I hope this question is not duplicate.
      I have developed simple options like custom commands for GM. These developments are straightforward so I could add my preferred command with less than four times compilation.
      On the other hand, I want to develop a custom arena join system which work with different structures including: GroupQueueInfo, PlayerQueueInfo (BattlegroundQueue.h). In addition, I need to use other functions like ObjectAccessor::FindPlayerByName. In this regard, I am working with many parts of the source so it is very natural to face many and many bugs and errors. If I want to develop in the way that each time I need to compile the source from scratch, it may takes decades for me to finish the development.
      Therefore, I was looking for a solution to minimize compilation as much as is possible. I created custom CMakeLists to include required files separately, however, it seems the source is compiled with custom options so it failed.
      I appreciate it if someone could guide me to develop a custom code with minimum compilation or at least options that help to recompile only changed file not all of the source. 
    • By Cantte
      Well ... today I was about to compile the trinity core version for WoW 4.3.4 of this repository "https://gitlab.com/trinitycore/TrinityCore_434". Download them and when you use the cmake, I generate the solution correctly. When I began to compile this went well until I got to the last step, when I was 90% practically.
      This was the error:
      Main.obj: error LNK2019: external symbol SSLeay_version unresolved referred to in the function "public: void __cdecl <lambda_4a2d53ce610f18dba0b4b4d6532c13a7> :: operator () (void) const" (?? R <lambda_4a2d53ce610f18dba0b4b4d6532c13a7> @@ QEBAXXZ)
      25> scripts.lib (cs_server.obj): error LNK2001: external symbol SSLeay_version unresolved
      25> gsoap.lib (stdsoap2.obj): error LNK2019: unresolved sk_num external symbol referenced in the tcp_connect function
      25> gsoap.lib (stdsoap2.obj): error LNK2019: unresolved sk_value external symbol referenced in the tcp_connect function
      25> gsoap.lib (stdsoap2.obj): error LNK2019: unresolved sk_pop_free external symbol referenced in the tcp_connect function
      25> gsoap.lib (stdsoap2.obj): error LNK2019: outer symbol OPENSSL_add_all_algorithms_noconf unresolved referenced in the soap_ssl_init function
      25> gsoap.lib (stdsoap2.obj): error LNK2019: external symbol SSL_load_error_strings unresolved referenced in the soap_ssl_init function
      25> gsoap.lib (stdsoap2.obj): error LNK2019: unresolved external SSLv23_method symbol referenced in the ssl_auth_init function
      25> gsoap.lib (stdsoap2.obj): error LNK2019: external symbol SSL_library_init unresolved referenced in the soap_ssl_init function
      25> gsoap.lib (stdsoap2.obj): error LNK2019: external symbol SSL_state unresolved referenced in the tcp_connect function
      25> common.lib (OpenSSLCrypto.obj): error LNK2019: external symbol CRYPTO_num_locks unresolved referred to in the function "void __cdecl OpenSSLCrypto :: threadsCleanup (void)" (? ThreadsCleanup @ OpenSSLCrypto @@ YAXXZ)
      25> common.lib (OpenSSLCrypto.obj): error LNK2019: external symbol CRYPTO_set_locking_callback unresolved referred to in the function "void __cdecl OpenSSLCrypto :: threadsCleanup (void)" (? ThreadsCleanup @ OpenSSLCrypto @@ YAXXZ)
      25> common.lib (OpenSSLCrypto.obj): error LNK2019: external symbol CRYPTO_THREADID_set_numeric unresolved referred to in the function "void __cdecl threadIdCallback (struct crypto_threadid_st *)" (? ThreadIdCallback @@ YAXPEAUcrypto_threadid_st @@@ Z)
      25> common.lib (OpenSSLCrypto.obj): error LNK2019: external symbol CRYPTO_THREADID_set_callback unresolved referenced in the function "void __cdecl OpenSSLCrypto :: threadsCleanup (void)" (? ThreadsCleanup @ OpenSSLCrypto @@ YAXXZ)
      25> common.lib (ARC4.obj): error LNK2019: external symbol EVP_CIPHER_CTX_init unresolved referred to in the function "public: __cdecl ARC4 :: ARC4 (unsigned int)" (?? 0ARC4 @@ QEAA @ I @ Z)
      25> common.lib (HmacHash.obj): error LNK2019: unresolved HMAC_CTX_init external symbol referenced in the "struct hmac_ctx_st * __cdecl HMAC_CTX_new (void)" function (? HMAC_CTX_new @@ YAPEAUhmac_ctx_st @@ XZ)
      25> common.lib (HmacHash.obj): error LNK2019: unresolved HMAC_CTX_cleanup external symbol referenced in the "void __cdecl HMAC_CTX_free (struct hmac_ctx_st *)" function (? HMAC_CTX_free @@ YAXPEAUhmac_ctx_st @@@ Z)
      25> E: \ Server-Wow \ TrinityCore_434-4.3.4 \ Build \ bin \ RelWithDebInfo \ worldserver.exe: fatal error LNK1120: 16 external unresolved
      25> Compilation of the "worldserver.vcxproj" project completed - ERROR.
      26> ------ Compile operation started: project: ALL_BUILD, configuration: RelWithDebInfo x64 ------
      26> Building Custom Rule E: /Server-Wow/TrinityCore_434-4.3.4/CMakeLists.txt
      26> CMake does not need to re-run because E: /Server-Wow/TrinityCore_434-4.3.4/Build/CMakeFiles/generate.stamp is up-to-date.
      ========== Compile: 23 correct, 3 incorrect, 0 updated, 0 omitted ==========
       
      And this is the original error in Spanish (since I use the compiler in Spanish)
       
      Main.obj : error LNK2019: símbolo externo SSLeay_version sin resolver al que se hace referencia en la función "public: void __cdecl <lambda_4a2d53ce610f18dba0b4b4d6532c13a7>::operator()(void)const " (??R<lambda_4a2d53ce610f18dba0b4b4d6532c13a7>@@QEBAXXZ)
      25>scripts.lib(cs_server.obj) : error LNK2001: símbolo externo SSLeay_version sin resolver
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo sk_num sin resolver al que se hace referencia en la función tcp_connect
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo sk_value sin resolver al que se hace referencia en la función tcp_connect
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo sk_pop_free sin resolver al que se hace referencia en la función tcp_connect
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo OPENSSL_add_all_algorithms_noconf sin resolver al que se hace referencia en la función soap_ssl_init
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo SSL_load_error_strings sin resolver al que se hace referencia en la función soap_ssl_init
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo SSLv23_method sin resolver al que se hace referencia en la función ssl_auth_init
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo SSL_library_init sin resolver al que se hace referencia en la función soap_ssl_init
      25>gsoap.lib(stdsoap2.obj) : error LNK2019: símbolo externo SSL_state sin resolver al que se hace referencia en la función tcp_connect
      25>common.lib(OpenSSLCrypto.obj) : error LNK2019: símbolo externo CRYPTO_num_locks sin resolver al que se hace referencia en la función "void __cdecl OpenSSLCrypto::threadsCleanup(void)" (?threadsCleanup@OpenSSLCrypto@@YAXXZ)
      25>common.lib(OpenSSLCrypto.obj) : error LNK2019: símbolo externo CRYPTO_set_locking_callback sin resolver al que se hace referencia en la función "void __cdecl OpenSSLCrypto::threadsCleanup(void)" (?threadsCleanup@OpenSSLCrypto@@YAXXZ)
      25>common.lib(OpenSSLCrypto.obj) : error LNK2019: símbolo externo CRYPTO_THREADID_set_numeric sin resolver al que se hace referencia en la función "void __cdecl threadIdCallback(struct crypto_threadid_st *)" (?threadIdCallback@@YAXPEAUcrypto_threadid_st@@@Z)
      25>common.lib(OpenSSLCrypto.obj) : error LNK2019: símbolo externo CRYPTO_THREADID_set_callback sin resolver al que se hace referencia en la función "void __cdecl OpenSSLCrypto::threadsCleanup(void)" (?threadsCleanup@OpenSSLCrypto@@YAXXZ)
      25>common.lib(ARC4.obj) : error LNK2019: símbolo externo EVP_CIPHER_CTX_init sin resolver al que se hace referencia en la función "public: __cdecl ARC4::ARC4(unsigned int)" (??0ARC4@@QEAA@I@Z)
      25>common.lib(HmacHash.obj) : error LNK2019: símbolo externo HMAC_CTX_init sin resolver al que se hace referencia en la función "struct hmac_ctx_st * __cdecl HMAC_CTX_new(void)" (?HMAC_CTX_new@@YAPEAUhmac_ctx_st@@XZ)
      25>common.lib(HmacHash.obj) : error LNK2019: símbolo externo HMAC_CTX_cleanup sin resolver al que se hace referencia en la función "void __cdecl HMAC_CTX_free(struct hmac_ctx_st *)" (?HMAC_CTX_free@@YAXPEAUhmac_ctx_st@@@Z)
      25>E:\Server-Wow\TrinityCore_434-4.3.4\Build\bin\RelWithDebInfo\worldserver.exe : fatal error LNK1120: 16 externos sin resolver
      25>Compilación del proyecto "worldserver.vcxproj" terminada -- ERROR.
      26>------ Operación Compilar iniciada: proyecto: ALL_BUILD, configuración: RelWithDebInfo x64 ------
      26>Building Custom Rule E:/Server-Wow/TrinityCore_434-4.3.4/CMakeLists.txt
      26>CMake does not need to re-run because E:/Server-Wow/TrinityCore_434-4.3.4/Build/CMakeFiles/generate.stamp is up-to-date.
      ========== Compilar: 23 correctos, 3 incorrectos, 0 actualizados, 0 omitidos ==========
       
       
      Thanks.
    • By blackmetalz
      Hi guys, I'm going to buy new hardware for reducing compile time in Trinity core. I have heard about Ryzen, it had more core and threads but haven't tested its performance. I just want to ask anyone have Ryzen CPU can share compile time?
       
    • By zsemi02
      hi. i want to compile the core in Microsoft Visual Studio 2013, but i get rhis error:

      Warning    1    warning C4805: '==' : unsafe mix of type 'bool' and type 'uint16' in operation    C:\test\source\source\src\server\game\Entities\Unit\Unit.cpp    15688    1    game Error    2    error C2903: 'result' : symbol is neither a class template nor a function template (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    3    error C2039: 'result' : is not a member of 'TaxiPathGraph::GetCompleteNodeRoute::<lambda_b66f1e4d2625bde789c6e1f8e8bffd24>' (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    4    error C2504: 'result' : base class undefined (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    5    error C2143: syntax error : missing ',' before '<' (C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp)    C:\local\boost_1_55_0\boost\utility\result_of.hpp    186    1    game Error    6    error C2783: 'boost::transform_value_property_map<Func,PM,Ret> boost::make_transform_value_property_map(const Func &,const PM &)' : could not deduce template argument for 'Ret'    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    7    error C2893: Failed to specialize function template 'boost::transform_value_property_map<Func,PM,boost::result_of<const Func(property_traits<PA>::reference)>::type> boost::make_transform_value_property_map(const Func &,const PM &)'    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    8    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,const boost::bgl_named_params<T,Tag,Base> &)' : expects 3 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    9    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor)' : expects 11 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    10    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,SourceInputIter,SourceInputIter,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor)' : expects 12 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    11    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,ColorMap)' : expects 12 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    12    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,SourceInputIter,SourceInputIter,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,ColorMap)' : expects 13 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    13    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,graph_traits<G>::vertex_descriptor,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,const boost::bgl_named_params<T,Tag,Base> &,enable_if_c<(boost::is_base_and_derived<boost::vertex_list_graph_tag,boost::graph_traits<G>::traversal_category>::value,boost::graph::detail::no_parameter>::type)' : expects 13 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    14    error C2780: 'void boost::dijkstra_shortest_paths(const VertexListGraph &,SourceInputIter,SourceInputIter,PredecessorMap,DistanceMap,WeightMap,IndexMap,Compare,Combine,DistInf,DistZero,DijkstraVisitor,const boost::bgl_named_params<T,Tag,Base> &,enable_if_c<(boost::is_base_and_derived<boost::vertex_list_graph_tag,boost::graph_traits<G>::traversal_category>::value,boost::graph::detail::no_parameter>::type)' : expects 14 arguments - 2 provided    C:\test\source\source\src\server\game\Entities\Taxi\TaxiPathGraph.cpp    156    1    game Error    15    error LNK1181: cannot open input file '..\game\Release\game.lib'    C:\test\build\src\server\worldserver\LINK    worldserver  
      error.txt
×
×
  • Create New...