I'm having issues trying to build locally on an M1...
# troubleshoot
b
I'm having issues trying to build locally on an M1 mac any ideas on how to resolve this? 🙏
Copy code
Bens-MacBook-Pro:df-datahub benmarte$ ./gradlew build
To honour the JVM settings for this build a single-use Daemon process will be forked. See <https://docs.gradle.org/6.9.2/userguide/gradle_daemon.html#sec:disabling_the_daemon>.
Daemon will be stopped at the end of the build 
Configuration on demand is an incubating feature.

> Configure project :metadata-integration:java:datahub-client
In else section

> Configure project :metadata-integration:java:spark-lineage
In else section
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <http://www.slf4j.org/codes.html#StaticLoggerBinder> for further details.

> Task :entity-registry:mainDestroyStaleFiles SKIPPED
:entity-registry:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-models:mainDestroyStaleFiles SKIPPED
:metadata-models:mainDestroyStaleFiles task is a NO-OP task.

> Task :metadata-models:mainCopyPdscSchemas SKIPPED
:metadata-models:mainCopyPdscSchemas task is a NO-OP task.

> Task :entity-registry:mainCopyPdscSchemas SKIPPED
:entity-registry:mainCopyPdscSchemas task is a NO-OP task.

> Task :li-utils:compileMainGeneratedDataTemplateJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':li-utils:compileMainGeneratedDataTemplateJava'.
> Duplicate key com/linkedin/util/VersionedUrnCoercer.java

* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.9.2/userguide/command_line_interface.html#sec:command_line_warnings>

BUILD FAILED in 8s
13 actionable tasks: 10 executed, 3 up-to-date
I get this error when I try to run
dev.sh
Copy code
Creating mysql               ... done
Creating zookeeper     ... done
Creating elasticsearch ... done
Creating neo4j               ... done
Creating broker              ... done
Creating elasticsearch-setup ... done
Creating mysql-setup         ... done
Creating schema-registry     ... done
Creating kafka-setup         ... done
Creating datahub-gms         ... done
Creating datahub-frontend-react    ... error
Creating datahub_datahub-actions_1 ... done

ERROR: for datahub-frontend-react  Cannot start service datahub-frontend-react: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "datahub-frontend/bin/datahub-frontend": stat datahub-frontend/bin/datahub-frontend: no such file or directory: unknown

ERROR: for datahub-frontend-react  Cannot start service datahub-frontend-react: failed to create shim: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "datahub-frontend/bin/datahub-frontend": stat datahub-frontend/bin/datahub-frontend: no such file or directory: unknown
ERROR: Encountered errors while bringing up the project.
after doing a
./gradlew clean
I know get this error when building:
Copy code
Bens-MacBook-Pro:df-datahub benmarte$ ./gradlew build
To honour the JVM settings for this build a single-use Daemon process will be forked. See <https://docs.gradle.org/6.9.2/userguide/gradle_daemon.html#sec:disabling_the_daemon>.
Daemon will be stopped at the end of the build 
Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* Where:
Script '/Users/benmarte/Documents/github/raft/df-datahub/datahub-frontend/play.gradle' line: 1

* What went wrong:
A problem occurred evaluating script.
> Plugin with id 'org.gradle.playframework' not found.

* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See <https://docs.gradle.org/6.9.2/userguide/command_line_interface.html#sec:command_line_warnings>

BUILD FAILED in 3s
b
hey ben! what version of java are you running?
b
Copy code
openjdk version "1.8.0_312"
OpenJDK Runtime Environment (Zulu 8.58.0.13-CA-macos-aarch64) (build 1.8.0_312-b07)
OpenJDK 64-Bit Server VM (Zulu 8.58.0.13-CA-macos-aarch64) (build 25.312-b07, mixed mode)
b
okay gotcha. I'm not sure why your version wouldn't work, but I know I personally have had issues running
./gradlew build
when I had a different setup. my setup now looks like this:
Copy code
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM (Temurin)(build 25.322-b06, mixed mode)
However! before bothering with messing around with your java version / env, I would suggest nuking your docker containers and restarting. Sometimes when getting things set up your docker images or local builds can get into bad states. if you do
datahub docker nuke --keep-data
(to keep your data) to delete the existing containers, and then you can go even harder with
docker system prune
to remove all unused containers, networks, images (both dangling and unreferenced), and optionally, volumes. I would then rebuild once all of that is taken care of
b
I've docker nuked, I docker system prune, I've gradlew clean