Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 685172 - =app-emulation/wine-vanilla-4.7-r1 fails to build if i686-w64-mingw32-gcc cross-compiler is present: /usr/libexec/gcc/i686-w64-mingw32/ld: unrecognized option '--hash-style=gnu'
Summary: =app-emulation/wine-vanilla-4.7-r1 fails to build if i686-w64-mingw32-gcc cro...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Wine Maintainers
URL:
Whiteboard:
Keywords: PATCH, REGRESSION
Depends on:
Blocks:
 
Reported: 2019-05-06 08:28 UTC by Sergei Trofimovich (RETIRED)
Modified: 2019-05-12 14:13 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
app-emulation:wine-vanilla-4.7-r1:20190506-081523.log.bz2 (app-emulation:wine-vanilla-4.7-r1:20190506-081523.log.bz2,53.62 KB, application/x-bzip)
2019-05-06 08:28 UTC, Sergei Trofimovich (RETIRED)
Details
emerge --info (emerge--info.log,19.66 KB, text/x-log)
2019-05-06 08:31 UTC, Sergei Trofimovich (RETIRED)
Details
build log (build.log.bz2,92.92 KB, application/x-bzip)
2019-05-10 17:24 UTC, Thomas Capricelli
Details
0001-app-emulation-wine-vanilla-disable-automagic-mingw-d.patch (0001-app-emulation-wine-vanilla-disable-automagic-mingw-d.patch,1.19 KB, patch)
2019-05-10 22:13 UTC, Sergei Trofimovich (RETIRED)
Details | Diff
wine-overlay-0001-app-emulation-wine-any-d3d-staging-vanilla-disable-a.patch (wine-overlay-0001-app-emulation-wine-any-d3d-staging-vanilla-disable-a.patch,4.54 KB, patch)
2019-05-11 22:46 UTC, Sergei Trofimovich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-06 08:28:53 UTC
Created attachment 575386 [details]
app-emulation:wine-vanilla-4.7-r1:20190506-081523.log.bz2

Previous wine-vanilla versions used to just work. Last successful builds/versions:

$ qlop -lu wine-vanilla
...
Sun Mar 17 02:49:57 2019 >>> app-emulation/wine-vanilla-4.4
Sun Mar 17 03:50:32 2019 <<< app-emulation/wine-vanilla-4.1
Mon Apr 29 04:33:26 2019 >>> app-emulation/wine-vanilla-4.6-r1
Mon Apr 29 05:31:53 2019 <<< app-emulation/wine-vanilla-4.4

Host's LDFLAGS leak into cross-compiler unfiltered and fail the build as:

/usr/libexec/gcc/i686-w64-mingw32/ld: unrecognized option '--hash-style=gnu'
/usr/libexec/gcc/i686-w64-mingw32/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
winegcc: i686-w64-mingw32-gcc failed
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-06 08:31:39 UTC
Created attachment 575388 [details]
emerge --info
Comment 2 Thomas Capricelli 2019-05-10 17:23:03 UTC

Hi.

I'm not sure this is the same problem, but is sure looks similar. I have successfully emerged wine-vanilla for years, but now app-emulation/wine-vanilla-4.7-r1 fails with :

mingw32-gcc: error: unrecognized command line option ‘-municode’

I indeed have a mingw32 cross-compiler installed on the system.

orzel@berlioz /home/orzel% gcc-config  -l 
...
 [4] mingw32-7.3.0 *



last emerges of wine-vanilla :
...
Fri Feb 22 01:51:20 2019 <<< app-emulation/wine-vanilla-3.21
Mon Apr  8 02:21:40 2019 >>> app-emulation/wine-vanilla-4.5
Wed Apr 17 21:08:51 2019 >>> app-emulation/wine-vanilla-4.6-r1
Wed May  8 18:37:42 2019 <<< app-emulation/wine-vanilla-4.1
Wed May  8 18:37:55 2019 <<< app-emulation/wine-vanilla-4.6-r1
Wed May  8 18:38:05 2019 <<< app-emulation/wine-vanilla-4.5
Comment 3 Thomas Capricelli 2019-05-10 17:24:00 UTC
Created attachment 575662 [details]
build log
Comment 4 Thomas Capricelli 2019-05-10 21:37:12 UTC
The problem seems specific to 4.7. I can do

    emerge wine-vanilla:4.6

with success. 
And previous versions were ok too (see my previous list). I've always had the mingw32 cross compiler installled.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-10 22:12:47 UTC
Looks like ./configure now accepts --without-mingw to disable mingw autodetection. The following patch helped be to restore wine:

