Cross-compiling via MinGW with wine-binfmt: Cannot determine executable suffix

John Scott jscott at posteo.net
Sat Jul 25 19:14:48 UTC 2020


Hello,

With Wine's binfmt support installed, which should enable running the checks
among other things, it seems like ./configure gets confused regardless of
whether I do a normal cross-compile, or fool configure to think
host=build=mingw.

Other projects seem to handle this okay (tried with cURL), so I think GMP's
script might be the problem. I've attached my config.log. At first it prints:
configure:9176: checking for suffix of executables
configure:9183: x86_64-w64-mingw32-gcc -o conftest.exe -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8   conftest.c  >&5
configure:9187: $? = 0
configure:9209: result: .exe
configure:9231: checking whether we are cross compiling
configure:9239: x86_64-w64-mingw32-gcc -o conftest.exe -O2 -pedantic -fomit-frame-pointer -m64 -mtune=k8 -march=k8   conftest.c  >&5
configure:9243: $? = 0
configure:9250: ./conftest.exe
configure:9254: $? = 0
configure:9242: result: no

But later it keeps invoking gcc, with explicit output filenames, but only
checks for ./conftest without an extension each time:
configure:9955: checking build system compiler x86_64-w64-mingw32-gcc
configure:9968: x86_64-w64-mingw32-gcc conftest.c
configure:9971: $? = 0
./configure: line 9973: ./a.out: No such file or directory
./configure: line 9973: ./b.out: No such file or directory
configure:9978: result: yes
configure:9997: checking for build system preprocessor
configure:10008: x86_64-w64-mingw32-gcc -E conftest.c
# 1 "conftest.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "conftest.c"
configure:10011: $? = 0
configure:10026: result: x86_64-w64-mingw32-gcc -E
configure:10033: checking for build system executable suffix
configure:10047: x86_64-w64-mingw32-gcc conftest.c -o conftest.exe
configure:10050: $? = 0
./configure: line 10052: ./conftest: No such file or directory
configure:10047: x86_64-w64-mingw32-gcc conftest.c -o conftest,ff8
configure:10050: $? = 0
./configure: line 10052: ./conftest: No such file or directory
configure:10047: x86_64-w64-mingw32-gcc conftest.c -o conftest
configure:10050: $? = 0
./configure: line 10052: ./conftest: No such file or directory
configure:10060: error: Cannot determine executable suffix

I'm on Debian Bullseye, everything using GCC 10.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: text/x-log
Size: 25108 bytes
Desc: not available
URL: <https://gmplib.org/list-archives/gmp-discuss/attachments/20200725/4ca1c3af/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: This is a digitally signed message part.
URL: <https://gmplib.org/list-archives/gmp-discuss/attachments/20200725/4ca1c3af/attachment-0003.bin>


More information about the gmp-discuss mailing list