Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800809 - app-emulation/wine-vanilla-6.12 fails to build with LDFLAGS=-Wl,--defsym=__gentoo_check_ldflags__=0
Summary: app-emulation/wine-vanilla-6.12 fails to build with LDFLAGS=-Wl,--defsym=__ge...
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: https://bugs.winehq.org/show_bug.cgi?...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2021-07-06 08:33 UTC by Sergei Trofimovich (RETIRED)
Modified: 2021-07-16 23:22 UTC (History)
0 users

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


Attachments
0001-Revert-winegcc-Support-Wl-foo-.-style-linker-options.patch (0001-Revert-winegcc-Support-Wl-foo-.-style-linker-options.patch,1.10 KB, patch)
2021-07-06 08:34 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 2021-07-06 08:33:40 UTC
Reported upstream as https://bugs.winehq.org/show_bug.cgi?id=51413

Build fails as:

    # LDFLAGS=-Wl,--defsym=__gentoo_check_ldflags__=0 emerge -v1 =app-emulation/wine-vanilla-6.12

tools/winegcc/winegcc -o dlls/acledit/acledit.dll.so --wine-objdir . -fno-PIC -Wl,-z,notext -fasynchronous-unwind-tables   -shared /tmp/portage/app-emulation/wine-vanilla-6.12/work/wine-6.12/dlls/acledit/acledit.spec   -mno-cygwin -Wb,--prefer-native dlls/acledit/main.o dlls/ucrtbase/libucrtbase.a -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--defsym=__gentoo_check_ldflags__=0

/usr/lib/gcc/x86_64-pc-linux-gnu/12.0.0/../../../../x86_64-pc-linux-gnu/bin/ld:--defsym:0: syntax error
collect2: error: ld returned 1 exit status
winegcc: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc failed

Reverting upstream commit seems to help:

commit fcda0afdd429e11d75dc61f628e40a6c8973ce44
Author: Connor Abbott <cwabbott0@gmail.com>
Date:   Fri Jul 2 11:48:01 2021 +0200

    winegcc: Support -Wl,foo=... style linker options.

    In particular meson uses -Wl,--out-implib=...

    Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
    Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2021-07-06 08:34:00 UTC
Created attachment 722326 [details, diff]
0001-Revert-winegcc-Support-Wl-foo-.-style-linker-options.patch
Comment 2 Nick Sarnie gentoo-dev 2021-07-06 17:51:27 UTC
Would you be willing to make a PR :)?
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2021-07-06 22:57:15 UTC
Sure: https://github.com/gentoo/gentoo/pull/21544

I thought there is a more involved process getting patches into Gentoo's wine-vanilla patchset.
Comment 4 Sebastian Pipping gentoo-dev 2021-07-15 12:31:58 UTC
(In reply to Sergei Trofimovich from comment #0)
> Reverting upstream commit seems to help:
> 
> commit fcda0afdd429e11d75dc61f628e40a6c8973ce44
> Author: Connor Abbott <cwabbott0@gmail.com>
> Date:   Fri Jul 2 11:48:01 2021 +0200
> 
>     winegcc: Support -Wl,foo=... style linker options.
> 
>     In particular meson uses -Wl,--out-implib=...
> 
>     Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
>     Signed-off-by: Alexandre Julliard <julliard@winehq.org>

Great research, very nice!
Comment 5 Larry the Git Cow gentoo-dev 2021-07-16 23:22:36 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6419b3e65443b6d29c77c3ad45adb2820e0c51e3

commit 6419b3e65443b6d29c77c3ad45adb2820e0c51e3
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-07-12 18:33:08 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-07-16 23:22:34 +0000

    app-emulation/wine-staging: revert winegcc '=' parameter handling
    
    LDFLAGS=-Wl,--defsym=__gentoo_check_ldflags__=0 causes
    app-emulation/wine-staging-6.12 build failures in form of:
    
    ```
    tools/winegcc/winegcc -o dlls/acledit/acledit.dll.so ... \
        -Wl,--defsym=__gentoo_check_ldflags__=0
    
    ld:--defsym:0: syntax error
    collect2: error: ld returned 1 exit status
    winegcc: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc failed
    ```
    
    The change is a revert of upstream commit fcda0afd
    ("winegcc: Support -Wl,foo=... style linker options.")
    
    Bug: https://bugs.winehq.org/show_bug.cgi?id=51413
    Closes: https://bugs.gentoo.org/800809
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../files/wine-staging-6.12-winegcc-equals-args.patch       | 13 +++++++++++++
 app-emulation/wine-staging/wine-staging-6.12.ebuild         |  1 +
 2 files changed, 14 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3baf5a5158b264648f59c99c172a8bb3c9b92fe7

commit 3baf5a5158b264648f59c99c172a8bb3c9b92fe7
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-07-06 22:31:19 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-07-16 23:22:34 +0000

    app-emulation/wine-vanilla: revert winegcc '=' parameter handling
    
    LDFLAGS=-Wl,--defsym=__gentoo_check_ldflags__=0 causes
    wine-vanilla-6.12 build failures in form of:
    
    ```
    tools/winegcc/winegcc -o dlls/acledit/acledit.dll.so ... \
        -Wl,--defsym=__gentoo_check_ldflags__=0
    
    ld:--defsym:0: syntax error
    collect2: error: ld returned 1 exit status
    winegcc: /usr/lib/ccache/bin/x86_64-pc-linux-gnu-gcc failed
    ```
    
    The change is a revert of upstream commit fcda0afd
    ("winegcc: Support -Wl,foo=... style linker options.")
    
    Bug: https://bugs.winehq.org/show_bug.cgi?id=51413
    Closes: https://bugs.gentoo.org/800809
    Package-Manager: Portage-3.0.20, Repoman-3.0.3
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
    Closes: https://github.com/gentoo/gentoo/pull/21618
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../files/wine-vanilla-6.12-winegcc-equals-args.patch       | 13 +++++++++++++
 app-emulation/wine-vanilla/wine-vanilla-6.12.ebuild         |  1 +
 2 files changed, 14 insertions(+)