ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ROSJava on MacOS - Fail to build roscore

asked 2012-05-25 06:53:00 -0600

amittleider gravatar image

updated 2012-05-25 08:54:10 -0600

Kevin gravatar image

When I execute

./gradlew install
in the rosjava_core directory, I receive the following exception:
MessageInterfaceBuilder.java:158: cannot find symbol symbol : method getJavaTypeName() location: class org.ros.internal.message.PrimitiveFieldType primitiveFieldType.getJavaTypeName(), field.getName(), value));

Here is the full stack trace:

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':rosjava_bootstrap:compileJava'. at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:68) at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46) at org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34) at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34) at org.gradle.cache.internal.DefaultCacheAccess$2.create(DefaultCacheAccess.java:200) at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:172) at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:198) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:111) at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83) at org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter.execute(CacheLockHandlingTaskExecuter.java:32) at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55) at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57) at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41) at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51) at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52) at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42) at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:247) at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:192) at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:177) at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:83) at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:36) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67) at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31) at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:111) at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126) at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:109) at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:103) at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79) at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23) at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67) at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61) at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54) at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155) at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110) at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78) at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:45) at org.gradle.launcher.daemon.protocol.Build.run(Build.java:67) at org.gradle.launcher.daemon.protocol.Build.run(Build.java:63 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-05-28 11:27:43 -0600

amittleider gravatar image

I edited the source code of MessageInterfaaceBuilder.java:158 to read: "builder.append(String.format(" static final %s %s = %s;\n", field.getJavaTypeName(), field.getName(), value));"

instead of: "builder.append(String.format(" static final %s %s = %s;\n", primitiveFieldType.getJavaTypeName(), field.getName(), value));"

and this appears to fix the compilation issue. However, I don't know if this is what the code intended to say. The pubsub tutorial also now works.

edit flag offensive delete link more

Comments

Question Tools

Stats

Asked: 2012-05-25 06:53:00 -0600

Seen: 238 times

Last updated: May 28 '12