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

update to fmt 10.1.1, fast_double_parser 0.7.0 #6074

Merged
merged 11 commits into from
Sep 12, 2023
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,13 @@ if(UNIX OR MINGW OR CYGWIN)
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -std=c++11 -pthread -Wextra -Wall -Wno-ignored-attributes -Wno-unknown-pragmas -Wno-return-type"
)
if(MINGW)
# ignore this warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95353
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wno-stringop-overflow"
)
endif()
Copy link
Collaborator Author

@jameslamb jameslamb Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used to suppress the following warning that shows up only with MinGW (gcc 10):

[ 60%] Building CXX object CMakeFiles/lightgbm_objs.dir/src/network/linkers_mpi.cpp.obj

d:\a\lightgbm\lightgbm\lightgbm.rcheck\00_pkg_src\lightgbm\src\external_libs\fmt\include\fmt\format.h: In function 'void fmt::v10::detail::format_hexfloat(Float, int, fmt::v10::detail::float_specs, fmt::v10::detail::buffer<char>&) [with Float = double; typename std::enable_if<(! std::integral_constant<bool, (std::numeric_limits<_Tp>::digits == 106)>::value), int>::type <anonymous> = 0]':
d:\a\lightgbm\lightgbm\lightgbm.rcheck\00_pkg_src\lightgbm\src\external_libs\fmt\include\fmt\format.h:1370:8: note: at offset -2 to object 'buffer' with size 10 declared here
 1370 |   Char buffer[digits10<UInt>() + 1] = {};
      |        ^~~~~~

(example build link)

Per fmtlib/fmt#1810 (comment), this was a false positive and a bug in gcc 10 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95353). Seems that maybe it wasn't backported in MinGW as well?

I saw the same error in only the MinGW + R 4.3 + Rtools43 build on #6061.

if(USE_DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0")
else()
Expand Down
2 changes: 1 addition & 1 deletion external_libs/fmt
Submodule fmt updated 86 files
+8 −0 .github/dependabot.yml
+6 −0 .github/issue_template.md
+3 −2 .github/pull_request_template.md
+30 −0 .github/workflows/cifuzz.yml
+12 −1 .github/workflows/doc.yml
+42 −10 .github/workflows/linux.yml
+20 −2 .github/workflows/macos.yml
+65 −0 .github/workflows/scorecard.yml
+61 −21 .github/workflows/windows.yml
+99 −70 CMakeLists.txt
+1,187 −3 ChangeLog.rst
+1 −1 LICENSE.rst
+55 −38 README.rst
+11 −2 doc/CMakeLists.txt
+270 −155 doc/api.rst
+9 −6 doc/build.py
+2 −2 doc/index.rst
+163 −10 doc/syntax.rst
+5 −5 include/fmt/args.h
+482 −341 include/fmt/chrono.h
+116 −122 include/fmt/color.h
+62 −170 include/fmt/compile.h
+976 −1,290 include/fmt/core.h
+820 −1,801 include/fmt/format-inl.h
+2,253 −847 include/fmt/format.h
+0 −2 include/fmt/locale.h
+70 −146 include/fmt/os.h
+129 −55 include/fmt/ostream.h
+202 −192 include/fmt/printf.h
+367 −425 include/fmt/ranges.h
+465 −0 include/fmt/std.h
+86 −64 include/fmt/xchar.h
+40 −29 src/fmt.cc
+15 −96 src/format.cc
+117 −80 src/os.cc
+3 −3 support/Vagrantfile
+0 −43 support/appveyor-build.py
+0 −31 support/appveyor.yml
+0 −1 support/bazel/.bazelrc
+1 −1 support/bazel/.bazelversion
+1 −2 support/bazel/BUILD.bazel
+5 −4 support/bazel/README.md
+1 −1 support/build.gradle
+0 −70 support/cmake/cxx14.cmake
+4 −1 support/cmake/fmt-config.cmake.in
+6 −0 support/manage.py
+1 −1 support/printable.py
+7 −0 support/rst2md.py
+30 −17 test/CMakeLists.txt
+1 −1 test/add-subdirectory-test/CMakeLists.txt
+1 −1 test/args-test.cc
+396 −18 test/chrono-test.cc
+6 −0 test/color-test.cc
+42 −4 test/compile-error-test/CMakeLists.txt
+2 −1 test/compile-fp-test.cc
+37 −39 test/compile-test.cc
+167 −232 test/core-test.cc
+18 −0 test/detect-stdfs.cc
+2 −0 test/enforce-checks-test.cc
+1 −1 test/find-package-test/CMakeLists.txt
+257 −151 test/format-impl-test.cc
+465 −388 test/format-test.cc
+1 −1 test/fuzzing/CMakeLists.txt
+2 −2 test/fuzzing/one-arg.cc
+2 −2 test/fuzzing/two-args.cc
+3 −1 test/gtest-extra-test.cc
+1 −1 test/gtest-extra.cc
+2 −7 test/gtest-extra.h
+1 −7 test/gtest/CMakeLists.txt
+2 −2 test/gtest/gmock-gtest-all.cc
+2 −2 test/mock-allocator.h
+36 −96 test/module-test.cc
+24 −69 test/os-test.cc
+69 −79 test/ostream-test.cc
+3 −90 test/posix-mock-test.cc
+0 −2 test/posix-mock.h
+14 −42 test/printf-test.cc
+198 −34 test/ranges-test.cc
+1 −1 test/scan-test.cc
+17 −14 test/scan.h
+1 −1 test/static-export-test/CMakeLists.txt
+257 −0 test/std-test.cc
+2 −3 test/test-main.cc
+4 −4 test/unicode-test.cc
+2 −6 test/util.h
+177 −95 test/xchar-test.cc