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

rosjava builds fail, says I'm missing ant, but I'm not.

asked 2012-01-23 17:54:58 -0500

morrowsend gravatar image

updated 2012-01-23 17:55:48 -0500

I had typed up a long explanation, but the webpage did something weird and I lost it.

Anyway, I have two machines, a desktop and laptop, both running linuxmint 12. The desktop installed correctly and works well with rosjava. The laptop always fails during builds. I have installed rosjava several different ways (including the exact method used on the dekstop machine from which I took notes during installation.) I also tried installing rosjava-core from synaptic, and following this tutorial, except using electric instead of diamondback.: http://www.cs.bham.ac.uk/internal/courses/int-robot/2011/notes/install.php

All of my builds fail when they run ant. If I run rosmake rosjava -rosdep--install, I get the following:

Failed to find rosdep ant for package rosjava on OS:ubuntu version:11.10
Failed to find rosdep boost for package rosjava on OS:ubuntu version:11.10
[ rosmake ] rosdep install failed: Rosdep install failed

When I run my package I get the following:

  ...BUILD FAILED
  /home/embedded/ros_workspace/rosjava_core/rosjava/build.xml:42: Compile failed; see the compiler error output for details.

  Total time: 4 seconds
  Executing command: ['ant'] ...

ANT IS INSTALLED.

ant -version
Apache Ant(TM) version 1.8.2 compiled on August 19 2011

I even copied the exact same (working) package from the working machine to the laptop, and got the same failures.

Any help would be very much appreciated. I'm pulling my hair out over this thing. Meanwhile, I'll be looking for a more appropriate tool to work on this laptop... Like a large hammer.

Here is my package:my_package.tar.gz.jpg

Oh, and I have the correct bootstrap line in the Makefile.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-01-23 20:41:09 -0500

Lorenz gravatar image

updated 2012-01-24 19:31:21 -0500

The rosdep error is not critical, it just means that the ROS doesn't know about the correct package for your Ubuntu version. Just compile without the --rosdep-install flag, i.e rosmake rosjava. To me the error doesn't look like an the system cannot find ant, I don't see anything like ant missing when you are compiling. In particular the message says that the error happens in an ant file which indicates that ant was actually called.

After calling rosmake once on your package, you can directly call ant to just compile it. Did you try that? Also, you didn't paste the compiler error output which might really help.

Your current code will not compile against current rosjava. Rosjava has been refactored a lot over the last few weeks and the NodeMain interface changed. DefaultNodeFactory is gone, too.

EDIT: The output definitely shows a problem when compiling rosjava:

...
[javac] RosoutLogger.java:188: package org.ros.message.rosgraph_msgs does not exist
[javac]       publish(org.ros.message.rosgraph_msgs.Log.FATAL, message);
[javac]                                            ^
[javac] RosoutLogger.java:196: package org.ros.message.rosgraph_msgs does not exist
[javac]       publish(org.ros.message.rosgraph_msgs.Log.FATAL, message, t);
[javac]                                            ^
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 24 errors

Some of the required messages could not be found. There is a certain chance that the following steps could work:

  1. Check that rosgraph_msgs is installed on your system: 'rospack find rosgraph_msgs' should print a path.
  2. Remove all build relicts from previous rosjava builds:

    rm -rf ~/.ros/rosjava

  3. Rebuild everything:

    rosmake --pre-clean rosjava

Now, the compiler shouldn't complain anymore. However, your package isn't built yet. You can try compiling it with 'rosmake my_package'. With your current code, this will fail however because your package uses a deprecated rosjava API.

edit flag offensive delete link more

Comments

I've tried compiling without -rosdep--install, but it still fails. I removed the code in the src folder and tried rosmake my_package. This failed exactly the same as before. I started from scratch using the tutorial on the rosjava page with the same results as well.
morrowsend gravatar image morrowsend  ( 2012-01-24 03:08:54 -0500 )edit
Can you please post the complete error output?
Lorenz gravatar image Lorenz  ( 2012-01-24 03:09:57 -0500 )edit
Here is my bash output: http://www.pastie.org/3245781 and here is the log file: http://www.pastie.org/3245797 I've been trying things in the time between my post, so this log file is slightly different than before.
morrowsend gravatar image morrowsend  ( 2012-01-24 06:51:36 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-01-23 17:54:58 -0500

Seen: 398 times

Last updated: Jan 24 '12