Open dfonovic opened 7 months ago
Use the user
user inside the container, not root.
I have the same error with the user:
Might be related to Java 21 being the default, while Gradle 8.1.1 only supports Java 20.
user@f3d24c51036a:~/contiki-ng/tools/cooja$ java --version
java 21.0.3 2024-04-16 LTS
Java(TM) SE Runtime Environment Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37)
Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.3+7.1 (build 21.0.3+7-LTS-jvmci-23.1-b37, mixed mode, sharing)
user@f3d24c51036a:~/contiki-ng/tools/cooja$
The Java 21 issue with Gradle 8.1.1 sounds plausible, try with an older contiki-ng image and see if that works better.
Recent images had the same issue, tried one randomly from a bit longer ago - 8f38c24bc0c292a0115b36eb9aad1efa4dddfd5aeecc12693c30cc170fc65a54, it works. There are still some hiccups related to X11 with M1 Mac, but it's a different story.
Not sure what's the deal here in general with macOS, seems to work fine on WSL with latest contiki image.
I got this error when I try to start Cooja simulator from Docker conatainer:
root@9e6c9da70970:~/contiki-ng# cooja Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
FAILURE: Build failed with an exception.
What went wrong: Could not open settings generic class cache for settings file '/home/user/contiki-ng/tools/cooja/settings.gradle' (/root/.gradle/caches/8.1.1/scripts/8gn3g19clydc2xzaxxc8hxbnn).
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 8s root@9e6c9da70970:~/contiki-ng#