spotbugs / spotbugs

SpotBugs is FindBugs' successor. A tool for static analysis to look for bugs in Java code.

Home Page:https://spotbugs.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code failed to build on Mac M1

testn opened this issue · comments

commented

It seems to refer to the older version of Eclipse which does not support Mac M1

This should be fixed according to #2507

closing as addressed. Further we expect after this next release to start raising our jdk requirements so we can then bring eclipse up much further. it is true its stuck in time but we are aware of the issues and working on it. As noted this was fixed already on master with changes I did earlier. The PR noted will show multi platform usage. If still an issue after this next release, please reopen but as noted we will fast track moving up to newer releases.

Hello! I still have this kind of problem. I'm on an Apple Mac M2 with Sonoma 14.0.
On a ./gradlew clean bulld I get the following message:

Execution failed for task ':eclipsePlugin:compileJava'.
> Could not resolve all files for configuration ':eclipsePlugin:compileClasspath'.
   > Could not find org.eclipse.platform:org.eclipse.swt.cocoa.macosx.aarch64:3.113.0.
     Searched in the following locations:
       - https://repo.maven.apache.org/maven2/org/eclipse/platform/org.eclipse.swt.cocoa.macosx.aarch64/3.113.0/org.eclipse.swt.cocoa.macosx.aarch64-3.113.0.pom
     Required by:
         project :eclipsePlugin > org.eclipse.platform:org.eclipse.swt:3.113.0

Currently the only way, is a workaround: I exclude these modules from the build process:

./gradlew clean build -x :eclipsePlugin:compileJava -x :eclipsePlugin-junit:compileTestJava -x :eclipsePlugin-test:compileJava -x :eclipsePlugin-test:checkstyleMain

It seems like, this issue is still relevant.
It looks like the macos-latest in the GitHub Action is using Intel architecture, not the arm64 (M1) one, that's why it didn't have this problem. There are M1 macOS runners (see actions/runner-images#8439), but it's not available for opensource projects for free.

@hazendaz I built from the head of the master branch, so it's up to date. I get the following dependency tree:
dependencies.zip

I tried to run ./gradlew clean --refresh-dependencies but I still have the same result.

If I change the https://github.com/spotbugs/spotbugs/blob/master/buildSrc/src/main/kotlin/eclipse-convention.gradle.kts#L10 version to newer, like 4.29.0, it's compile. So maybe we should simply update this version.

Since #2611 got merged, closing this issue. Thank you for checking and the PR, @Spatrik95 !