Im trying to compile mingw64 GCC 11.2 on Gentoo Linux using crossdev. I'm encountering a build error. Here is a snippet of the error. full log attached.
checking for gettimeofday... checking sys/time.h usability... libtool: compile: /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/ -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath -I /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/../include -g -O2 -MT printf/quadmath-printf.lo -MD -MP -MF printf/.deps/quadmath-printf.Tpo -c /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/printf/quadmath-printf.c -o printf/quadmath-printf.o >/dev/null 2>&1 libtool: compile: /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/ -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath -I /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/../include -g -O2 -MT printf/mul_n.lo -MD -MP -MF printf/.deps/mul_n.Tpo -c /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/printf/mul_n.c -o printf/mul_n.o >/dev/null 2>&1 libtool: link: /usr/libexec/gcc/x86_64-w64-mingw32/ar rc .libs/libatomic.a gload.o gstore.o gcas.o gexch.o glfree.o lock.o init.o fenv.o fence.o flag.o load_1_.o store_1_.o cas_1_.o exch_1_.o fadd_1_.o fsub_1_.o fand_1_.o fior_1_.o fxor_1_.o fnand_1_.o tas_1_.o load_2_.o store_2_.o cas_2_.o exch_2_.o fadd_2_.o fsub_2_.o fand_2_.o fior_2_.o fxor_2_.o fnand_2_.o tas_2_.o load_4_.o store_4_.o cas_4_.o exch_4_.o fadd_4_.o fsub_4_.o fand_4_.o fior_4_.o fxor_4_.o fnand_4_.o tas_4_.o load_8_.o store_8_.o cas_8_.o exch_8_.o fadd_8_.o fsub_8_.o fand_8_.o fior_8_.o fxor_8_.o fnand_8_.o tas_8_.o load_16_.o store_16_.o cas_16_.o exch_16_.o fadd_16_.o fsub_16_.o fand_16_.o fior_16_.o fxor_16_.o fnand_16_.o tas_16_.o libtool: link: /usr/libexec/gcc/x86_64-w64-mingw32/ranlib .libs/libatomic.a yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for gettimeofday... yes checking for clock_gettime... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES. make[1]: *** [Makefile:11774: configure-target-libstdc++-v3] Error 1 make[1]: *** Waiting for unfinished jobs.... libtool: link: ( cd ".libs" && rm -f "libatomic.la" && ln -s "../libatomic.la" "libatomic.la" ) make[4]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/x86_64-w64-mingw32/libatomic' make[3]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/x86_64-w64-mingw32/libatomic' make[2]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/x86_64-w64-mingw32/libatomic' libtool: compile: /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/ -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath -I /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/../include -g -O2 -MT printf/printf_fphex.lo -MD -MP -MF printf/.deps/printf_fphex.Tpo -c /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/printf/printf_fphex.c -o printf/printf_fphex.o >/dev/null 2>&1 libtool: compile: /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/ -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath -I /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/../include -g -O2 -MT printf/printf_fp.lo -MD -MP -MF printf/.deps/printf_fp.Tpo -c /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/printf/printf_fp.c -o printf/printf_fp.o >/dev/null 2>&1 libtool: compile: /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/ -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath -I /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/../include -g -O2 -MT strtod/strtoflt128.lo -MD -MP -MF strtod/.deps/strtoflt128.Tpo -c /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/strtod/strtoflt128.c -o strtod/strtoflt128.o >/dev/null 2>&1 /bin/bash ./libtool --tag=CC --mode=link /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/ -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -g -O2 -version-info `grep -v '^#' /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/gcc-11.2.0/libquadmath/libtool-version` -no-undefined -bindir "/usr/x86_64-w64-mingw32/lib/../lib" -lm -o libquadmath.la -rpath /usr/x86_64-w64-mingw32/lib/../lib math/x2y2m1q.lo math/acoshq.lo math/fmodq.lo math/acosq.lo math/frexpq.lo math/rem_pio2q.lo math/asinhq.lo math/hypotq.lo math/remainderq.lo math/asinq.lo math/rintq.lo math/atan2q.lo math/isinfq.lo math/roundq.lo math/atanhq.lo math/isnanq.lo math/scalblnq.lo math/atanq.lo math/j0q.lo math/scalbnq.lo math/cbrtq.lo math/j1q.lo math/signbitq.lo math/ceilq.lo math/jnq.lo math/sincos_table.lo math/complex.lo math/ldexpq.lo math/sincosq.lo math/copysignq.lo math/lgammaq.lo math/sincosq_kernel.lo math/coshq.lo math/llroundq.lo math/sinhq.lo math/cosq.lo math/log10q.lo math/sinq.lo math/cosq_kernel.lo math/log1pq.lo math/sinq_kernel.lo math/erfq.lo math/logq.lo math/sqrtq.lo math/expm1q.lo math/lroundq.lo math/tanhq.lo math/expq.lo math/modfq.lo math/tanq.lo math/fabsq.lo math/nanq.lo math/tgammaq.lo math/finiteq.lo math/nextafterq.lo math/truncq.lo math/floorq.lo math/powq.lo math/fmaq.lo math/logbq.lo math/exp2q.lo math/issignalingq.lo math/lgammaq_neg.lo math/lgammaq_product.lo math/tanq_kernel.lo math/tgammaq_product.lo math/casinhq_kernel.lo math/cacoshq.lo math/cacosq.lo math/casinhq.lo math/casinq.lo math/catanhq.lo math/catanq.lo math/cimagq.lo math/conjq.lo math/cprojq.lo math/crealq.lo math/fdimq.lo math/fmaxq.lo math/fminq.lo math/ilogbq.lo math/llrintq.lo math/log2q.lo math/lrintq.lo math/nearbyintq.lo math/remquoq.lo math/ccoshq.lo math/cexpq.lo math/clog10q.lo math/clogq.lo math/csinq.lo math/csinhq.lo math/csqrtq.lo math/ctanq.lo math/ctanhq.lo printf/addmul_1.lo printf/add_n.lo printf/cmp.lo printf/divrem.lo printf/flt1282mpn.lo printf/fpioconst.lo printf/lshift.lo printf/mul_1.lo printf/mul_n.lo printf/mul.lo printf/printf_fphex.lo printf/printf_fp.lo printf/quadmath-printf.lo printf/rshift.lo printf/submul_1.lo printf/sub_n.lo strtod/strtoflt128.lo strtod/mpn2flt128.lo strtod/tens_in_limb.lo libtool: link: /var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/xgcc -B/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/./gcc/ -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/mingw/include -B/usr/x86_64-w64-mingw32/bin/ -B/usr/x86_64-w64-mingw32/lib/ -isystem /usr/x86_64-w64-mingw32/include -isystem /usr/x86_64-w64-mingw32/sys-include -shared math/.libs/x2y2m1q.o math/.libs/acoshq.o math/.libs/fmodq.o math/.libs/acosq.o math/.libs/frexpq.o math/.libs/rem_pio2q.o math/.libs/asinhq.o math/.libs/hypotq.o math/.libs/remainderq.o math/.libs/asinq.o math/.libs/rintq.o math/.libs/atan2q.o math/.libs/isinfq.o math/.libs/roundq.o math/.libs/atanhq.o math/.libs/isnanq.o math/.libs/scalblnq.o math/.libs/atanq.o math/.libs/j0q.o math/.libs/scalbnq.o math/.libs/cbrtq.o math/.libs/j1q.o math/.libs/signbitq.o math/.libs/ceilq.o math/.libs/jnq.o math/.libs/sincos_table.o math/.libs/complex.o math/.libs/ldexpq.o math/.libs/sincosq.o math/.libs/copysignq.o math/.libs/lgammaq.o math/.libs/sincosq_kernel.o math/.libs/coshq.o math/.libs/llroundq.o math/.libs/sinhq.o math/.libs/cosq.o math/.libs/log10q.o math/.libs/sinq.o math/.libs/cosq_kernel.o math/.libs/log1pq.o math/.libs/sinq_kernel.o math/.libs/erfq.o math/.libs/logq.o math/.libs/sqrtq.o math/.libs/expm1q.o math/.libs/lroundq.o math/.libs/tanhq.o math/.libs/expq.o math/.libs/modfq.o math/.libs/tanq.o math/.libs/fabsq.o math/.libs/nanq.o math/.libs/tgammaq.o math/.libs/finiteq.o math/.libs/nextafterq.o math/.libs/truncq.o math/.libs/floorq.o math/.libs/powq.o math/.libs/fmaq.o math/.libs/logbq.o math/.libs/exp2q.o math/.libs/issignalingq.o math/.libs/lgammaq_neg.o math/.libs/lgammaq_product.o math/.libs/tanq_kernel.o math/.libs/tgammaq_product.o math/.libs/casinhq_kernel.o math/.libs/cacoshq.o math/.libs/cacosq.o math/.libs/casinhq.o math/.libs/casinq.o math/.libs/catanhq.o math/.libs/catanq.o math/.libs/cimagq.o math/.libs/conjq.o math/.libs/cprojq.o math/.libs/crealq.o math/.libs/fdimq.o math/.libs/fmaxq.o math/.libs/fminq.o math/.libs/ilogbq.o math/.libs/llrintq.o math/.libs/log2q.o math/.libs/lrintq.o math/.libs/nearbyintq.o math/.libs/remquoq.o math/.libs/ccoshq.o math/.libs/cexpq.o math/.libs/clog10q.o math/.libs/clogq.o math/.libs/csinq.o math/.libs/csinhq.o math/.libs/csqrtq.o math/.libs/ctanq.o math/.libs/ctanhq.o printf/.libs/addmul_1.o printf/.libs/add_n.o printf/.libs/cmp.o printf/.libs/divrem.o printf/.libs/flt1282mpn.o printf/.libs/fpioconst.o printf/.libs/lshift.o printf/.libs/mul_1.o printf/.libs/mul_n.o printf/.libs/mul.o printf/.libs/printf_fphex.o printf/.libs/printf_fp.o printf/.libs/quadmath-printf.o printf/.libs/rshift.o printf/.libs/submul_1.o printf/.libs/sub_n.o strtod/.libs/strtoflt128.o strtod/.libs/mpn2flt128.o strtod/.libs/tens_in_limb.o -L/usr/x86_64-w64-mingw32/lib -L/usr/mingw/lib -o .libs/libquadmath-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libquadmath.dll.a ../../../../../mingw64-runtime-9.0.0/work/mingw-w64-v9.0.0/mingw-w64-crt/crt/pesect.c:18:25: warning: type of '__image_base__' does not match original declaration [-Wlto-type-mismatch] ../../../../../mingw64-runtime-9.0.0/work/mingw-w64-v9.0.0/mingw-w64-crt/crt/pseudo-reloc.c:50:13: note: type 'char' should match type 'struct IMAGE_DOS_HEADER' ../../../../../mingw64-runtime-9.0.0/work/mingw-w64-v9.0.0/mingw-w64-crt/crt/pseudo-reloc.c:50:13: note: '__image_base__' was previously declared here libtool: link: /usr/libexec/gcc/x86_64-w64-mingw32/ar rc .libs/libquadmath.a math/x2y2m1q.o math/acoshq.o math/fmodq.o math/acosq.o math/frexpq.o math/rem_pio2q.o math/asinhq.o math/hypotq.o math/remainderq.o math/asinq.o math/rintq.o math/atan2q.o math/isinfq.o math/roundq.o math/atanhq.o math/isnanq.o math/scalblnq.o math/atanq.o math/j0q.o math/scalbnq.o math/cbrtq.o math/j1q.o math/signbitq.o math/ceilq.o math/jnq.o math/sincos_table.o math/complex.o math/ldexpq.o math/sincosq.o math/copysignq.o math/lgammaq.o math/sincosq_kernel.o math/coshq.o math/llroundq.o math/sinhq.o math/cosq.o math/log10q.o math/sinq.o math/cosq_kernel.o math/log1pq.o math/sinq_kernel.o math/erfq.o math/logq.o math/sqrtq.o math/expm1q.o math/lroundq.o math/tanhq.o math/expq.o math/modfq.o math/tanq.o math/fabsq.o math/nanq.o math/tgammaq.o math/finiteq.o math/nextafterq.o math/truncq.o math/floorq.o math/powq.o math/fmaq.o math/logbq.o math/exp2q.o math/issignalingq.o math/lgammaq_neg.o math/lgammaq_product.o math/tanq_kernel.o math/tgammaq_product.o math/casinhq_kernel.o math/cacoshq.o math/cacosq.o math/casinhq.o math/casinq.o math/catanhq.o math/catanq.o math/cimagq.o math/conjq.o math/cprojq.o math/crealq.o math/fdimq.o math/fmaxq.o math/fminq.o math/ilogbq.o math/llrintq.o math/log2q.o math/lrintq.o math/nearbyintq.o math/remquoq.o math/ccoshq.o math/cexpq.o math/clog10q.o math/clogq.o math/csinq.o math/csinhq.o math/csqrtq.o math/ctanq.o math/ctanhq.o printf/addmul_1.o printf/add_n.o printf/cmp.o printf/divrem.o printf/flt1282mpn.o printf/fpioconst.o printf/lshift.o printf/mul_1.o printf/mul_n.o printf/mul.o printf/printf_fphex.o printf/printf_fp.o printf/quadmath-printf.o printf/rshift.o printf/submul_1.o printf/sub_n.o strtod/strtoflt128.o strtod/mpn2flt128.o strtod/tens_in_limb.o libtool: link: /usr/libexec/gcc/x86_64-w64-mingw32/ranlib .libs/libquadmath.a libtool: link: ( cd ".libs" && rm -f "libquadmath.la" && ln -s "../libquadmath.la" "libquadmath.la" ) make[3]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/x86_64-w64-mingw32/libquadmath' make[2]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build/x86_64-w64-mingw32/libquadmath' make[1]: Leaving directory '/var/tmp/portage/cross-x86_64-w64-mingw32/gcc-11.2.0/work/build' make: *** [Makefile:960: all] Error 2
As I was debugging this to make sure its not an issue on my mind, i compiled normal GCC with default flags. then did the same for mingw64 GCC, but got a different error about graphite. i have it disabled for both normal GCC and mingw64 GCC, and it still seems to try and enable graphite specific build instructions.
error from this log.
Did you build with the in tree zlib?
On Thu, Aug 26, 2021, 11:08 Vincent Grande shoober420@users.sourceforge.net
wrote:
No, I'm compiling with my system zlib, as thats how Gentoo seems to do it.
https://github.com/gentoo/gentoo/blob/master/eclass/toolchain.eclass
The real error is at:
checking for clock_gettime... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.
Start with a minimal compiler, only with C/C++, disable everything else and start debugging from there.
So I compiled my system GCC with all default flags, except "pie" and "openmp", which are force enabled on my Gentoo profile. Meaning only "pie", "cxx", and "openmp" are enabled for the system GCC. That compiled fine. Then I tried to compile mingw64 GCC against this GCC, and it still errors out. It appears to need ZSTD compression, although I disabled it for both the system GCC and mingw64 GCC.
Paste the full error you are getting
On Thu, Aug 26, 2021, 03:38 Vincent Grande shoober420@users.sourceforge.net
wrote:
Related
Bugs: #914
Here is a snippet of the error I get when compiling with all default flags.
I was able to force disable the "pie" and "openmp" flags on the system GCC, but this has no effect on how mingw64 GCC builds. It looks like the same error, even with only the cxx (c++) flag enabled. The system GCC builds perfectly fine with any build flag, this only effects mingw64 GCC.
Same error as above about ZSTD compression.
This turned out to be a bug on my end with my configuration fortunately. Sorry for the confusion. I dont see were to close this issue so i cant do it.
Last edit: Vincent Grande 2021-09-04