WALA icon indicating copy to clipboard operation
WALA copied to clipboard

Trouble building WALA on my Samsung Galaxy Z Fold 5

Open juliandolby opened this issue 1 year ago • 5 comments

Using Andronix to get a user-mode Linux on my phone, I cloned WALA, but the build failed as shown below. It appears not to understand that the phone is an aarch64 device. There is magic to use the native SWT libs, but the phone seems to confuse it. Does anyone know how it works?

`dolby@localhost:~/WALA$ ./gradlew clean build Calculating task graph as no cached configuration is available for tasks: clean build Type-safe project accessors is an incubating feature. [Incubating] Problems report is available at: file:///home/dolby/WALA/build/reports/problems/problems-report.html

FAILURE: Build failed with an exception.

  • What went wrong Could not determine the dependencies of task ':ide:compileJava'.

Could not resolve all dependencies for configuration ':ide:compileClasspath'. Could not find org.eclipse.platform:org.eclipse.swt.gtk.linux.unknown:3.124.200. Required by: project :ide > org.eclipse.platform:org.eclipse.swt:3.124.200

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. Get more help at https://help.gradle.org.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.11/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 4s 9 actionable tasks: 9 up-to-date Configuration cache entry stored.`

juliandolby avatar Nov 25 '24 03:11 juliandolby

There is magic to use the native SWT libs, but the phone seems to confuse it. Does anyone know how it works?

We trigger that magic here:

https://github.com/wala/WALA/blob/a44aa599fbe19890c5f657f73b16d730ade8a03c/build-logic/src/main/kotlin/com/ibm/wala/gradle/eclipse-maven-central.gradle.kts#L74

Documentation for useNativesForRunningPlatform can be found here.

If there is some platform-specific JAR containing natives suitable for a Samsung Galaxy Z Fold 5, but we’re just not picking that dependency correctly, then perhaps we need to allow substitution in the style shown here.

If there is no platform-specific JAR containing natives suitable for a Samsung Galaxy Z Fold 5, then either:

  • we cannot build WALA on this platform,
  • we need to exclude the ide subproject on this platform, or
  • we need to extract the ide subproject into its own GitHub project that depends on core WALA as previously considered in #462.

liblit avatar Nov 25 '24 06:11 liblit

@juliandolby are you able to build just the projects you need? E.g., ./gradlew :core:assemble, or ./gradlew :cast:java:ecj:assemble? I'm assuming you don't need the IDE functionality for this scenario.

msridhar avatar Nov 25 '24 17:11 msridhar

Thanks! That worked. And I can even publishToMavenLocal.

BTW, I think I tracked the issue to code in diffplug just reporting unknown for arm64 on Linux, and I opened an issue with them.

juliandolby avatar Nov 26 '24 22:11 juliandolby

Thanks for chasing the problem into diffplug. Can you provide a link to the diffplug issue that you filed? That will help us keep track of the relationship between this initial report and that possible root cause.

liblit avatar Nov 26 '24 22:11 liblit

Looks like it's https://github.com/diffplug/durian-swt/issues/29

msridhar avatar Nov 27 '24 21:11 msridhar