I’m trying to compile GCC 13.2.0 using MinGW-w64 on Windows, but I encounter the following error during the build process:
make[3]: Entering directory '/d/Develop/devtool/gcc/gcc-13.2.0/build/gcc'
g++ -std=c++11 -no-pie -g -D__USE_MINGW_ACCESS -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -static-libstdc++ -static-libgcc -Wl,--stack,12582912 -Wl,--undefined=HOST_EXTRA_OBJS_SYMBOL -o cc1.exe c/c-lang.o c-family/stub-objc.o attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o c/c-fold.o c/gimple-parser.o c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o c-family/c-format.o c-family/c-gimplify.o c-family/c-indentation.o c-family/c-lex.o c-family/c-omp.o c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o c-family/c-ubsan.o c-family/known-headers.o c-family/c-attribs.o c-family/c-warn.o c-family/c-spellcheck.o i386-c.o winnt-c.o msformat-c.o
cc1-checksum.o libbackend.a main.o libcommon-target.a libcommon.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a ../libcpp/libcpp.a -lintl -liconv ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -L/d/Develop/devtool/gcc/gcc-13.2.0/build/./isl/.libs -lisl -L/d/Develop/devtool/gcc/gcc-13.2.0/build/./gmp/.libs -L/d/Develop/devtool/gcc/gcc-13.2.0/build/./mpfr/src/.libs -L/d/Develop/devtool/gcc/gcc-13.2.0/build/./mpc/src/.libs -lmpc -lmpfr -lgmp -Wl,--export-all-symbols -Wl,--out-implib=cc1.exe.a -L./../zlib -lz -lzstd
D:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: error: export ordinal too large: 77583
collect2.exe: error: ld returned 1 exit status
make[3]: *** [../../gcc/c/Make-lang.in:87: cc1.exe] Error 1
make[3]: Leaving directory '/d/Develop/devtool/gcc/gcc-13.2.0/build/gcc'
make[2]: *** [Makefile:4988: all-stage1-gcc] Error 2
make[2]: Leaving directory '/d/Develop/devtool/gcc/gcc-13.2.0/build'
make[1]: *** [Makefile:27677: stage1-bubble] Error 2
make[1]: Leaving directory '/d/Develop/devtool/gcc/gcc-13.2.0/build'
make: *** [Makefile:1099: all] Error 2
It seems like the linker is having trouble with an “export ordinal too large” error. I’ve tried searching for a solution but haven’t found anything that resolves this issue.
Here are some details about my environment:
- OS: Windows 11
- GCC Version: 13.2.0
- MinGW-w64 Version: Latest
- MSYS2 Version: 3.4.9-2
Has anyone encountered this issue before or have any suggestions on how to fix it?
Thanks in advance!