Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest MSVC build tools breaks the build due to spdlog library errors #216

Closed
stevewgr opened this issue Apr 27, 2024 · 1 comment
Closed
Assignees
Labels
bug Something isn't working

Comments

@stevewgr
Copy link
Member

stevewgr commented Apr 27, 2024

Description

Updating to latest MSVC build tools breaks the build due to spdlog internal library errors.

To Reproduce

Update Visual Studio to the latest version and use the most recent build tools. When trying to build KnightOnLine project, the following errors will be produced:

Build started at 3:24 PM...
1>------ Build started: Project: KnightOnLine, Configuration: Debug Win32 ------
1>StdAfx.cpp
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(378,51): error C4996: 'stdext::checked_array_iterator<_Ty*>': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.
1>(compiling source file 'StdAfx.cpp')
1>C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\include\iterator(1470,35):
1>see declaration of 'stdext::checked_array_iterator'
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996: 'stdext::checked_array_iterator<T *>::checked_array_iterator': warning STL4043: stdext::checked_array_iterator, stdext::unchecked_array_iterator, and related factory functions are non-Standard extensions and will be removed in the future. std::span (since C++20) and gsl::span can be used instead. You can define _SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING or _SILENCE_ALL_MS_EXT_DEPRECATION_WARNINGS to suppress this warning.
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:         with
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:         [
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:             T=fmt::v8::detail::bigint::bigit
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3): error C4996:         ]
1>(compiling source file 'StdAfx.cpp')
1>C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format.h(381,3):
1>the template instantiation context (the oldest one first) is
1>	C:\ko\_new\ko\src\vendor\spdlog\include\spdlog\fmt\bundled\format-inl.h(459,34):
1>	see reference to function template instantiation 'stdext::checked_array_iterator<T *> fmt::v8::detail::make_checked<T>(T *,size_t)' being compiled
1>        with
1>        [
1>            T=fmt::v8::detail::bigint::bigit
1>        ]

Tasks

Rebuild spdlog library with SPDLOG_USE_STD_FORMAT: https://github.com/gabime/spdlog/blob/a2b4262090fd3f005c2315dcb5be2f0f1774a005/CMakeLists.txt#L90

and update ko-vendor assets.

Deliverables

@stevewgr stevewgr added the bug Something isn't working label Apr 27, 2024
@stevewgr stevewgr self-assigned this Apr 27, 2024
@stevewgr stevewgr moved this to In Progress in ko-project Apr 27, 2024
stevewgr added a commit to ko4life-net/ko-vendor that referenced this issue Apr 27, 2024
This is because the project uses C++20 and fmt library is now part of
the standard library. Additionally I had compilation errors after
upgrading the msvc compiler due to fmt::format lib, so I recompiled
spdlog using the SPDLOG_USE_STD_FORMAT cmake flag and bumped its version
from 1.11.0 to 1.13.0 in ko-vendor.
This fixes the following issue:
ko4life-net/ko#216
stevewgr added a commit that referenced this issue Apr 27, 2024
This is because the project uses C++20 and fmt library is now part of
the standard library. Additionally I had compilation errors after
upgrading the msvc compiler due to fmt::format lib, so I recompiled
spdlog using the SPDLOG_USE_STD_FORMAT cmake flag and bumped its version
from 1.11.0 to 1.13.0 in ko-vendor.
This fixes the following issue:
#216
@stevewgr
Copy link
Member Author

Issue is now resolved and merged to master.

Closing.

@github-project-automation github-project-automation bot moved this from In Progress to Done in ko-project Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

1 participant