EvEmu-Project / evemu_Crucible

Emulator for EvE Online's Crucible expansion
https://evemu.dev
168 stars 65 forks source link

Warnings in build #241

Closed phillipwgardner closed 2 months ago

phillipwgardner commented 1 year ago

Description: Warnings in build process.

Reproduction:

  1. git clone --branch staging https://github.com/EvEmu-Project/evemu_Crucible
  2. cd evemu_Crucible && docker-compose -p evemu up --build -d

Expected behavior: No warnings

Screenshots:

Step 13/24 : RUN cmake -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_BUILD_TYPE=Debug ..
 ---> Running in d6ac54a1191f
CMake Deprecation Warning at CMakeLists.txt:13 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-- The C compiler identification is GNU 12.2.1
-- The CXX compiler identification is GNU 12.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.39.0")
CMake Warning (dev) at cmake/GitTreeInfo.cmake:57 (IF):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "GIT_TAG_EXACT" will no longer be dereferenced when
  the policy is set to NEW.  Since the policy is not set the OLD behavior
  will be used.
Call Stack (most recent call first):
  cmake/DetectScm.cmake:33 (GIT_TREE_INFO)
  CMakeLists.txt:82 (DETECT_SCM)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/GitTreeInfo.cmake:65 (IF):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "GIT_BRANCH" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  cmake/DetectScm.cmake:33 (GIT_TREE_INFO)
  CMakeLists.txt:82 (DETECT_SCM)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at cmake/GitTreeInfo.cmake:70 (IF):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "GIT_TAG_LAST" will no longer be dereferenced when
  the policy is set to NEW.  Since the policy is not set the OLD behavior
  will be used.
Call Stack (most recent call first):
  cmake/DetectScm.cmake:33 (GIT_TREE_INFO)
  CMakeLists.txt:82 (DETECT_SCM)
This warning is for project developers.  Use -Wno-dev to suppress it.

2.