--- a/app-emulation/wine-vanilla/wine-vanilla-4.7-r1.ebuild
+++ b/app-emulation/wine-vanilla/wine-vanilla-4.7-r1.ebuild
@@ -387,6 +387,7 @@ multilib_src_configure() {
                $(use_with jpeg)
                $(use_with kerberos krb5)
                $(use_with ldap)
+               --without-mingw # linux LDFLAGS leak in mingw32: bug #685172
                $(use_enable mono mscoree)
                $(use_with mp3 mpg123)
                $(use_with netapi)
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-10 22:13:09 UTC
Created attachment 575984 [details, diff]
0001-app-emulation-wine-vanilla-disable-automagic-mingw-d.patch
Comment 7 Nick Sarnie gentoo-dev 2019-05-10 22:14:11 UTC
@Slyfox, please feel free to push that change to wine.git and then copy it over to gentoo.git
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-11 22:46:03 UTC
Created attachment 576084 [details, diff]
wine-overlay-0001-app-emulation-wine-any-d3d-staging-vanilla-disable-a.patch
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2019-05-11 22:47:15 UTC
git+ssh://git@git.gentoo.org/repo/proj/wine.git rejected is as:

  wine $ git push origin master 

  FATAL -- ACCESS DENIED
  Repo            repo/proj/wine                                              
  User            slyfox@gentoo.org                                           
  Stage           Before git was called                                       
  Operation       Repo write                                                  

  FATAL: W any repo/proj/wine slyfox@gentoo.org DENIED by fallthru (or you mis-spelled the reponame)

Attached wine-overlay-0001-app-emulation-wine-any-d3d-staging-vanilla-disable-a.patch against the overlay.
Comment 10 Nick Sarnie gentoo-dev 2019-05-12 14:04:00 UTC
No idea why that is, thanks for trying. About to push it myself
Comment 11 Larry the Git Cow gentoo-dev 2019-05-12 14:07:04 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/proj/wine.git/commit/?id=af137bb33c19fbe823405bb0036281dd6de39049

commit af137bb33c19fbe823405bb0036281dd6de39049
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2019-05-11 22:42:53 +0000
Commit:     Nick Sarnie <sarnex@gentoo.org>
CommitDate: 2019-05-12 14:06:25 +0000

    app-emulation/wine{-any,-d3d,-staging,-vanilla,}: disable automagic mingw detection, bug #685172
    
    wine-4.7 now detects mingw presence when possible. Unfortunately LDFLAGS
    filtering does not happen and wine build fails as:
        /usr/libexec/gcc/i686-w64-mingw32/ld: unrecognized option '--hash-style=gnu'
    
    The fix is to disable with '--without-mingw' configure option.
    
    Bug: https://bugs.gentoo.org/685172
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Signed-off-by: Nick Sarnie <sarnex@gentoo.org>

 app-emulation/wine-any/wine-any-9999.ebuild           | 1 +
 app-emulation/wine-d3d9/wine-d3d9-9999.ebuild         | 1 +
 app-emulation/wine-staging/wine-staging-4.7-r1.ebuild | 1 +
 app-emulation/wine-staging/wine-staging-9999.ebuild   | 1 +
 app-emulation/wine-vanilla/wine-vanilla-4.7-r1.ebuild | 1 +
 app-emulation/wine-vanilla/wine-vanilla-9999.ebuild   | 1 +
 app-emulation/wine/wine-9999.ebuild                   | 1 +
 7 files changed, 7 insertions(+)
Comment 12 Larry the Git Cow gentoo-dev 2019-05-12 14:13:15 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0fe7ef6493419b7b83401d959b2c887d4f7515ca

commit 0fe7ef6493419b7b83401d959b2c887d4f7515ca
Author:     Nick Sarnie <sarnex@gentoo.org>
AuthorDate: 2019-05-12 14:09:22 +0000
Commit:     Nick Sarnie <sarnex@gentoo.org>
CommitDate: 2019-05-12 14:12:38 +0000

    app-emulation/wine-vanilla: Sync with ::wine
    
    Fixes: https://bugs.gentoo.org/685172
    Package-Manager: Portage-2.3.66, Repoman-2.3.12
    Signed-off-by: Nick Sarnie <sarnex@gentoo.org>

 app-emulation/wine-vanilla/wine-vanilla-4.7-r1.ebuild | 1 +
 app-emulation/wine-vanilla/wine-vanilla-4.8.ebuild    | 1 +
 app-emulation/wine-vanilla/wine-vanilla-9999.ebuild   | 1 +
 3 files changed, 3 insertions(+)