Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 565887

Summary: Build SWT Mac libraries with XCode 12
Product: [Eclipse Project] Platform Reporter: Lakshmi P Shanmugam <lshanmug>
Component: SWTAssignee: Lakshmi P Shanmugam <lshanmug>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: christian.dietrich.opensource, hubert+eclipseorg, jonah, MarcMiltenberger, p.beauvoir, peter, sravankumarl
Version: 4.17   
Target Milestone: 4.19 M2   
Hardware: PC   
OS: Mac OS X   
See Also: https://git.eclipse.org/r/c/platform/eclipse.platform.swt.binaries/+/174876
https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/174974
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=a7100cf4af4223827c96b9019fad260986084e93
https://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/commit/?id=e9a10a839e13942f1ae5690010ee81b02fbe4585
https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175054
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=2fc0ff467531508d347532dadf8e714a0b73f6d5
https://git.eclipse.org/r/c/platform/eclipse.platform.swt.binaries/+/175060
https://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/commit/?id=ec2808f2dd32db42ce5846dcc71953cd238e02b4
https://git.eclipse.org/r/c/platform/eclipse.platform.swt.binaries/+/175067
https://git.eclipse.org/c/platform/eclipse.platform.swt.binaries.git/commit/?id=3bcde3a721a8c75d10926f96de9a642e42c67b2a
https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175112
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=705fb7e4fdbf3b4d564e15d1a9a994552b8418c6
https://git.eclipse.org/r/c/platform/eclipse.platform.releng.aggregator/+/176415
https://git.eclipse.org/c/platform/eclipse.platform.releng.aggregator.git/commit/?id=0995598cd1cfcdcc875e0a6b167da326843fba6d
Whiteboard:
Bug Depends on:    
Bug Blocks: 565690    

Description Lakshmi P Shanmugam CLA 2020-08-07 06:39:04 EDT
XCode 12 is required to build universal binaries that can run on both arm64 and x86_64.

XCode 12 beta can be installed on macOS 10.15.4 or later. Currently the build machine uses Mac OSX 10.10 SDK on macOS 10.12 for building the libraries.
Comment 1 Lakshmi P Shanmugam CLA 2020-08-07 06:51:23 EDT
I installed XCode beta3 on macOS 10.15.6.
Tried to build SWT libraries by changing -arch x86_64 to -arch arm64 in build.sh.

Build fails with these errors:
os.c:6581:6: error: use of undeclared identifier 'STRUCT_SIZE_LIMIT'
        [exec]         if (STRUCT_SIZE_LIMIT == 0) {
        [exec]             ^
        [exec] os.c:6582:59: error: 'objc_msgSendSuper_stret' is unavailable: not available in arm64
        [exec]                 ((void (*)(NSRect *, struct objc_super *, jlong, jlong))objc_msgSendSuper_stret)(lparg0, lparg1, arg2, arg3);
        [exec]                                                                         ^
        [exec] /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/objc/message.h:128:1: note: 'objc_msgSendSuper_stret' has been explicitly marked unavailable here
Comment 2 Eclipse Genie CLA 2021-01-15 06:46:16 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt.binaries/+/174876
Comment 3 Phil Beauvoir CLA 2021-01-15 06:50:45 EST
Lakshmi, will this mean that the Mac SWT issues that are only seen when running a  child Eclipse instance will now also be seen in main Eclipse (or RCP app)?
Comment 4 Lakshmi P Shanmugam CLA 2021-01-15 08:47:06 EST
(In reply to Phil Beauvoir from comment #3)
> Lakshmi, will this mean that the Mac SWT issues that are only seen when
> running a  child Eclipse instance will now also be seen in main Eclipse (or
> RCP app)?

Building SWT with Xcode 12 will not affect that, but building Eclipse launcher with Xcode 12 will bring the all the new API behaviour to main Eclipse. That said, this is required for arm64 support.
Comment 5 Phil Beauvoir CLA 2021-01-15 08:48:29 EST
Thanks, Lakshmi. Yes, I forgot it's the launcher that is the issue.
Comment 6 Eclipse Genie CLA 2021-01-18 05:49:52 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/174974
Comment 9 Eclipse Genie CLA 2021-01-19 10:49:44 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175054
Comment 11 Eclipse Genie CLA 2021-01-19 11:43:03 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt.binaries/+/175060
Comment 13 Eclipse Genie CLA 2021-01-19 13:18:01 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt.binaries/+/175067
Comment 15 Eclipse Genie CLA 2021-01-20 12:13:56 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.swt/+/175112
Comment 17 Lakshmi P Shanmugam CLA 2021-02-11 19:10:27 EST
SWT arm64 libraries are being built and are in the binaries repository.
Comment 18 Lakshmi P Shanmugam CLA 2021-02-15 09:50:57 EST
SWT binaries for Mac arm64 are available for download with the latest I-build - https://download.eclipse.org/eclipse/downloads/drops4/I20210215-0700/download.php?dropFile=swt-I20210215-0700-cocoa-macosx-arm64.zip

Please try it out and report any issues.
Comment 19 Phil Beauvoir CLA 2021-02-15 09:57:09 EST
(In reply to Lakshmi P Shanmugam from comment #18)
> SWT binaries for Mac arm64 are available for download with the latest
> I-build -
> https://download.eclipse.org/eclipse/downloads/drops4/I20210215-0700/
> download.php?dropFile=swt-I20210215-0700-cocoa-macosx-arm64.zip
> 
> Please try it out and report any issues.

Thanks for this.

Will there eventually be a full Eclipse SDK build for arm64 Mac as we have for Cocoa now? And will the Product Export wizard support it too?
Comment 20 Lakshmi P Shanmugam CLA 2021-02-15 10:10:00 EST
(In reply to Phil Beauvoir from comment #19)
> (In reply to Lakshmi P Shanmugam from comment #18)
> > SWT binaries for Mac arm64 are available for download with the latest
> > I-build -
> > https://download.eclipse.org/eclipse/downloads/drops4/I20210215-0700/
> > download.php?dropFile=swt-I20210215-0700-cocoa-macosx-arm64.zip
> > 
> > Please try it out and report any issues.
> 
> Thanks for this.
> 
> Will there eventually be a full Eclipse SDK build for arm64 Mac as we have
> for Cocoa now? And will the Product Export wizard support it too?

We are working on the Eclipse SDK build - Bug 570540

I already see Mac/arm64 in the available platforms list in Product Export wizard, is that what you are looking for?
Comment 21 Eclipse Genie CLA 2021-02-17 10:21:43 EST
New Gerrit change created: https://git.eclipse.org/r/c/platform/eclipse.platform.releng.aggregator/+/176415