Skip to content

flang mingw-w64 build fails with string table overflow, file too big #63582

Open
@maveric2

Description

@maveric2

Hi community,

I'm able to compile clang;clang-tools-extra;compiler-rt;lld succefully. However if I add flang to the list I bump into the following problem:

FAILED: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/PFTBuilder.cpp.obj
D:\csd_ntly\coside-3.2RC1_mingw-w64\tools\gcc-9.4.0\bin\g++.exe -DFLANG_LITTLE_ENDIAN=1 -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT
_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IC:/clang_man/llvm-project/build/tools/flang/lib/Lower -IC:/clang_man/llvm
-project/flang/lib/Lower -IC:/clang_man/llvm-project/flang/include -IC:/clang_man/llvm-project/build/tools/flang/include -IC:/cl
ang_man/llvm-project/build/include -IC:/clang_man/llvm-project/llvm/include -IC:/clang_build/msys64/mingw64/include -isystem C:/
clang_man/llvm-project/llvm/../mlir/include -isystem C:/clang_man/llvm-project/build/tools/mlir/include -isystem C:/clang_man/ll
vm-project/build/tools/clang/include -isystem C:/clang_man/llvm-project/llvm/../clang/include -Wa,-mbig-obj -Wa,-mbig-obj -Werro
r=date-time -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-
long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcep
t-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -ffunction-sections -fdata-sections
 -Wno-deprecated-copy -Wno-ctad-maybe-unsupported -fno-strict-aliasing -fno-semantic-interposition  -O2 -DNDEBUG -std=c++17  -fn
o-exceptions -MD -MT tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/PFTBuilder.cpp.obj -MF tools\flang\lib\Lower\CMakeFil
es\obj.FortranLower.dir\PFTBuilder.cpp.obj.d -o tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/PFTBuilder.cpp.obj -c C:/c
lang_man/llvm-project/flang/lib/Lower/PFTBuilder.cpp
d:/csd_ntly/coside-3.2rc1_mingw-w64/tools/gcc-9.4.0/bin/../lib/gcc/x86_64-w64-mingw32/9.4.0/../../../../x86_64-w64-mingw32/bin/a
s.exe: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/PFTBuilder.cpp.obj: section .xdata.unlikely._ZNSt8__detail9__varian
t17__gen_vtable_implILb1ENS0_12_Multi_arrayIPFvON7Fortran6common8visitorsIJZNKS3_5lower3pft20ReferenceVariantBaseILb1EJNS3_6pars
er12AllocateStmtENS9_14AssignmentStmtENS9_13BackspaceStmtENS9_8CallStmtENS9_9CloseStmtENS9_12ContinueStmtENS9_9Cycle.
...
T_IKS2O_EENS6
T_IKS2P_EENS6T_IKS2Q_EENS6T_IKS2R_EENS6T_IKS2S_EEEEEJEEESt5tupleIJSAT_EESt16integer_sequenceIyJLy32EEEE14__visit_invokeES6R_SAT_
: string table overflow at offset 10001804
C:\clang_build\msys64\tmp\cc79WZnJ.s: Assembler messages:
C:\clang_build\msys64\tmp\cc79WZnJ.s: Fatal error: tools/flang/lib/Lower/CMakeFiles/obj.FortranLower.dir/PFTBuilder.cpp.obj: fil
e too big
ninja: build stopped: subcommand failed.
[37/584] Building CXX object tools/flang/lib/Optimizer/Dialect/CMakeFiles/obj.FIRDialect.dir/FIROps.cpp.obj
ninja: build stopped: interrupted by user.

I hand over via CMAKE_C_FLAGS, CMAKE_CXX_FLAGS the big object option trying to overcome this issue, but it doesn't help. Another suggestion was to use -O2, but this is already ensured building Release.

Any suggestion on that?

KR,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions