-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Builds on Mac M1 imposible #5196
Comments
Today, I met this too. |
I could build OpenWhisk with an ugly workaround. SummaryIn short, what I did to build OpenWhisk is as follows. $ export GRADLE_OPTS=-Dorg.gradle.project.buildDir=/tmp/gradle-build
$ ./gradlew distDocker
$ mv /tmp/gradle-build core/scheduler/build
$ unset GRADLE_OPTS
$ ./gradlew distDocker -x :core:scheduler:generateProto DetailsThe main issue was the gradle plugin could not properly recognize M1 macs. It looks for protoc_platform=osx-x86_64 This is basically the same thing as what is described in the issue but the protoc version should be After then it will complain about the not found log. * What went wrong:
Execution failed for task ':core:scheduler:generateProto'.
> protoc: stdout: . stderr: Exception in thread "main" java.io.FileNotFoundException: build/akka-grpc-gradle-plugin.log (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:162)
at java.io.PrintWriter.<init>(PrintWriter.java:192)
at java.io.PrintWriter.<init>(PrintWriter.java:232)
at akka.grpc.gen.FileLogger.<init>(Logging.scala:35)
at akka.grpc.gen.Main$.$anonfun$logger$1(Main.scala:48)
at scala.Option.map(Option.scala:163)
at akka.grpc.gen.Main$.delayedEndpoint$akka$grpc$gen$Main$1(Main.scala:48)
at akka.grpc.gen.Main$delayedInit$body.apply(Main.scala:14)
at scala.Function0.apply$mcV$sp(Function0.scala:39)
at scala.Function0.apply$mcV$sp$(Function0.scala:39)
at scala.runtime.AbstractFunction0.apply$mcV$sp(AbstractFunction0.scala:17)
at scala.App.$anonfun$main$1$adapted(App.scala:80)
at scala.collection.immutable.List.foreach(List.scala:392)
at scala.App.main(App.scala:80)
at scala.App.main$(App.scala:78)
at akka.grpc.gen.Main$.main(Main.scala:14)
at akka.grpc.gen.Main.main(Main.scala)
--akkaGrpc_out: protoc-gen-akkaGrpc: Plugin failed with status code 1. The plugin sets the log location based on the So I changed its location to somewhere else like below and run $ export GRADLE_OPTS=-Dorg.gradle.project.buildDir=/tmp/gradle-build
$ ./gradlew distDocker The build itself will still fail because dependency resolution is failed, but it will pass the After then unset the $ mv /tmp/gradle-build core/scheduler/build
$ unset GRADLE_OPTS
$ ./gradlew distDocker -x :core:scheduler:generateProto What I am curious about is I tried setting the Anyway, I hope this helps anyone who tries to build OpenWhisk on M1 Mac until we address this issue. |
I built successfully with the modification @tawalaya did. Instead of giving another version of protobuf, I just used x86-64 artifact. So, in core/scheduler/build.gradle
|
Environment details:
Steps to reproduce the issue:
./gradlew compileScala
Provide the actual results and outputs:
Additional information you deem important:
protocCommand=...
did not work.:core:sscheduler
) by adding:This causes an already "mitigated" bug (akka/akka-grpc#786) to reappear, adding a
build/akka-grpc-gradle-plugin.lo
in the working directory of the gradle daemon fixes that but that does not seem to be a reasonable solution?Ultimately, the version of
grpc:akka-grpc-gradle-plugin
should be updated but that looks to require a major update of gralde.The text was updated successfully, but these errors were encountered: