public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "brechtsanders at users dot sourceforge.net" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c/98729] New: GCC 11 MinGW Windows build doesn't generate working PE executables Date: Mon, 18 Jan 2021 14:29:35 +0000 [thread overview] Message-ID: <bug-98729-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98729 Bug ID: 98729 Summary: GCC 11 MinGW Windows build doesn't generate working PE executables Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: brechtsanders at users dot sourceforge.net Target Milestone: --- Created attachment 49994 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49994&action=edit Invalid Windows .exe PE file When I try to build GCC 11 for MinGW (using MinGW-w64 8.0.0) configure fails (on both 32-bit and 64-bit) when it's trying to test if it can run a compiled .exe file. When I replicate this command with: `echo "int main () { return 0; }" | /R/winlibs64_stage/gcc-11-20210117/build_mingw/./gcc/xgcc -B/R/winlibs64_stage/gcc-11-20210117/build_mingw/./gcc/ -L/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/lib -L/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/mingw/lib -isystem /R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/include -isystem /R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/mingw/include -B/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/bin/ -B/R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/lib/ -isystem /R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/include -isystem /R/winlibs64_stage/inst_gcc-11-20210117/share/gcc/x86_64-w64-mingw32/sys-include --sysroot=/R/winlibs64_stage/gcc-11-20210117/build_mingw/mingw-w64 -o conftest.exe -g -O2 -xc -` it builds `conftest.exe`, but running it (fro MSYS2 bash shell) with `conftest.exe` fails with error `bash: ./conftest.exe: cannot execute binary file: Exec format error`, or when I run it from Windows or Command prompt it pops up a message saying `This app can't run on your PC`. The command `file conftest.exe` does return `conftest.exe: PE32+ executable (console) x86-64, for MS Windows`. I have attached this file.
next reply other threads:[~2021-01-18 14:29 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-18 14:29 brechtsanders at users dot sourceforge.net [this message] 2021-01-18 14:32 ` [Bug c/98729] " brechtsanders at users dot sourceforge.net 2021-01-18 16:40 ` [Bug target/98729] " pinskia at gcc dot gnu.org 2021-01-18 17:16 ` brechtsanders at users dot sourceforge.net 2021-01-19 7:38 ` [Bug target/98729] [11 Regression] " rguenth at gcc dot gnu.org 2021-01-19 7:41 ` rguenth at gcc dot gnu.org 2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net 2021-01-19 19:06 ` brechtsanders at users dot sourceforge.net 2021-01-20 9:23 ` brechtsanders at users dot sourceforge.net 2021-01-20 12:40 ` brechtsanders at users dot sourceforge.net 2021-02-01 17:39 ` ebotcazou at gcc dot gnu.org 2021-02-02 8:51 ` brechtsanders at users dot sourceforge.net 2021-02-02 12:05 ` ebotcazou at gcc dot gnu.org 2021-02-09 20:21 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-98729-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).