[  5%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/network/StreamPacketizer.cpp.o
In file included from /src/src/eve-core/network/StreamPacketizer.h:29,
                 from /src/src/eve-core/network/StreamPacketizer.cpp:28:
/src/src/eve-core/utils/Buffer.h:53:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   53 |     : public std::iterator< std::random_access_iterator_tag, T >
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/specfun.h:45,
                 from /usr/include/c++/12/cmath:1935,
                 from /src/src/eve-core/eve-core.h:65,
                 from /src/build/src/eve-core/CMakeFiles/eve-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/src/src/eve-core/utils/Buffer.h:56:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   56 |         typedef std::iterator< std::random_access_iterator_tag, T > _Base;
      |                      ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
[  5%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/network/TCPConnection.cpp.o
[  5%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/network/TCPServer.cpp.o
In file included from /src/src/eve-core/network/TCPConnection.h:31,
                 from /src/src/eve-core/network/TCPConnection.cpp:31:
/src/src/eve-core/utils/Buffer.h:53:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   53 |     : public std::iterator< std::random_access_iterator_tag, T >
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/specfun.h:45,
                 from /usr/include/c++/12/cmath:1935,
                 from /src/src/eve-core/eve-core.h:65,
                 from /src/build/src/eve-core/CMakeFiles/eve-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/src/src/eve-core/utils/Buffer.h:56:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   56 |         typedef std::iterator< std::random_access_iterator_tag, T > _Base;
      |                      ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
[  6%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/threading/Mutex.cpp.o
[  6%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/threading/Threading.cpp.o
[  6%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/crc32.cpp.o
[  7%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/Deflate.cpp.o
In file included from /src/src/eve-core/utils/Deflate.h:29,
                 from /src/src/eve-core/utils/Deflate.cpp:31:
/src/src/eve-core/utils/Buffer.h:53:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   53 |     : public std::iterator< std::random_access_iterator_tag, T >
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/specfun.h:45,
                 from /usr/include/c++/12/cmath:1935,
                 from /src/src/eve-core/eve-core.h:65,
                 from /src/build/src/eve-core/CMakeFiles/eve-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/src/src/eve-core/utils/Buffer.h:56:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   56 |         typedef std::iterator< std::random_access_iterator_tag, T > _Base;
      |                      ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
[  7%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/DirWalker.cpp.o
[  7%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/misc.cpp.o
[  7%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/Seperator.cpp.o
In file included from /src/src/eve-core/utils/utils_string.h:29,
                 from /src/src/eve-core/utils/Seperator.h:29,
                 from /src/src/eve-core/utils/Seperator.cpp:29:
/src/src/eve-core/utils/Buffer.h:53:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   53 |     : public std::iterator< std::random_access_iterator_tag, T >
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/specfun.h:45,
                 from /usr/include/c++/12/cmath:1935,
                 from /src/src/eve-core/eve-core.h:65,
                 from /src/build/src/eve-core/CMakeFiles/eve-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/src/src/eve-core/utils/Buffer.h:56:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   56 |         typedef std::iterator< std::random_access_iterator_tag, T > _Base;
      |                      ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
[  8%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/str2conv.cpp.o
[  8%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/timer.cpp.o
In file included from /src/src/eve-core/utils/utils_string.h:29,
                 from /src/src/eve-core/utils/misc.cpp:34:
/src/src/eve-core/utils/Buffer.h:53:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   53 |     : public std::iterator< std::random_access_iterator_tag, T >
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/specfun.h:45,
                 from /usr/include/c++/12/cmath:1935,
                 from /src/src/eve-core/eve-core.h:65,
                 from /src/build/src/eve-core/CMakeFiles/eve-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/src/src/eve-core/utils/Buffer.h:56:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   56 |         typedef std::iterator< std::random_access_iterator_tag, T > _Base;
      |                      ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
[  8%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/utils_hex.cpp.o
In file included from /src/src/eve-core/utils/utils_string.h:29,
                 from /src/src/eve-core/utils/utils_hex.cpp:29:
/src/src/eve-core/utils/Buffer.h:53:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   53 |     : public std::iterator< std::random_access_iterator_tag, T >
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/specfun.h:45,
                 from /usr/include/c++/12/cmath:1935,
                 from /src/src/eve-core/eve-core.h:65,
                 from /src/build/src/eve-core/CMakeFiles/eve-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/src/src/eve-core/utils/Buffer.h:56:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   56 |         typedef std::iterator< std::random_access_iterator_tag, T > _Base;
      |                      ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
[  9%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/utils_string.cpp.o
[  9%] Building CXX object src/eve-core/CMakeFiles/eve-core.dir/utils/utils_time.cpp.o
In file included from /src/src/eve-core/utils/utils_string.h:29,
                 from /src/src/eve-core/utils/utils_string.cpp:28:
/src/src/eve-core/utils/Buffer.h:53:19: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   53 |     : public std::iterator< std::random_access_iterator_tag, T >
      |                   ^~~~~~~~
In file included from /usr/include/c++/12/bits/stl_algobase.h:65,
                 from /usr/include/c++/12/bits/specfun.h:45,
                 from /usr/include/c++/12/cmath:1935,
                 from /src/src/eve-core/eve-core.h:65,
                 from /src/build/src/eve-core/CMakeFiles/eve-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~
/src/src/eve-core/utils/Buffer.h:56:22: warning: 'template<class _Category, class _Tp, class _Distance, class _Pointer, class _Reference> struct std::iterator' is deprecated [-Wdeprecated-declarations]
   56 |         typedef std::iterator< std::random_access_iterator_tag, T > _Base;
      |                      ^~~~~~~~
/usr/include/c++/12/bits/stl_iterator_base_types.h:127:34: note: declared here
  127 |     struct _GLIBCXX17_DEPRECATED iterator
      |                                  ^~~~~~~~

System Details:

@kimrosebush

Almamu commented 1 year ago

Some of these are new, some are old. The whole codebase is plagued by warnings that we have kind of planned to look into but haven't had enough time yet. Definetly something we should look into soon-ish...

Maybe I can take care of these after the planned Python types rewrite... Otherwise anyone, please feel free to take on this one and put together a PR ;)

phillipwgardner commented 1 year ago

Some of these are new, some are old. The whole codebase is plagued by warnings that we have kind of planned to look into but haven't had enough time yet. Definetly something we should look into soon-ish...

Maybe I can take care of these after the planned Python types rewrite... Otherwise anyone, please feel free to take on this one and put together a PR ;)

Very interesting... with db81c4097bfc319fabbca70a74bbf070cf3917b0 the only warning remains is this, all the rest have disappeared!

Step 12/23 : RUN cmake -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_BUILD_TYPE=Debug ..
 ---> Running in f0687714f0b1
CMake Deprecation Warning at CMakeLists.txt:13 (CMAKE_MINIMUM_REQUIRED):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

Looks like some inadvertent success in resolving some of it already. :) With the exception of the above it cleanly builds. ^^

phillipwgardner commented 1 year ago

It is interesting to note while building master branch as of commit db81c4097bfc319fabbca70a74bbf070cf3917b0 the warnings do not appear. As of staging branch commit bd195eb37e6ac007453a49d0f9c16c75d4e0c8a0 all warnings will appear as shown in the original issue.

jdhirst commented 2 months ago

In agreement with the above sentiment relating to warnings, the code is full of them but any PRs that help to fix them are certainly appreciated :)