Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A RCP application launch procedure is attempting to load an x86_64 based SWT file while running on a aarch64 system. #1280

Open
Saibion opened this issue May 31, 2024 · 2 comments

Comments

@Saibion
Copy link

Saibion commented May 31, 2024

Launching a product from within Eclipse IDE 2024-03 (RCP-RAP) using an Eclipse Application Configuration returns a failed to load error shown below. This first occurred after updating from Eclipse IDE 2023-09 (RCP RAP). To test the update i removed the .p2 directory and installed a fresh copy of Eclipse IDE 2024-03 (RCP-RAP). I added no additional plug-ins. The error persists.

Building the application (Maven) embedding "org.eclipse.justj.openjdk.hotspot.jre.full.feature.group" version="11.0.23.v20240427-0611" works as expected. All plugins within the RCP application have a compiler compliance level of 11.

WORK AROUND: - set launch configuration execution environment to JavaSE-17.

Looking further I found the following conditions return different results.

Setting the launch configuration execution environment changes the result as follows:
JavaSE-11 (AdoptOpenJDK 11 (11.0.11) produces the error shown below.
JavaSE-17 (AdoptOpenJDK 11 (17.0.8.1) the application launches and executes as expected.
JavaSE-21 (tenuring-21) the application launches but does not function.

Before updating to IDE 2024-03 the configuration execution environment JavaSE-11 was used. The concerning factor is in future IDE's where I might not be able to execute due to the environment.

ERROR:
!SESSION 2024-05-14 14:25:03.597 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.11
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=en_US
Framework arguments: -product com.corgroup.bmp.client.product -clearPersistedState
Command-line arguments: -product com.corgroup.bmp.client.product -data /Users/current/dev/projects-e4/client-workspace/../runtime-com.corgroup.bms.single.user.feature.product -dev file:/Users/current/dev/projects-e4/client-workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/dev.properties -os macosx -ws cocoa -arch aarch64 -consoleLog -clearPersistedState -data @user.home/COR•REC/.cor-rec

!ENTRY org.eclipse.osgi 4 0 2024-05-14 14:25:11.451
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/Users/current/dev/projects-e4/client-workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/187/0/.cp/libswt-pi-cocoa-4954r7.jnilib: dlopen(/Users/current/dev/projects-e4/client-workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/187/0/.cp/libswt-pi-cocoa-4954r7.jnilib, 0x0001): tried: '/Users/current/dev/projects-e4/client-workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/187/0/.cp/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/current/dev/projects-e4/client-workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/187/0/.cp/libswt-pi-cocoa-4954r7.jnilib' (no such file), '/Users/current/dev/projects-e4/client-workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgrou
no swt-pi-cocoa in java.library.path: [/Users/current/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
no swt-pi in java.library.path: [/Users/current/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib: dlopen(/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib, 0x0001): tried: '/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (no such file), '/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Can't load library: /Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa.jnilib
Can't load library: /Users/current/.swt/lib/macosx/x86_64/libswt-pi.jnilib
/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib: dlopen(/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib, 0x0001): tried: '/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (no such file), '/Users/current/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

at org.eclipse.swt.internal.Library.loadLibrary(Library.java:346)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:255)
at org.eclipse.swt.internal.cocoa.OS.<clinit>(OS.java:21)
at org.eclipse.swt.widgets.Display.configureSystemOptions(Display.java:863)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:381)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:725)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:183)
at com.corgroup.bmp.client.Application_su.start(Application_su.java:40)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
at org.eclipse.equinox.launcher.Main.main(Main.java:1440)

An error has occurred. See the log file
/Users/current/COR•REC/.cor-rec/.metadata/.log.

WORKING:
!SESSION 2024-05-14 14:53:14.382 -----------------------------------------------
eclipse.buildId=unknown
java.version=17.0.8.1
java.vendor=Eclipse Adoptium
BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=en_US
Framework arguments: -product com.corgroup.bmp.client.product -clearPersistedState
Command-line arguments: -product com.corgroup.bmp.client.product -data /Users/current/dev/projects-e4/client-workspace/../runtime-com.corgroup.bms.single.user.feature.product -dev file:/Users/current/dev/projects-e4/client-workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/dev.properties -os macosx -ws cocoa -arch aarch64 -consoleLog -clearPersistedState -data @user.home/COR•REC/.cor-rec

!ENTRY org.eclipse.ui 2 2 2024-05-14 14:53:17.897
!MESSAGE Invalid preference category path: org.eclipse.ui.preferencePages.Workbench (bundle: org.eclipse.equinox.security.ui, page: org.eclipse.equinox.security.ui.category)

@iloveeclipse
Copy link
Member

@Saibion
Copy link
Author

Saibion commented Jun 3, 2024

The error persists using the build suggested when launching within the AdoptOpenJDK (11.0.11) environment. It will still launch using AdoptOpenJDK (17.0.8.1). I have included the full terminal output. The relevant error begins at !STACK #1.

