Fork me on GitHub
Classic Compile issue on Linux w/GCC 6.1?
Post: #1
I've pulled the latest Classic cmangos from github, and I'm trying to get it to compile on Fedora 24. I believe I'm running into issues due to GCC 6.1, as that seems to be the only appreciable difference from the last time I compiled it. I'd appreciate any help/guidance:

Code:
$ make
[ 0%] Building CXX object CMakeFiles/genrev.dir/src/tools/genrevision/genrevision.cpp.o
[ 0%] Linking CXX executable genrev
[ 0%] Built target genrev
[ 0%] Built target revision.h
[ 0%] Creating directories for 'TBB_Project'
[ 0%] No download step for 'TBB_Project'
[ 0%] No patch step for 'TBB_Project'
[ 1%] No update step for 'TBB_Project'
[ 1%] No configure step for 'TBB_Project'
[ 1%] Performing build step for 'TBB_Project'
[ 1%] Performing install step for 'TBB_Project'
[ 1%] Completed 'TBB_Project'
[ 1%] Built target TBB_Project
[ 2%] Building CXX object dep/recastnavigation/Detour/Source/CMakeFiles/detour.dir/DetourAlloc.cpp.o
[ 2%] Building CXX object dep/recastnavigation/Detour/Source/CMakeFiles/detour.dir/DetourCommon.cpp.o
[ 2%] Building CXX object dep/recastnavigation/Detour/Source/CMakeFiles/detour.dir/DetourNavMeshBuilder.cpp.o
[ 2%] Building CXX object dep/recastnavigation/Detour/Source/CMakeFiles/detour.dir/DetourNavMesh.cpp.o
[ 3%] Building CXX object dep/recastnavigation/Detour/Source/CMakeFiles/detour.dir/DetourNavMeshQuery.cpp.o
[ 3%] Building CXX object dep/recastnavigation/Detour/Source/CMakeFiles/detour.dir/DetourNode.cpp.o
[ 3%] Linking CXX static library libdetour.a
[ 3%] Built target detour
[ 3%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/AABox.cpp.o
[ 3%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Any.cpp.o
[ 3%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/BinaryFormat.cpp.o
[ 4%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/BinaryInput.cpp.o
[ 4%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/BinaryOutput.cpp.o
[ 4%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Box.cpp.o
[ 4%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Capsule.cpp.o
[ 5%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/CollisionDetection.cpp.o
[ 5%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/CoordinateFrame.cpp.o
[ 5%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Crypto.cpp.o
[ 5%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Cylinder.cpp.o
[ 5%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/FileSystem.cpp.o
[ 6%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Line.cpp.o
[ 6%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/LineSegment.cpp.o
[ 6%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Log.cpp.o
[ 6%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Matrix3.cpp.o
[ 6%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Matrix4.cpp.o
[ 7%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/MemoryManager.cpp.o
[ 7%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/PhysicsFrame.cpp.o
[ 7%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Plane.cpp.o
[ 7%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Quat.cpp.o
[ 8%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Random.cpp.o
[ 8%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Ray.cpp.o
[ 8%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/ReferenceCount.cpp.o
[ 8%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/RegistryUtil.cpp.o
[ 8%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Sphere.cpp.o
[ 9%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/System.cpp.o
[ 9%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/TextInput.cpp.o
[ 9%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/TextOutput.cpp.o
[ 9%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Triangle.cpp.o
[ 9%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/UprightFrame.cpp.o
[ 10%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Vector2.cpp.o
[ 10%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Vector3.cpp.o
[ 10%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/Vector4.cpp.o
[ 10%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/debugAssert.cpp.o
[ 11%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/fileutils.cpp.o
[ 11%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/format.cpp.o
[ 11%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/g3dfnmatch.cpp.o
[ 11%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/g3dmath.cpp.o
[ 11%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/prompt.cpp.o
[ 12%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/stringutils.cpp.o
[ 12%] Building CXX object dep/src/g3dlite/CMakeFiles/g3dlite.dir/uint128.cpp.o
[ 12%] Linking CXX static library libg3dlite.a
[ 12%] Built target g3dlite
[ 13%] Building CXX object dep/src/gsoap/CMakeFiles/gsoap.dir/stdsoap2.cpp.o
[ 13%] Linking CXX static library libgsoap.a
[ 13%] Built target gsoap
[ 13%] Building CXX object src/framework/CMakeFiles/framework.dir/Policies/MemoryManagement.cpp.o
[ 13%] Building CXX object src/framework/CMakeFiles/framework.dir/Policies/ObjectLifeTime.cpp.o
[ 14%] Building CXX object src/framework/CMakeFiles/framework.dir/Utilities/EventProcessor.cpp.o
[ 14%] Linking CXX static library libframework.a
[ 14%] Built target framework
[ 14%] Building CXX object src/shared/CMakeFiles/shared.dir/Auth/AuthCrypt.cpp.o
[ 14%] Building CXX object src/shared/CMakeFiles/shared.dir/Auth/BigNumber.cpp.o
[ 15%] Building CXX object src/shared/CMakeFiles/shared.dir/Auth/Hmac.cpp.o
[ 15%] Building CXX object src/shared/CMakeFiles/shared.dir/Auth/Sha1.cpp.o
[ 15%] Building CXX object src/shared/CMakeFiles/shared.dir/Config/Config.cpp.o
[ 15%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/Database.cpp.o
/media/bluray/mangos/src/shared/Database/Database.cpp: In member function ‘bool Database::DirectExecuteStmt(const SqlStatementID&, SqlStmtParameters*)’:
/media/bluray/mangos/src/shared/Database/Database.cpp:563:10: warning: ‘template<class> class std::auto_ptr’ is deprecated [-Wdeprecated-declarations]
  std::auto_ptr<SqlStmtParameters> p(params);
     ^~~~~~~~
In file included from /usr/include/c++/6.1.1/memory:81:0,
        from /usr/include/c++/6.1.1/thread:40,
        from /media/bluray/mangos/src/shared/Threading.h:22,
        from /media/bluray/mangos/src/shared/Common.h:56,
        from /media/bluray/mangos/src/shared/Database/DatabaseEnv.h:22,
        from /media/bluray/mangos/src/shared/Database/Database.cpp:19:
/usr/include/c++/6.1.1/bits/unique_ptr.h:49:28: note: declared here
template<typename> class auto_ptr;
              ^~~~~~~~
[ 15%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/DatabaseMysql.cpp.o
[ 16%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/DatabasePostgre.cpp.o
[ 16%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/Field.cpp.o
[ 16%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/QueryResultMysql.cpp.o
[ 16%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/QueryResultPostgre.cpp.o
[ 16%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/SqlDelayThread.cpp.o
[ 17%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/SqlOperations.cpp.o
[ 17%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/SqlPreparedStatement.cpp.o
[ 17%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/SQLStorage.cpp.o
[ 17%] Building CXX object src/shared/CMakeFiles/shared.dir/Database/DBCFileLoader.cpp.o
[ 18%] Building CXX object src/shared/CMakeFiles/shared.dir/Log.cpp.o
[ 18%] Building CXX object src/shared/CMakeFiles/shared.dir/ByteBuffer.cpp.o
[ 18%] Building CXX object src/shared/CMakeFiles/shared.dir/ProgressBar.cpp.o
[ 18%] Building CXX object src/shared/CMakeFiles/shared.dir/Util.cpp.o
[ 18%] Building CXX object src/shared/CMakeFiles/shared.dir/Network/PacketBuffer.cpp.o
[ 19%] Building CXX object src/shared/CMakeFiles/shared.dir/Network/Socket.cpp.o
[ 19%] Building CXX object src/shared/CMakeFiles/shared.dir/Common.cpp.o
[ 19%] Building CXX object src/shared/CMakeFiles/shared.dir/Threading.cpp.o
[ 19%] Building CXX object src/shared/CMakeFiles/shared.dir/PosixDaemon.cpp.o
[ 20%] Linking CXX static library libshared.a
[ 20%] Built target shared
[ 20%] Building CXX object src/realmd/CMakeFiles/realmd.dir/AuthSocket.cpp.o
[ 20%] Building CXX object src/realmd/CMakeFiles/realmd.dir/Main.cpp.o
[ 21%] Building CXX object src/realmd/CMakeFiles/realmd.dir/RealmList.cpp.o
[ 21%] Linking CXX executable realmd
[ 21%] Built target realmd
[ 21%] Generating CXX unity source src/game/cotire/game_CXX_unity.cxx
[ 22%] Generating CXX prefix source src/game/cotire/game_CXX_prefix.cxx
[ 22%] Generating CXX prefix header src/game/cotire/game_CXX_prefix.hxx
make[2]: *** No rule to make target '/usr/include/c++/5.3.1/algorithm', needed by 'src/game/cotire/game_CXX_prefix.hxx.gch'. Stop.
CMakeFiles/Makefile2:797: recipe for target 'src/game/CMakeFiles/game.dir/all' failed
make[1]: *** [src/game/CMakeFiles/game.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
Reply
Post: #2
For some reason header files are being searched in a '/usr/include/c++/5.3.1' path, which doesn't seem to exist on your system, but I'd expect something with 6.1 instead if you're using GCC 6.1.

I can see two possible reasons for this. First, at one point in time you've run CMake to build with GCC 5.3.1, and in the meantime you've removed or upgraded that version. In that case, simply run the CMake command again first, then run make again.The second possibilityis that there'san issue with cotire/CMake doing something wrong when building precompiled headers, or, unlikly, perhaps even an issue with you compiler environment.

If re-running the CMake command doesn't help, you could also try to build the core without precompiled headers and see if that helps for now (run CMake with a '-DPCH=0' option).
[-] The following 1 user says Thank You to evil@wow for this post:
  â€¢ liko
Reply
Post: #3
(07-02-2016, 01:18 PM)evil@wow Wrote: For some reason header files are being searched in a '/usr/include/c++/5.3.1' path, which doesn't seem to exist on your system, but I'd expect something with 6.1 instead if you're using GCC 6.1.

I can see two possible reasons for this. First, at one point in time you've run CMake to build with GCC 5.3.1, and in the meantime you've removed or upgraded that version. In that case, simply run the CMake command again first, then run make again.The second possibilityis that there'san issue with cotire/CMake doing something wrong when building precompiled headers, or, unlikly, perhaps even an issue with you compiler environment.

If re-running the CMake command doesn't help, you could also try to build the core without precompiled headers and see if that helps for now (run CMake with a '-DPCH=0' option).

Yes, my system updated from Fedora 23 to Fedora 24, which included moving from GCC 5.3.1 to 6.1. I was using the precompiled headers option which I think caused the issue. I did run CMake before make originally, but the DPCH was the secret. Thanks so much!!
Reply
Post: #4
(07-04-2016, 03:47 AM)liko Wrote: Yes, my system updated from Fedora 23 to Fedora 24, which included moving from GCC 5.3.1 to 6.1. I was using the precompiled headers option which I think caused the issue. I did run CMake before make originally, but the DPCH was the secret. Thanks so much!!

When you were on Fedora 23 you were using -DPCH=1 ?
Reply
Post: #5
(07-04-2016, 10:09 AM)adellaci Wrote:
(07-04-2016, 03:47 AM)liko Wrote: Yes, my system updated from Fedora 23 to Fedora 24, which included moving from GCC 5.3.1 to 6.1. I was using the precompiled headers option which I think caused the issue. I did run CMake before make originally, but the DPCH was the secret. Thanks so much!!

When you were on Fedora 23 you were using -DPCH=1 ?

I was on Fedora 23 when previous compiles worked. I have a feeling that DPCH=1 "worked" because the headers weren't compiled, so it compiled them (as it was a fresh checkout from git). Hope this helps.
Reply
Post: #6
Ubuntu 14.04 LTS Server
There was several months that I had to compile with -DPCH=0, but back about a month ago i started compiling again with set to one. I'm trying to hunt down all the threads that we have been discussing it. I think it maybe compiler version.
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  database issue - creature_equip_template empty RichardGe 1 805 03-27-2017, 05:33 PM
Last Post: RichardGe
  [ALL] Windows vs Linux? Farkie 2 1,082 02-27-2017, 09:22 PM
Last Post: ubergeekking
  [CLASSIC] [Linux] can't run mangosd as daemon using --background in init script Ambient_Silence 7 2,345 01-08-2017, 04:44 PM
Last Post: ekg98
  [CLASSIC] Issue with Extracting Wrsx 1 876 12-20-2016, 02:08 PM
Last Post: Cyberium
  [CLASSIC] [RESOLVED] Extracted maps work on Windows but not Linux Ambient_Silence 4 1,709 12-12-2016, 03:37 PM
Last Post: Ambient_Silence
  [WOTLK] compile errors klyxmaster 4 1,589 12-05-2016, 12:18 PM
Last Post: Cyberium
  [WOTLK] Can't compile CManGOS in VS 2015 Erny 3 1,743 11-05-2016, 08:58 PM
Last Post: Meiyo
  latest cmangos classic with playerbot compile error darkdandy 2 1,261 10-27-2016, 02:34 PM
Last Post: darkdandy
  compile error with game.lib suomaza 5 2,703 10-01-2016, 01:35 AM
Last Post: suomaza
  [CLASSIC] [FIXED] GuardianAI.cpp reference during compile taters 0 695 09-11-2016, 12:08 PM
Last Post: taters

Forum Jump:


Users browsing this thread: 1 Guest(s)

Continued MaNGOS | Return to Top | | Lite (Archive) Mode | RSS Syndication