Jump to content
TrinityCore

Compile or cmake problems


Joy
 Share

Recommended Posts

5 hours ago, masterking32 said:

They, just increase, requirement software's, without test!.

So clone from old commits. ( I have TrinityCore revision   : 3ba518f5a996+ 2017-11-14 20:41:01 +0330 (3.3.5 branch) )

-- The C compiler identification is GNU 5.4.1

-- The CXX compiler identification is GNU 5.4.1

-- Boost version: 1.65.1 - Work with 1.58 too

- Ubuntu 16.04

[ 99%] Building CXX object src/server/scripts/CMakeFiles/scripts.dir/World/world_script_loader.cpp.o
[ 99%] Linking CXX static library libscripts.a
[ 99%] Built target scripts
Scanning dependencies of target worldserver
[ 99%] Building CXX object src/server/worldserver/CMakeFiles/worldserver.dir/RemoteAccess/RASession.cpp.o
[ 99%] Building CXX object src/server/worldserver/CMakeFiles/worldserver.dir/Main.cpp.o
[ 99%] Building CXX object src/server/worldserver/CMakeFiles/worldserver.dir/CommandLine/CliRunnable.cpp.o
[ 99%] Building CXX object src/server/worldserver/CMakeFiles/worldserver.dir/TCSoap/TCSoap.cpp.o
[100%] Linking CXX executable worldserver
[100%] Built target worldserver

Done. :)

I have compiled TC on Debian 9 using both gcc 6.3.0 and Clang 6.0 for months.

Link to comment
Share on other sites

  • Replies 2.9k
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

11 hours ago, polszki said:

After clean install, i followed this instructions on:

ubuntu 17.10: (from default repository)
--cmake 3.9.1
--gcc 7.2.0
--clang 4.0.1-6
--boost 1.62.0.1

master and 3.3.5 branch: success...
cmake ../ -DCMAKE_INSTALL_PREFIX=/home/<username>/server
cmake ../ -DCMAKE_INSTALL_PREFIX=/home/$USER/server -DTOOLS=1 -DWITH_WARNINGS=1

on ubuntu 16.04: (from default repository)
--cmake 3.5.1
--gcc 5.4.0
--clang 3.8.0
--boost 1.58

master: not tested, 3.3.5: failed
cmake ../ -DCMAKE_INSTALL_PREFIX=/home/<username>/server