Terminal error received:
INFO: HHH000412: Hibernate ORM core version [WORKING]
Jun 03, 2024 7:10:24 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager
INFO: HCANN000001: Hibernate Commons Annotations {5.1.2.Final}
Jun 03, 2024 7:10:24 AM org.hibernate.c3p0.internal.C3P0ConnectionProvider configure
INFO: HHH010002: C3P0 using driver: org.apache.derby.jdbc.EmbeddedDriver at URL: jdbc:derby:CorRec_db
Jun 03, 2024 7:10:24 AM org.hibernate.c3p0.internal.C3P0ConnectionProvider configure
INFO: HHH10001001: Connection properties: {autocommit=true}
Jun 03, 2024 7:10:24 AM org.hibernate.c3p0.internal.C3P0ConnectionProvider configure
INFO: HHH10001003: Autocommit mode: true
[MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
[Start Level: Equinox Container: a2f48854-7538-4f8b-ae9d-e4ef63379fb4] INFO com.mchange.v2.c3p0.C3P0Registry - Initializing c3p0-0.9.5.5 [built 11-December-2019 22:18:33 -0800; debug? true; trace: 10]
Jun 03, 2024 7:10:25 AM org.hibernate.c3p0.internal.C3P0ConnectionProvider configure
INFO: HHH10001007: JDBC isolation level:
[Start Level: Equinox Container: a2f48854-7538-4f8b-ae9d-e4ef63379fb4] INFO com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource - Initializing c3p0 pool... com.mchange.v2.c3p0.PoolBackedDataSource@e315ccf8 [ connectionPoolDataSource -> com.mchange.v2.c3p0.WrapperConnectionPoolDataSource@ea33da55 [ acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> false, automaticTestTable -> null, breakAfterAcquireFailure -> false, checkoutTimeout -> 0, connectionCustomizerClassName -> null, connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, contextClassLoaderSource -> caller, debugUnreturnedConnectionStackTraces -> false, factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, forceSynchronousCheckins -> false, identityToken -> z8kfltb31plkonb1flndjd|10011ab, idleConnectionTestPeriod -> 120, initialPoolSize -> 5, maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 300, maxIdleTimeExcessConnections -> 0, maxPoolSize -> 20, maxStatements -> 0, maxStatementsPerConnection -> 0, minPoolSize -> 5, nestedDataSource -> com.mchange.v2.c3p0.DriverManagerDataSource@5924d2fb [ description -> null, driverClass -> null, factoryClassLocation -> null, forceUseNamedDriverClass -> false, identityToken -> z8kfltb31plkonb1flndjd|71fd3df9, jdbcUrl -> jdbc:derby:CorRec_db, properties -> {autocommit=true} ], preferredTestQuery -> null, privilegeSpawnedThreads -> false, propertyCycle -> 0, statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false; userOverrides: {} ], dataSourceName -> null, extensions -> {}, factoryClassLocation -> null, identityToken -> z8kfltb31plkonb1flndjd|1ad86892, numHelperThreads -> 3 ]
Jun 03, 2024 7:10:25 AM org.hibernate.dialect.Dialect
INFO: HHH000400: Using dialect: org.hibernate.dialect.DerbyTenSevenDialect
Jun 03, 2024 7:10:28 AM org.hibernate.engine.transaction.jta.platform.internal.JtaPlatformInitiator initiateService
INFO: HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
!SESSION 2024-06-03 07:10:20.775 -----------------------------------------------
eclipse.buildId=unknown
java.version=11.0.11
java.vendor=AdoptOpenJDK
BootLoader constants: OS=macosx, ARCH=aarch64, WS=cocoa, NL=en_US
Framework arguments: -product com.corgroup.bmp.client.product -clearPersistedState
Command-line arguments: -product com.corgroup.bmp.client.product -data /Users/user/dev/projects/workspace/../runtime-com.corgroup.bms.single.user.feature.product -dev file:/Users/user/dev/projects/workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/dev.properties -os macosx -ws cocoa -arch aarch64 -consoleLog -clearPersistedState -data @user.home/COR•REC/.cor-rec

!ENTRY org.eclipse.osgi 4 0 2024-06-03 07:10:28.654
!MESSAGE Application error
!STACK 1
java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
/Users/user/dev/projects/workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/188/0/.cp/libswt-pi-cocoa-4954r7.jnilib: dlopen(/Users/user/dev/projects/workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/188/0/.cp/libswt-pi-cocoa-4954r7.jnilib, 0x0001): tried: '/Users/user/dev/projects/workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/188/0/.cp/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/dev/projects/workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgroup.bms.single.user.feature.product/org.eclipse.osgi/188/0/.cp/libswt-pi-cocoa-4954r7.jnilib' (no such file), '/Users/user/dev/projects/workspace/.metadata/.plugins/org.eclipse.pde.core/com.corgrou
no swt-pi-cocoa in java.library.path: [/Users/user/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
no swt-pi in java.library.path: [/Users/user/Library/Java/Extensions, /Library/Java/Extensions, /Network/Library/Java/Extensions, /System/Library/Java/Extensions, /usr/lib/java, .]
/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib: dlopen(/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib, 0x0001): tried: '/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (no such file), '/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))
Can't load library: /Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa.jnilib
Can't load library: /Users/user/.swt/lib/macosx/x86_64/libswt-pi.jnilib
/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib: dlopen(/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib, 0x0001): tried: '/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (no such file), '/Users/user/.swt/lib/macosx/x86_64/libswt-pi-cocoa-4954r7.jnilib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64'))

at org.eclipse.swt.internal.Library.loadLibrary(Library.java:346)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:255)
at org.eclipse.swt.internal.cocoa.OS.<clinit>(OS.java:21)
at org.eclipse.swt.widgets.Display.configureSystemOptions(Display.java:863)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:381)
at org.eclipse.ui.internal.Workbench.createDisplay(Workbench.java:725)
at org.eclipse.ui.PlatformUI.createDisplay(PlatformUI.java:183)
at com.corgroup.bmp.client.Application_su.start(Application_su.java:40)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants