I'm trying to compile Fast-RTPS for ROS'. I installed java 11 headless and java 13 headless packages (jre and jdk packages). Then I tried to gradle assemble
with gradle on the system. I got an error. When I searched the internet and said that the problem is related to gradle, I tried to compile it with the following command.
> Task :submodulesUpdate
Altmodรผl yolu 'thirdparty/idl-parser': '1dc2c3a46421a15c9c09d86d2203be9efd9a6199' รงฤฑkฤฑลฤฑ yaptฤฑ
> Task :idl-parser:antlr4 FAILED
Exception in thread "main" java.lang.NullPointerException
at org.antlr.v4.tool.Rule.resolveToAttribute(Rule.java:258)
at org.antlr.v4.tool.Alternative.resolveToAttribute(Alternative.java:102)
at org.antlr.v4.semantics.AttributeChecks.qualifiedAttr(AttributeChecks.java:121)
at org.antlr.v4.parse.ActionSplitter.mQUALIFIED_ATTR(ActionSplitter.java:394)
at org.antlr.v4.parse.ActionSplitter.mTokens(ActionSplitter.java:868)
at org.antlr.v4.parse.ActionSplitter.nextToken(ActionSplitter.java:89)
at org.antlr.v4.parse.ActionSplitter.getActionTokens(ActionSplitter.java:43)
at org.antlr.v4.semantics.AttributeChecks.examineAction(AttributeChecks.java:108)
at org.antlr.v4.semantics.AttributeChecks.checkAllAttributeExpressions(AttributeChecks.java:85)
at org.antlr.v4.semantics.SemanticPipeline.process(SemanticPipeline.java:142)
at org.antlr.v4.Tool.processNonCombinedGrammar(Tool.java:400)
at org.antlr.v4.Tool.process(Tool.java:387)
at org.antlr.v4.Tool.processGrammarsOnCommandLine(Tool.java:346)
at org.antlr.v4.Tool.main(Tool.java:193)
> Task :buildIDLParser FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':idl-parser:antlr4'.
> Process 'command '/usr/lib/jvm/java-13-openjdk-amd64/bin/java'' finished with non-zero exit value 1
* 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
BUฤฐLD FAILED in 2s
4 actionable tasks: 4 executed
19:00:56.997 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on execution history cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/thirdparty/idl-parser/.gradle/5.6.2/executionHistory).
19:00:56.998 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
19:00:56.999 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
19:00:57.000 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 4 resolution results binary files in 0.002 secs
19:00:57.001 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/thirdparty/idl-parser/.gradle/5.6.2/fileHashes)
19:00:57.001 [DEBUG] [org.gradle.cache.internal.btree.BTreePersistentIndexedCache] Closing cache fileHashes.bin (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/thirdparty/idl-parser/.gradle/5.6.2/fileHashes/fileHashes.bin)
19:00:57.001 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/thirdparty/idl-parser/.gradle/5.6.2/fileHashes).
19:00:57.001 [DEBUG] [org.gradle.cache.internal.DefaultPersistentDirectoryStore] VCS Checkout Cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/thirdparty/idl-parser/.gradle/vcs-1) has last been fully cleaned up 0 hours ago
19:00:57.001 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS Checkout Cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/thirdparty/idl-parser/.gradle/vcs-1) was closed 0 times.
19:00:57.001 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS metadata (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/thirdparty/idl-parser/.gradle/5.6.2/vcsMetadata-1) was closed 0 times.
19:00:57.002 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Execute build for :buildIDLParser'
19:00:57.002 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Execute build for :buildIDLParser' completed
19:00:57.002 [DEBUG] [org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter] Removed task artifact state for {} from context.
19:00:57.002 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Task :buildIDLParser'
19:00:57.003 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Task :buildIDLParser' completed
19:00:57.003 [INFO] [org.gradle.execution.plan.DefaultPlanExecutor] :buildIDLParser (Thread[Execution worker for ':',5,main]) completed. Took 1.84 secs.
19:00:57.003 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':': released lock on :
19:00:57.003 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1.3 completed (1 worker(s) in use)
19:00:57.003 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Execution worker for ':': released lock on root.1.3
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':',5,main]] finished, busy: 1.908 secs, idle: 0.005 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 5,5,main]] finished, busy: 0.0 secs, idle: 1.911 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 3,5,main]] finished, busy: 0.0 secs, idle: 1.913 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 12,5,main]] finished, busy: 0.0 secs, idle: 1.909 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 10,5,main]] finished, busy: 0.0 secs, idle: 1.909 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 4,5,main]] finished, busy: 0.034 secs, idle: 1.878 secs
19:00:57.004 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Daemon worker Thread 4,5,main]] finished, busy: 0.0 secs, idle: 1.908 secs
19:00:57.004 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 14,5,main]] finished, busy: 0.0 secs, idle: 1.908 secs
19:00:57.004 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 15,5,main]] finished, busy: 0.0 secs, idle: 1.908 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 13,5,main]] finished, busy: 0.0 secs, idle: 1.908 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 8,5,main]] finished, busy: 0.0 secs, idle: 1.91 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 11,5,main]] finished, busy: 0.0 secs, idle: 1.909 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 9,5,main]] finished, busy: 0.0 secs, idle: 1.91 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 6,5,main]] finished, busy: 0.0 secs, idle: 1.911 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 7,5,main]] finished, busy: 0.0 secs, idle: 1.911 secs
19:00:57.003 [DEBUG] [org.gradle.execution.plan.DefaultPlanExecutor] Execution worker [Thread[Execution worker for ':' Thread 2,5,main]] finished, busy: 0.0 secs, idle: 1.913 secs
19:00:57.005 [DEBUG] [org.gradle.execution.taskgraph.DefaultTaskExecutionGraph] Timing: Executing the DAG took 1.917 secs
19:00:57.005 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run tasks'
19:00:57.005 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run tasks' completed
19:00:57.006 [DEBUG] [org.gradle.internal.work.DefaultWorkerLeaseService] Worker lease root.1 completed (0 worker(s) in use)
19:00:57.006 [DEBUG] [org.gradle.internal.resources.AbstractTrackedResourceLock] Daemon worker Thread 4: released lock on root.1
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] FAILURE: Build failed with an exception.
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * What went wrong:
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Execution failed for task ':idl-parser:antlr4'.
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] > Process 'command '/usr/lib/jvm/java-13-openjdk-amd64/bin/java'' finished with non-zero exit value 1
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Try:
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Run with --stacktrace option to get the stack trace. Run with --scan to get full insights.
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter]
19:00:57.006 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] * Get more help at https://help.gradle.org
19:00:57.007 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger]
19:00:57.007 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUฤฐLD FAILED in 3s
19:00:57.007 [LIFECYCLE] [org.gradle.internal.buildevents.TaskExecutionStatisticsReporter] 4 actionable tasks: 2 executed, 2 up-to-date
19:00:57.007 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Completing Build operation 'Run build'
19:00:57.007 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationExecutor] Build operation 'Run build' completed
19:00:57.012 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file content cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/5.6.2/fileContent)
19:00:57.012 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file content cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/5.6.2/fileContent).
19:00:57.013 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for Build Output Cleanup Cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/buildOutputCleanup)
19:00:57.013 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on Build Output Cleanup Cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/buildOutputCleanup).
19:00:57.013 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for execution history cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/5.6.2/executionHistory)
19:00:57.013 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on execution history cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/5.6.2/executionHistory).
19:00:57.014 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for cache directory md-supplier (/home/lorentrs/.gradle/caches/5.6.2/md-supplier)
19:00:57.014 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory md-supplier (/home/lorentrs/.gradle/caches/5.6.2/md-supplier).
19:00:57.015 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for cache directory md-rule (/home/lorentrs/.gradle/caches/5.6.2/md-rule)
19:00:57.015 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on cache directory md-rule (/home/lorentrs/.gradle/caches/5.6.2/md-rule).
19:00:57.016 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
19:00:57.016 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.CachedStoreFactory] Resolution result cache closed. Cache reads: 0, disk reads: 0 (avg: 0.0 secs, total: 0.0 secs)
19:00:57.016 [DEBUG] [org.gradle.api.internal.artifacts.ivyservice.resolveengine.store.ResolutionResultsStoreFactory] Deleted 2 resolution results binary files in 0.0 secs
19:00:57.017 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopping 0 deployment handles
19:00:57.017 [DEBUG] [org.gradle.deployment.internal.DefaultDeploymentRegistry] Stopped deployment handles
19:00:57.017 [DEBUG] [org.gradle.cache.internal.LockOnDemandCrossProcessCacheAccess] Releasing file lock for file hash cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/5.6.2/fileHashes)
19:00:57.017 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on file hash cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/5.6.2/fileHashes).
19:00:57.018 [DEBUG] [org.gradle.cache.internal.DefaultPersistentDirectoryStore] VCS Checkout Cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/vcs-1) has last been fully cleaned up 0 hours ago
19:00:57.018 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS Checkout Cache (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/vcs-1) was closed 0 times.
19:00:57.018 [DEBUG] [org.gradle.cache.internal.DefaultCacheAccess] Cache VCS metadata (/home/lorentrs/px4_ros_com_ros2/ext/Fast-RTPS-Gen/.gradle/5.6.2/vcsMetadata-1) was closed 0 times.
19:00:57.020 [DEBUG] [org.gradle.launcher.daemon.server.exec.ExecuteBuild] The daemon has finished executing the build.
19:00:57.076 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientInputForwarder] Dispatching close input message: org.gradle.launcher.daemon.protocol.CloseInput@595d6241
19:00:57.076 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 24: dispatching class org.gradle.launcher.daemon.protocol.CloseInput
19:00:57.079 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClient] Received result Success[value=org.gradle.launcher.exec.BuildActionResult@3243b914] from daemon DaemonInfo{pid=2364, address=[b766a7ce-3a88-4cbe-bf59-145fafcad50d port:42327, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], state=Idle, lastBusy=1640102170664, context=DefaultDaemonContext[uid=9921258e-221e-4277-b5c8-dcd5ed98d696,javaHome=/usr/lib/jvm/java-13-openjdk-amd64,daemonRegistryDir=/home/lorentrs/.gradle/daemon,pid=2364,idleTimeout=10800000,priority=NORMAL,daemonOpts=--add-opens,java.base/java.util=ALL-UNNAMED,--add-opens,java.base/java.lang=ALL-UNNAMED,--add-opens,java.base/java.lang.invoke=ALL-UNNAMED,--add-opens,java.prefs/java.util.prefs=ALL-UNNAMED,-XX:MaxMetaspaceSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xms256m,-Xmx512m,-Dfile.encoding=UTF-8,-Duser.country=TR,-Duser.language=tr,-Duser.variant]} (build should be done).
19:00:57.079 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: dispatching class org.gradle.launcher.daemon.protocol.Finished
19:00:57.079 [DEBUG] [org.gradle.launcher.daemon.client.DaemonClientConnection] thread 1: connection stop
I installed all dependencies. what could be the problem. Thank you for helping out.