Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#8786 closed Bugs (fixed)

Boost.Log fails to build with 64-bit MinGW

Reported by: ashish.sadanandan@… Owned by: Andrey Semashev
Milestone: To Be Determined Component: log
Version: Boost 1.54.0 Severity: Problem
Keywords: Cc:

Description

When building Boost.Log using 64-bit MinGW 4.8.1 (from MinGW-Builds SourceForge project, 64-bit compiler, posix threads, SEH exception model), compilation fails with the following message

gcc.compile.c++ E:\Tools\Boost\1.54.0-gcc-4.8.1_x64-build\boost\bin.v2\libs\log\build\gcc-mingw-4.8.1\debug\address-model-64\link-static\log-api-winnt\threading-multi\default_filter_factory.o

    "g++"  -ftemplate-depth-128 -O0 -fno-inline -Wall -g -mthreads -m64 -D__int64="long long int" -include cmath -march=native -mtune=native -Wno-unused-local-typedefs -fno-strict-aliasing -ftemplate-depth-1024 -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_STATIC_LINK=1 -DBOOST_FILESYSTEM_STATIC_LINK=1 -DBOOST_LOG_SETUP_BUILDING_THE_LIB=1 -DBOOST_LOG_USE_AVX2 -DBOOST_LOG_USE_SSSE3 -DBOOST_SPIRIT_USE_PHOENIX_V3=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_SYSTEM_STATIC_LINK=1 -DBOOST_THREAD_BUILD_LIB=1 -DBOOST_THREAD_DONT_USE_CHRONO=1 -DBOOST_THREAD_USE_LIB=1 -DDATE_TIME_INLINE  -I"." -c -o "E:\Tools\Boost\1.54.0-gcc-4.8.1_x64-build\boost\bin.v2\libs\log\build\gcc-mingw-4.8.1\debug\address-model-64\link-static\log-api-winnt\threading-multi\default_filter_factory.o" "libs\log\src\default_filter_factory.cpp"

e:/tools/mingw/x64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/as.exe: E:\Tools\Boost\1.54.0-gcc-4.8.1_x64-build\boost\bin.v2\libs\log\build\gcc-mingw-4.8.1\debug\address-model-64\link-static\log-api-winnt\threading-multi\default_filter_factory.o: too many sections (43643)
C:\Users\Ashish\AppData\Local\Temp\ccCaEoj5.s: Assembler messages:
C:\Users\Ashish\AppData\Local\Temp\ccCaEoj5.s: Fatal error: can't write E:\Tools\Boost\1.54.0-gcc-4.8.1_x64-build\boost\bin.v2\libs\log\build\gcc-mingw-4.8.1\debug\address-model-64\link-static\log-api-winnt\threading-multi\default_filter_factory.o: File too big
e:/tools/mingw/x64/bin/../lib/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/as.exe: E:\Tools\Boost\1.54.0-gcc-4.8.1_x64-build\boost\bin.v2\libs\log\build\gcc-mingw-4.8.1\debug\address-model-64\link-static\log-api-winnt\threading-multi\default_filter_factory.o: too many sections (43643)
C:\Users\Ashish\AppData\Local\Temp\ccCaEoj5.s: Fatal error: can't close E:\Tools\Boost\1.54.0-gcc-4.8.1_x64-build\boost\bin.v2\libs\log\build\gcc-mingw-4.8.1\debug\address-model-64\link-static\log-api-winnt\threading-multi\default_filter_factory.o: File too big

Boost.Log builds successfully using the 32-bit version of MinGW 4.8.1

Change History (5)

comment:1 by Andrey Semashev, 9 years ago

Right now you can try reducing the binary size by disabling portions of the library (for example, disable unused character types or settings parsers altogether). See here for configuration options.

comment:2 by Andrey Semashev, 9 years ago

(In [85031]) Extracted default formatter factory to a separate translation unit. Made all default factories optional, the factories can be disabled with the new config macro BOOST_LOG_WITHOUT_DEFAULT_FACTORIES. Refs #8773, #8786.

comment:3 by Andrey Semashev, 9 years ago

(In [85202]) Extracted Boost.Xpressive use to a separate translation unit in attempt to work around MinGW 64 bit compiler limitation on the number of sections in the object file. Made some changes to reduce binary size. Refs #8786, #8773.

comment:4 by Andrey Semashev, 9 years ago

Resolution: fixed
Status: newclosed

in reply to:  2 comment:5 by anonymous, 9 years ago

Replying to andysem:

(In [85031]) Extracted default formatter factory to a separate translation unit. Made all default factories optional, the factories can be disabled with the new config macro BOOST_LOG_WITHOUT_DEFAULT_FACTORIES. Refs #8773, #8786.

dcmm

Note: See TracTickets for help on using tickets.