-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
flang mingw-w64 build fails with string table overflow, file too big #63582
Comments
In addition I see a huge memory consumption while building, thus I used these flags for restricting the core usage: |
Thanks @efriedma-quic - I'll try. |
I got the same identical problem in my port of llvm-project to CYGWIN.
I verified that it works fine on CYGWIN.
Perhaps, you may try to test this fix also on your compiler. |
Attached patch fixes issues #63582 and #57718 when building my port to CYGWIN of llvm-project. #63582 #57718 Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D159404
Attached patch fixes issues llvm#63582 and llvm#57718 when building my port to CYGWIN of llvm-project. llvm#63582 llvm#57718 Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D159404
Attached patch fixes issues llvm#63582 and llvm#57718 when building my port to CYGWIN of llvm-project. llvm#63582 llvm#57718 Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D159404
Hi guys, i'm trying to build mlir at 17.01 and 17.02 using mingw & ninja, both version failed(successed at 15.0.7 & 16.0.6):
so the 'string table overflow at offset' may the same issue, and posted on here for now. |
@kalcohol I have been able to build mlir with both CYGWIN and MinGW, although I got an issue at link time of some executables, as explained into #64150.
I think that it could be useful for reproducing the issue. |
Hi @carlo-bramini ,
other info: |
@kalcohol if the latest cloned sources compile fine, then this is a good news. The fix https://reviews.llvm.org/rGe873280e614f8457ebbe2ffdee389b4e336739a6 had been done for supporting CYGWIN. Perhaps you could try to enter into your build directory and type I hope that this will help. |
hi @carlo-bramini , sorry forgot to post testing result of the flag ‘-Wa,-mbig-obj’, but the flag already exists when building: [1/16] D:\Program\JetBrains\CLion\bin\mingw\bin\g++.exe -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=0 -DMLIR_INCLUDE_TESTS -DMLIR_ROCM_CONVERSIONS_ENABLED=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_HARDENED_MODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/llvm/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/include -Wa,-mbig-obj -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -O2 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj -MF tools\mlir\test\lib\Dialect\Test\CMakeFiles\MLIRTestDialect.dir\TestDialect.cpp.obj.d -o tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj -c E:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test/TestDialect.cpp
FAILED: tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj
D:\Program\JetBrains\CLion\bin\mingw\bin\g++.exe -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=0 -DMLIR_INCLUDE_TESTS -DMLIR_ROCM_CONVERSIONS_ENABLED=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_HARDENED_MODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/llvm/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/include -Wa,-mbig-obj -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -O2 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj -MF tools\mlir\test\lib\Dialect\Test\CMakeFiles\MLIRTestDialect.dir\TestDialect.cpp.obj.d -o tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj -c E:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test/TestDialect.cpp
In file included from E:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test/TestDialect.h:90,
from E:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test/TestDialect.cpp:9:
E:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test/TestOps.h.inc: In member function 'bool test::detail::TestOpUsingPropertyInCustomGenericAdaptorBase::Properties::operator==(const test::detail::TestOpUsingPropertyInCustomGenericAdaptorBase::Properties&) const':
E:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test/TestOps.h.inc:40021:18: warning: comparison between two arrays [-Warray-compare]
40021 | rhs.prop == this->prop &&
| ~~~~~~~~~^~~~~~~~~~~~~
E:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test/TestOps.h.inc:40021:18: note: use unary '+' which decays operands to pointers or '&'component_ref' not supported by dump_decl<declaration error>[0] == &'component_ref' not supported by dump_decl<declaration error>[0]' to compare the addresses
E:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test/TestOps.h.inc: In member function 'bool test::detail::TestOpWithPropertiesGenericAdaptorBase::Properties::operator==(const test::detail::TestOpWithPropertiesGenericAdaptorBase::Properties&) const':
E:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test/TestOps.h.inc:40424:19: warning: comparison between two arrays [-Warray-compare]
40424 | rhs.array == this->array &&
| ~~~~~~~~~~^~~~~~~~~~~~~~
E:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test/TestOps.h.inc:40424:19: note: use unary '+' which decays operands to pointers or '&'component_ref' not supported by dump_decl<declaration error>[0] == &'component_ref' not supported by dump_decl<declaration error>[0]' to compare the addresses
as: tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj: section .data$_ZGVZN4mlir6detail14TypeIDResolverIN4test6detail34DenseArrayAttrOpGenericAdaptorBase10PropertiesEvE13resolveTypeIDEvE2id: string table overflow at offset 10000082
C:\Users\i\AppData\Local\Temp\ccaQL36h.s: Assembler messages:
C:\Users\i\AppData\Local\Temp\ccaQL36h.s: Fatal error: tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj: file too big
ninja: build stopped: subcommand failed. and i also try to add ‘-Wl,--stack,33554432’ to building cmd directly, but it's not work(it seems not worked in compilation, but in linking): D:\Program\JetBrains\CLion\bin\mingw\bin\g++.exe -DGTEST_HAS_RTTI=0 -DMLIR_CUDA_CONVERSIONS_ENABLED=0 -DMLIR_INCLUDE_TESTS -DMLIR_ROCM_CONVERSIONS_ENABLED=0 -D_DEBUG -D_FILE_OFFSET_BITS=64 -D_GLIBCXX_ASSERTIONS -D_LIBCPP_ENABLE_HARDENED_MODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/test/lib/Dialect/Test -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/llvm/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/include -IE:/projects/libraries/llvm-project-llvmorg-17.0.1/build-mingw64/tools/mlir/include -Wl,--stack,33554432 -Wa,-mbig-obj -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-maybe-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -O2 -DNDEBUG -std=c++17 -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj -MF tools\mlir\test\lib\Dialect\Test\CMakeFiles\MLIRTestDialect.dir\TestDialect.cpp.obj.d -o tools/mlir/test/lib/Dialect/Test/CMakeFiles/MLIRTestDialect.dir/TestDialect.cpp.obj -c E:/projects/libraries/llvm-project-llvmorg-17.0.1/mlir/test/lib/Dialect/Test/TestDialect.cpp may the antidote just around the corner, but lacking of the further study. |
Hi community,
I'm able to compile
clang;clang-tools-extra;compiler-rt;lld
succefully. However if I addflang
to the list I bump into the following problem: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 buildingRelease
.Any suggestion on that?
KR,
Thomas
The text was updated successfully, but these errors were encountered: