https://bugs.winehq.org/show_bug.cgi?id=40830
Bug ID: 40830 Summary: Conflict between kVK_RightCommand and macOS 10.12 Sierra in carbon framework Product: Wine Version: 1.9.12 Hardware: x86-64 OS: Mac OS X Status: UNCONFIRMED Severity: major Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: alexander@neilson.net.nz
Apple has added kVK_RightCommand to macOS Sierra as in the first developer beta [0]. Wine 1.9.12 fails to build through Homebrew (Not tried standalone or in MacPorts) throwing an error during build [1].
It appears that Wine added specifically this matcher to the carbon frameworks as Apple had failed to provide a default call differentiating between left and right control on the platform.
This will probably need a case test to see if the enumerator already exists on the platform and then skip defining it inside Wine's build process. Or possibly just check for version and if >=10.12 then skip that. Not sure what is preferred as the approach.
[0] - https://developer.apple.com/library/prerelease/content/releasenotes/Miscella... [1] - cocoa_window.m:48:5: error: redefinition of enumerator 'kVK_RightCommand' kVK_RightCommand = 0x36, /* Invented for Wine; was unused */ ^ /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/Headers/Events.h:276:3: note: previous definition is here kVK_RightCommand = 0x36, ^ 1 error generated. make[1]: *** [cocoa_window.o] Error 1 make: *** [dlls/winemac.drv] Error 2
Apologies if this is not formatted correctly.
Regards Alexander
https://bugs.winehq.org/show_bug.cgi?id=40830
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ken@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=40830
--- Comment #1 from Alexander Neilson alexander@neilson.net.nz --- Created attachment 54793 --> https://bugs.winehq.org/attachment.cgi?id=54793 Partial patch as a case test for kVK_RightCommand enum only in pre 10.12 version
https://bugs.winehq.org/show_bug.cgi?id=40830
--- Comment #2 from Alexander Neilson alexander@neilson.net.nz --- Assuming we already define the version numbers for macOS elseware (or later add it in here) then possibly the following patch may be a starting point.
Please note I am no significant developer and my experience is not in system coding here so this change proposal is probably incomplete and needs more involvement. I am simply putting it here to hopefully help start some work towards integrating the code to fix this.
See: Runtime Version Check on the following: https://developer.apple.com/library/prerelease/content/releasenotes/AppKit/R...
https://bugs.winehq.org/show_bug.cgi?id=40830
--- Comment #3 from Ken Thomases ken@codeweavers.com --- Created attachment 54821 --> https://bugs.winehq.org/attachment.cgi?id=54821 Patch to fix building against macOS 10.12 SDK
Thanks for reporting this. I find it kind of funny that Apple updated Carbon after all of these years and it breaks building of Wine.
On the other hand, it seems I guessed well when I picked the unused value to assign to the invented symbol, which is good.
Your patch won't work. You can't put an "if" statement at the top level scope (outside of any function) like that. Also, the conflict is a build-time problem, while checking NSAppKitVersionNumber is a run-time thing. It happens too late to be useful.
Please try the patch I'm attaching and let me know if it fixes things. I'm not yet in a position to test it myself.
https://bugs.winehq.org/show_bug.cgi?id=40830
--- Comment #4 from Alexander Neilson alexander@neilson.net.nz --- @ken
Thank you for this patch and helping me to understand where in the flow I am working on and how to implement such a change.
This patch appears to resolve this particular issue. I have now run into a further build failure later in the process. I will investigate and try and come up with a more complete patch for build failures under 10.12.
Regards Alexander
https://bugs.winehq.org/show_bug.cgi?id=40830
--- Comment #5 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Alexander Neilson from comment #4)
This patch appears to resolve this particular issue. I have now run into a further build failure later in the process. I will investigate and try and come up with a more complete patch for build failures under 10.12.
Thanks for testing the patch, if the new build failure is unrelated please open a new bug so we can keep subjects separated.
https://bugs.winehq.org/show_bug.cgi?id=40830
--- Comment #6 from Alexander Neilson alexander@neilson.net.nz --- Thanks Bruno
Happy to test anything on 10.12 builds as I want to have wine running well on my system as it builds towards release.
I will open new bugs as required.
Now I have Ken's patch (to show me how to do build exceptions for this version) should I look at working through as many build failures as I can and raise a bug for "macOS 10.12 build failures" with a more comprehensive patch? or should it be raised as each build failure one by one with a patch?
Just wanting to ensure I stick to the preferred process.
Regards Alexander
https://bugs.winehq.org/show_bug.cgi?id=40830
--- Comment #7 from Ken Thomases ken@codeweavers.com --- Please enter separate bugs for each issue, but also don't get ahead of yourself. Perhaps for now just enter the next two issues so we can make sure we understand what's going on and that there's no overarching issue the fix for which will fix lots of things.
https://bugs.winehq.org/show_bug.cgi?id=40830
Ken Thomases ken@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Fixed by SHA1| |cac226200d88b7454747b5ee101 | |6f06b89ce4aa6 Status|UNCONFIRMED |RESOLVED
--- Comment #8 from Ken Thomases ken@codeweavers.com --- The fix was committed: http://source.winehq.org/git/wine.git/?a=commit;h=cac226200d88b7454747b5ee10...
https://bugs.winehq.org/show_bug.cgi?id=40830
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.9.14.
https://bugs.winehq.org/show_bug.cgi?id=40830
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=40830
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---
--- Comment #10 from Michael Stefaniuc mstefani@redhat.com --- Removing 1.8.x milestone from bugs included in 1.8.4.