gabime / spdlog

Fast C++ logging library.
Other
23.86k stars 4.48k forks source link

Can't compile under MinGW. #1507

Closed Kudze closed 4 years ago

Kudze commented 4 years ago

Hello. I can't compile spdlog under windows while using MinGW.

gcc -v outputs

COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/8.2.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-8.2.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-
8.2.0-3' --with-gmp=/mingw --with-mpfr=/mingw --with-mpc=/mingw --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libst
dcxx-debug --with-isl=/mingw --enable-libgomp --disable-libvtv --enable-nls --disable-build-format-warnings
Thread model: win32
gcc version 8.2.0 (MinGW.org GCC-8.2.0-3)

Error that I'm getting during compilation:

                 from c:\users\karol\onedrive\stalin~1\pp\c__~1\3dengine\deps\spdlog\inc\spdlog\fmt\fmt.h:23,
                 from c:\users\karol\onedrive\stalin~1\pp\c__~1\3dengine\deps\spdlog\inc\spdlog\common.h:36,
                 from c:\users\karol\onedrive\stalin~1\pp\c__~1\3dengine\deps\spdlog\inc\spdlog\spdlog.h:12,
                 from C:\Users\karol\OneDrive\Stalinis kompiuteris\PP\c++\3DEngine\src\Engine3D\vulkan\vulkan_debug.cpp:6:
c:\users\karol\onedrive\stalin~1\pp\c__~1\3dengine\deps\spdlog\inc\spdlog\fmt\bundled\format-inl.h: In function 'int fmt::v6::internal::snprintf_float(T, int, fmt::v6::internal::float_specs, fmt::v6::internal::buffer<char>&)':
c:\users\karol\onedrive\stalin~1\pp\c__~1\3dengine\deps\spdlog\inc\spdlog\fmt\bundled\format-inl.h:64:24: internal compiler error: Segmentation fault
 #  define FMT_SNPRINTF snprintf
                        ^~~~~~~~
c:\users\karol\onedrive\stalin~1\pp\c__~1\3dengine\deps\spdlog\inc\spdlog\fmt\bundled\format-inl.h:1156:25: note: in expansion of macro 'FMT_SNPRINTF'
     auto snprintf_ptr = FMT_SNPRINTF;
                         ^~~~~~~~~~~~
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.
src\Engine3D\CMakeFiles\3DEngineLib.dir\build.make:160: recipe for target 'src/Engine3D/CMakeFiles/3DEngineLib.dir/vulkan/vulkan_debug.cpp.obj' failed
mingw32-make[2]: *** [src/Engine3D/CMakeFiles/3DEngineLib.dir/vulkan/vulkan_debug.cpp.obj] Error 1
CMakeFiles\Makefile2:388: recipe for target 'src/Engine3D/CMakeFiles/3DEngineLib.dir/all' failed
mingw32-make[1]: *** [src/Engine3D/CMakeFiles/3DEngineLib.dir/all] Error 2
Makefile:128: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
tt4g commented 4 years ago

This is fmt library issue and already fixed in fmt 6.2.0.

Same issue report: fmtlib/fmt#1531 Pull request: fmtlib/fmt#1532