[ 97%] Linking CXX executable worldserver
../game/libgame.a(DBCStores.cpp.o): In function `boost::cpp_regex_traits<wchar_t>::transform[abi:cxx11](wchar_t const*, wchar_t const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:961: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<wchar_t>::transform[abi:cxx11](wchar_t const*, wchar_t const*) const'
../game/libgame.a(DBCStores.cpp.o): In function `boost::cpp_regex_traits<wchar_t>::transform_primary[abi:cxx11](wchar_t const*, wchar_t const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:965: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<wchar_t>::transform_primary[abi:cxx11](wchar_t const*, wchar_t const*) const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/server/worldserver/CMakeFiles/worldserver.dir/build.make:211: recipe for target 'src/server/worldserver/worldserver' failed
make[2]: *** [src/server/worldserver/worldserver] Error 1
CMakeFiles/Makefile2:1564: recipe for target 'src/server/worldserver/CMakeFiles/worldserver.dir/all' failed
make[1]: *** [src/server/worldserver/CMakeFiles/worldserver.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2e ../ -DCMAKETALL_PREFIX=/home/<username>/server

Because this like this we put LTS under "not recommended" status.

Link to comment
Share on other sites

On 12/24/2017 at 2:23 PM, Aokromes said:

I have compiled TC on Debian 9 using both gcc 6.3.0 and Clang 6.0 for months.

So what should we do to compile on ubuntu 16.04 amd64 ?

Im using clang 3.8.0 and boost 1.58, but I have the same error as above:

On 12/24/2017 at 3:08 AM, polszki said:

[ 97%] Linking CXX executable worldserver

../game/libgame.a(DBCStores.cpp.o): In function `boost::cpp_regex_traits<wchar_t>::transform[abi:cxx11](wchar_t const*, wchar_t const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:961: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<wchar_t>::transform[abi:cxx11](wchar_t const*, wchar_t const*) const'
../game/libgame.a(DBCStores.cpp.o): In function `boost::cpp_regex_traits<wchar_t>::transform_primary[abi:cxx11](wchar_t const*, wchar_t const*) const':
/usr/include/boost/regex/v4/cpp_regex_traits.hpp:965: undefined reference to `boost::re_detail::cpp_regex_traits_implementation<wchar_t>::transform_primary[abi:cxx11](wchar_t const*, wchar_t const*) const'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/server/worldserver/CMakeFiles/worldserver.dir/build.make:211: recipe for target 'src/server/worldserver/worldserver' failed
make[2]: *** [src/server/worldserver/worldserver] Error 1
CMakeFiles/Makefile2:1564: recipe for target 'src/server/worldserver/CMakeFiles/worldserver.dir/all' failed
make[1]: *** [src/server/worldserver/CMakeFiles/worldserver.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2e ../ -DCMAKETALL_PREFIX=/home/<username>/server

 I'm new to Linux so maybe should I start with another distribution? Like Debian, so I'll have no problems at compilation ?

Link to comment
Share on other sites

30 minutes ago, Aokromes said:

go debian 9 instead messing things.

Saw that you modified "Not recommanded: Ubnutu older than 16.04"

So 17.10 should work? I find it easier just to update my OS than to replace it. Also just got familiarized with ubuntu... Looking forward for your answer.

Link to comment
Share on other sites

 

23 minutes ago, Undyne said:

Saw that you modified "Not recommanded: Ubnutu older than 16.04"

So 17.10 should work? I find it easier just to update my OS than to replace it. Also just got familiarized with ubuntu... Looking forward for your answer.

I just rebuilt my compile server on Debian 9 and it works well. Using the standard installed packages in the wiki, you won't need to modify your build script at all.

Aokromes: Very much appreciate the update to the wiki page, that helps to clarify.

  • Upvote 1
Link to comment
Share on other sites

40 minutes ago, velinath said:

 

I just rebuilt my compile server on Debian 9 and it works well. Using the standard installed packages in the wiki, you won't need to modify your build script at all.

Aokromes: Very much appreciate the update to the wiki page, that helps to clarify.

It's faster than being messing with packages and dependences that may break server XD

Link to comment
Share on other sites

On 2017. 12. 26. at 7:51 PM, Undyne said:

Látta, hogy módosította "Nem ajánlott: Ubnutu idősebb, mint 16.04"

Szóval 17.10 működnie kell? Könnyebbnek találom az operációs rendszert frissíteni, mint kicserélni. Ismét megismerkedtem az ubuntu-val ... Várjuk a választ.

Yes, it's perfectly work on ubuntu 17.10.

Link to comment
Share on other sites

On 12/26/2017 at 9:58 PM, Aokromes said:

It's faster than being messing with packages and dependences that may break server XD

Thx, compiled it. But what about the client. Where can I download 3.3.5a (12340). I searched quite a lot and found some working download links for 3.3.5a but I'm not sure if they will work properly since I haven't seen a patch number (like 12340). Could you provide me a link, I'll be very grateful !

 

Edit: Guess I found it.

https://drive.google.com/uc?export=download&confirm=RnM7&id=0B4dwW8TOxn5dckRENjlTa3Uxc2c

z4PajlZ.jpg

Edited by Undyne
Link to comment
Share on other sites

Hi I have some trouble compiling trinitycore 64 bits (i had no problem with an old version using msvc 14 (2015) but i want to have the last version of trinitycore)

Here is the error message : https://pastebin.com/Nm0HJsJ1

OS : windows 7 64 bits

The C compiler identification is MSVC 19.12.25831.0

The CXX compiler identification is MSVC 19.12.25831.0

MySQL version : 5.5

Boost version : 1.65.1

OpenSSL version : 1.0.2e (3 dec 2015)

Cmake version : 3.8.2

All my programs are in 64 bits

I followed the instructions step by step but i couldn't figure it out myself how to solve the problem... Thanks 

Edited by sun864
Link to comment
Share on other sites

1 hour ago, sun864 said:

Hi I have some trouble compiling trinitycore 64 bits (i had no problem with an old version using msvc 14 (2015) but i want to have the last version of trinitycore)

Here is the error message : https://pastebin.com/Nm0HJsJ1

OS : windows 7 64 bits

The C compiler identification is MSVC 19.12.25831.0

The CXX compiler identification is MSVC 19.12.25831.0

MySQL version : 5.5

Boost version : 1.65.1

OpenSSL version : 1.0.2e (3 dec 2015)

Cmake version : 3.8.2

All my programs are in 64 bits

I followed the instructions step by step but i couldn't figure it out myself how to solve the problem... Thanks 

I suggest you to delete build directory and re-run cmake.

Link to comment
Share on other sites

I have already done it like 5 times :D, it's not possible that the problem comes from my git right? I got an old version (I'm using TortoiseGit 2.1.0.0, git version 2.7.2.windows.1) but I guess it doesn't change anything. 

Edited by sun864
Link to comment
Share on other sites

3 hours ago, sun864 said:

I have already done it like 5 times :D, it's not possible that the problem comes from my git right? I got an old version (I'm using TortoiseGit 2.1.0.0, git version 2.7.2.windows.1) but I guess it doesn't change anything. 

Try cloning a fresh repository, i see references to no-longer existing files.

Link to comment
Share on other sites

This has probably been mentioned, but I was forced to upgrade to Debian 9. I do like the error messages giving more details and suggestions when compiling, but I am having serious linking issues with boost, zlib, etc. Here is my error:

 

[ 38%] Linking CXX executable authserver
CMakeFiles/authserver.dir/Main.cpp.o: In function `GetConsoleArguments(int, char**, boost::filesystem::path&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/opt/TrinityCore/src/server/authserver/Main.cpp:305: undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'
CMakeFiles/authserver.dir/Main.cpp.o: In function `basic_command_line_parser':
/usr/local/include/boost/program_options/detail/parsers.hpp:40: undefined reference to `boost::program_options::detail::cmdline::cmdline(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
CMakeFiles/authserver.dir/Main.cpp.o: In function `boost::program_options::typed_value<boost::filesystem::path, char>::name[abi:cxx11]() const':
/usr/local/include/boost/program_options/detail/value_semantic.hpp:18: undefined reference to `boost::program_options::arg[abi:cxx11]'
CMakeFiles/authserver.dir/Main.cpp.o: In function `void boost::program_options::validate<boost::filesystem::path, char>(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, boost::filesystem::path*, long)':
/usr/local/include/boost/program_options/detail/value_semantic.hpp:92: undefined reference to `boost::program_options::invalid_option_value::invalid_option_value(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/authserver.dir/Main.cpp.o: In function `validation_error':
/usr/local/include/boost/program_options/errors.hpp:373: undefined reference to `boost::program_options::validation_error::get_template[abi:cxx11](boost::program_options::validation_error::kind_t)'
/usr/local/include/boost/program_options/errors.hpp:373: undefined reference to `boost::program_options::error_with_option_name::error_with_option_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
/usr/local/include/boost/program_options/errors.hpp:373: undefined reference to `boost::program_options::validation_error::get_template[abi:cxx11](boost::program_options::validation_error::kind_t)'
/usr/local/include/boost/program_options/errors.hpp:373: undefined reference to `boost::program_options::error_with_option_name::error_with_option_name(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int)'
CMakeFiles/authserver.dir/Main.cpp.o: In function `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > boost::program_options::to_internal<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)':
/usr/local/include/boost/program_options/detail/convert.hpp:79: undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
CMakeFiles/authserver.dir/Main.cpp.o:(.rodata._ZTVN5boost15program_options11typed_valueINS_10filesystem4pathEcEE[_ZTVN5boost15program_options11typed_valueINS_10filesystem4pathEcEE]+0x40): undefined reference to `boost::program_options::value_semantic_codecvt_helper<char>::parse(boost::any&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool) const'
CMakeFiles/authserver.dir/Main.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options16validation_errorEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/authserver.dir/Main.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options16validation_errorEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/authserver.dir/Main.cpp.o:(.rodata._ZTVN5boost15program_options16validation_errorE[_ZTVN5boost15program_options16validation_errorE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/authserver.dir/Main.cpp.o:(.rodata._ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE[_ZTVN5boost16exception_detail10clone_implINS0_19error_info_injectorINS_15program_options20invalid_option_valueEEEEE]+0x38): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/authserver.dir/Main.cpp.o:(.rodata._ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE[_ZTVN5boost16exception_detail19error_info_injectorINS_15program_options20invalid_option_valueEEE]+0x30): undefined reference to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const'
CMakeFiles/authserver.dir/Main.cpp.o:(.rodata._ZTVN5boost15program_options20invalid_option_valueE[_ZTVN5boost15program_options20invalid_option_valueE]+0x30): more undefined references to `boost::program_options::error_with_option_name::substitute_placeholders(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' follow
../../common/libcommon.a(StartProcess.cpp.o): In function `operator()':
/opt/TrinityCore/src/common/Utilities/StartProcess.cpp:83: undefined reference to `boost::iostreams::file_descriptor_source::file_descriptor_source(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)'
/opt/TrinityCore/src/common/Utilities/StartProcess.cpp:83: undefined reference to `boost::iostreams::file_descriptor_source::file_descriptor_source(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::_Ios_Openmode)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/server/authserver/CMakeFiles/authserver.dir/build.make:207: recipe for target 'src/server/authserver/authserver' failed
make[2]: *** [src/server/authserver/authserver] Error 1
CMakeFiles/Makefile2:1291: recipe for target 'src/server/authserver/CMakeFiles/authserver.dir/all' failed
make[1]: *** [src/server/authserver/CMakeFiles/authserver.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

 

Seen so many similar errors mentioned, and no fixes. If I find a fix, I will post it.

Link to comment
Share on other sites

12 hours ago, Aokromes said:

Try cloning a fresh repository, i see references to no-longer existing files.

I deleted my folders build and trinitycore and restarted again from the beginning, still no problem with cmake and i got the exact same problem while compiling, am I not cloning it right? 

Here is my Cmake output if it can helps : https://pastebin.com/DKvSE5WU

gitTrinityCore.png

Link to comment
Share on other sites

On 1/6/2018 at 7:35 PM, LordPsyan said:

This has probably been mentioned, but I was forced to upgrade to Debian 9. I do like the error messages giving more details and suggestions when compiling, but I am having serious linking issues with boost, zlib, etc. Here is my error:

 

[ 38%] Linking CXX executable authserver
CMakeFiles/authserver.dir/Main.cpp.o: In function `GetConsoleArguments(int, char**, boost::filesystem::path&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/opt/TrinityCore/src/server/authserver/Main.cpp:305: undefined reference to `boost::program_options::options_description::options_description(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, unsigned int)'

...

Seen so many similar errors mentioned, and no fixes. If I find a fix, I will post it.

I said I would post my fix. It was not fun, nor quick...

 

I had to remove boost, and compile from source. here are the steps I took: (works for Debian and Ubuntu. Don't forget sudo in Ubuntu)

 

  1. apt-get remove libboost-all-dev --purge (I like to purge all files.)
  2. cd /opt (this is where I store my files. place them wherever you want)
  3. download boost source latest from sourceforge: SourceForge Boost files
  4. 7za boost-1_66_0.7z (or whatever version is latest)
  5. cd boost-1_66_0
  6. ./bootstrap.sh
  7. ./b2
  8. ./b2 install

 

This fixed my problem, and I could compile. I hope this helps. b2 takes forever to run. by default, is should install boost to /usr/local/include/boost

 

- LordPsyan

Link to comment
Share on other sites

1 hour ago, LordPsyan said:

I said I would post my fix. It was not fun, nor quick...

 

I had to remove boost, and compile from source. here are the steps I took: (works for Debian and Ubuntu. Don't forget sudo in Ubuntu)

 

  1. apt-get remove libboost-all-dev --purge (I like to purge all files.)
  2. cd /opt (this is where I store my files. place them wherever you want)
  3. download boost source latest from sourceforge: SourceForge Boost files
  4. 7za boost-1_66_0.7z (or whatever version is latest)
  5. cd boost-1_66_0
  6. ./bootstrap.sh
  7. ./b2
  8. ./b2 install

 

This fixed my problem, and I could compile. I hope this helps. b2 takes forever to run. by default, is should install boost to /usr/local/include/boost

 

- LordPsyan

works for me with default debian 9 boost ....

Link to comment
Share on other sites

  • 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...