Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Backport fix on Eclipse Mars 4.5.2 - OSX High Sierra crash due to deprecated NSCopyBits
Backport fix on Eclipse Mars 4.5.2 - OSX High Sierra crash due to deprecated NSCopyBits [message #1787207] Tue, 22 May 2018 07:19
Sanket Gadiya is currently offline Sanket GadiyaFriend
Messages: 1
Registered: May 2018
Junior Member
I did local setup of swt native jar build mechanism on OSX 10.13.4 (macOS High Sierra) with Xcode 9.3. I used JDK 8 update 112 and Xulrunner SDK 31.0. I rebased swt codebase to tag R_4_5_2 and applied patch as mentioned in Bug 502711 with gerrit reviews -
https://git.eclipse.org/r/#/c/82216/
https://git.eclipse.org/r/#/c/93811/

I started building native jar using maven with this command-
mvn clean verify -Dnative=cocoa.macosx.x86_64 -Pbuild-individual-bundles -f eclipse.platform.swt.binaries/bundles/org.eclipse.swt.cocoa.macosx.x86_64/pom.xml

My build failed with these errors -
exec] g++ -c -Wall -arch x86_64 -DSWT_VERSION=4530 -DUSE_ASSEMBLER -DCOCOA -I /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/include -I /Library/Java/JavaVirtualMachines/jdk1.8.0_112.jdk/Contents/Home/include/darwin -Wno-non-virtual-dtor -include /Users/Shared/xulrunner/64-bit/mozilla/dist/include/mozilla-config.h -I/Users/Shared/xulrunner/64-bit/mozilla/dist/include xpcom.cpp -std=c++11
[exec] xpcom.cpp:85:15: error: unknown type name 'nsStaticModuleInfo'
[exec] rc = (jint)((SWT_XREInitEmbedding)arg0)((nsILocalFile *)arg1, (nsILocalFile *)arg2, (nsIDirectoryServiceProvider *)arg3, (nsStaticModuleInfo const *)arg4, arg5);
[exec] ^
[exec] ./xpcom.h:47:103: note: expanded from macro 'SWT_XREInitEmbedding'
[exec] #define SWT_XREInitEmbedding nsresult (nsILocalFile *,nsILocalFile *,nsIDirectoryServiceProvider *,nsStaticModuleInfo const *,PRUint32)
[exec] ^
[exec] xpcom.cpp:85:15: error: expected ')'
[exec] ./xpcom.h:47:122: note: expanded from macro 'SWT_XREInitEmbedding'
[exec] #define SWT_XREInitEmbedding nsresult (nsILocalFile *,nsILocalFile *,nsIDirectoryServiceProvider *,nsStaticModuleInfo const *,PRUint32)
[exec] ^
[exec] xpcom.cpp:85:15: note: to match this '('
[exec] ./xpcom.h:47:42: note: expanded from macro 'SWT_XREInitEmbedding'
[exec] #define SWT_XREInitEmbedding nsresult (nsILocalFile *,nsILocalFile *,nsIDirectoryServiceProvider *,nsStaticModuleInfo const *,PRUint32)
[exec] ^
[exec] xpcom.cpp:85:124: error: use of undeclared identifier 'nsStaticModuleInfo'
[exec] rc = (jint)((SWT_XREInitEmbedding)arg0)((nsILocalFile *)arg1, (nsILocalFile *)arg2, (nsIDirectoryServiceProvider *)arg3, (nsStaticModuleInfo const *)arg4, arg5);
[exec] ^
[exec] xpcom.cpp:183:13: error: no matching function for call to 'NS_NewLocalFile'
[exec] rc = (jint)NS_NewLocalFile((nsAString *)arg0, arg1, (nsILocalFile*)lparg2);
[exec] ^~~~~~~~~~~~~~~
[exec] /Users/Shared/xulrunner/64-bit/mozilla/dist/include/nsXPCOM.h:165:1: note: candidate function not viable: no known conversion from 'nsILocalFile **' to 'nsIFile **' for 3rd argument
[exec] NS_NewLocalFile(const nsAString &path,
[exec] ^
[exec] xpcom.cpp:6836:13: error: use of undeclared identifier 'XPCOMGlueShutdown'
[exec] rc = (jint)XPCOMGlueShutdown();
[exec] ^
[exec] xpcom.cpp:7010:21: error: no matching constructor for initialization of 'nsEmbedString' (aka 'nsString_external')
[exec] rc = (jintLong)new nsEmbedString((PRUnichar *)lparg0);
[exec] ^ ~~~~~~~~~~~~~~~~~~~

I checked classes and files where jni calls are specified, but I didn't find any solution for "no matching function for call to 'NS_NewLocalFile'" error message.
I am getting errors in building xulrunner jnilib - libswt-xulrunner-cocoa-4530.jnilib.
How can I fix these build errors ?

Sanket Jain
Previous Topic:StatusLineManager in ApplicationWindow
Next Topic:[SOLVED]Cannot launch 64 bit version of Windows application : workbench is invalid -> SWTError
Goto Forum:
  


Current Time: Thu Sep 20 14:09:28 GMT 2018

Powered by FUDForum. Page generated in 0.01650 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top