Bug 1722489 - i686-w64-mingw32-gcc adds ".exe" to "-o" option
Summary: i686-w64-mingw32-gcc adds ".exe" to "-o" option
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: mingw-gcc
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kalev Lember
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1675390
TreeView+ depends on / blocked
 
Reported: 2019-06-20 13:09 UTC by Tim Landscheidt
Modified: 2019-11-14 10:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-14 10:10:07 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Tim Landscheidt 2019-06-20 13:09:31 UTC
mingw-wine-gecko FTBFS due to a autoconf 2.13 macro that compiles some dummy code and then checks if the file specified by the "-o" option exists.  However, with mingw32-gcc-9.1.1-1.fc31.x86_64 (and others), this fails due to (paraphrased):

| [tim@passepartout /tmp/tmp.NE6gJYGSNC]$ echo 'main(){return(0);}' | i686-w64-mingw32-gcc -o conftest -x c -
| <stdin>:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
| [tim@passepartout /tmp/tmp.NE6gJYGSNC]$ ls -l
| insgesamt 80
| -rwxrwxr-x. 1 tim tim 80847 20. Jun 13:01 conftest.exe
| [tim@passepartout /tmp/tmp.NE6gJYGSNC]$

Note: The "-o" option specifies as output "conftest", but the executable is created as "conftest.exe".

Looking at the man page for i686-w64-mingw32-gcc describing the "-o" option:

|        -o file
|            Place output in file file.  This applies to
|            whatever sort of output is being produced,
|            whether it be an executable file, an object
|            file, an assembler file or preprocessed C code.

|            If -o is not specified, the default is to put
|            an executable file in a.out, the object file
|            for source.suffix in source.o, its assembler
|            file in source.s, a precompiled header file in
|            source.suffix.gch, and all preprocessed C
|            source on standard output.

this appears to be a bug.

"echo 'main(){return(0);}' | i686-w64-mingw32-gcc -o conftest -x c -" should create the file "conftest" (without ".exe").

Comment 1 Tim Landscheidt 2019-06-20 18:56:37 UTC
This is a regression compared to Fedora 28 ("mock -r fedora-28-x86_64 --init && mock -r fedora-28-x86_64 --install mingw32-gcc && mock -r fedora-28-x86_64 --shell"):

| [root@f3613709ae264548beb5f4baec1a73ac /]# echo 'main(){return(0);}' | i686-w64-mingw32-gcc -o conftest -x c -
| <stdin>:1:1: warning: return type defaults to 'int' [-Wimplicit-int]
| [root@f3613709ae264548beb5f4baec1a73ac /]# ls -l conftest*
| -rwxr-xr-x. 1 root root 77775 Jun 20 18:52 conftest
| [root@22ed8810f3794e1786a5b43ec483fd70 /]# rpm -q mingw32-gcc
| mingw32-gcc-7.3.0-1.fc28.x86_64
| [root@f3613709ae264548beb5f4baec1a73ac /]#

Comment 2 Sandro Mani 2019-08-30 07:42:07 UTC
There are $(EXE) variables throughout those autoconf scripts, but looks like they remain empty instead of containing .exe. It would make more sense that EXE is assigned accordingly than to have the cross-compiler create windows binaries without .exe extension?

Comment 3 Ben Cotton 2019-10-31 18:53:52 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Sandro Mani 2019-11-14 10:10:07 UTC
I believe the parent issue about the mingw-wine-gecko FTBFS is now fixed, and I don't believe there is anything to be done here.


Note You need to log in before you can comment on or make changes to this bug.