Ask Your Question
2

Rosjava fails to build when custom messages are listed as a dependency

asked 2012-02-23 09:46:24 -0500

Joe gravatar image

updated 2012-02-23 09:46:39 -0500

Hello,

Currently, I have a package containing all of my custom messages called "OryxMessages". This builds fine, and other packages can use these messages. A few weeks ago, my rosjava package had no problem generating the proper files for these messages building. Today, however, I removed 1 of the messages from that package and rebuilt it. Everything works fine, except now my rosjava package won't build, giving me the following error:

compile:
      [javac] Compiling 4 source files to /home/oryx/.ros/rosjava/build/OryxMessages
      [javac] javac: invalid flag: -g:${debuglevel}
      [javac] Usage: javac <options> <source files>
      [javac] use -help for a list of possible options

  BUILD FAILED
  /home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/scripts/build-msg.xml:72: Compile failed; see the compiler error output for details.

  Total time: 1 second
  Traceback (most recent call last):
    File "/home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/src/main/python/rosjava_bootstrap/make.py", line 108, in <module>
      main(sys.argv)
    File "/home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/src/main/python/rosjava_bootstrap/make.py", line 100, in main
      build(rospack, package)
    File "/home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/src/main/python/rosjava_bootstrap/make.py", line 70, in build
      generate_msg_depends.generate_msg_depends(package)
    File "/home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/src/main/python/rosjava_bootstrap/generate_msg_depends.py", line 214, in generate_msg_depends
      _generate_msgs(rospack, p, up_to_date)
    File "/home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/src/main/python/rosjava_bootstrap/generate_msg_depends.py", line 198, in _generate_msgs
      run_ant(properties)
    File "/home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/src/main/python/rosjava_bootstrap/generate_msg_depends.py", line 111, in run_ant
      subprocess.check_call(command)
    File "/usr/lib/python2.7/subprocess.py", line 504, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['ant', '-f', '/home/oryx/ros_workspace/rosjava_core/rosjava_bootstrap/scripts/build-msg.xml', u'-Dproperties=/home/oryx/.ros/rosjava/properties/build-OryxMessages.properties', 'maven-install']' returned non-zero exit status 1

I am not sure what could be causing it. To verify that it wasn't a code problem, I removed all dependencies except rosjava and built it. Like expected, it built fine. When I added in OryxMessages as a dependency, it once again failed to compile. Again, I am confused at what happened because it was working before I removed the one message.

Thank you,

-Joseph Amato

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-03-05 07:10:29 -0500

damonkohler gravatar image

Try running the logged ant command yourself and inspect the error message for debugging clues. Clearing out .ros/rosjava is also a good step.

If you can put together a small example project that reproduces this issue reliably, please post an issue: http://code.google.com/p/rosjava/issues/list

edit flag offensive delete link more
0

answered 2012-02-25 06:05:17 -0500

ahendrix gravatar image

The rosjava build system isn't particularly robust. Try clearing out your rosjava build directory ( rm -r ~/.ros/rosjava ) and rebuilding.

edit flag offensive delete link more

Comments

Unfortunately, clearing out the directory does not help. In fact, after deleting the ~/.ros/rosjava directory, the included rosjava pubsub tutorial no longer builds with the same error. It seems as though a recent update causes the build process to fail if messages have not already been generated.

Joe gravatar imageJoe ( 2012-02-26 06:32:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2012-02-23 09:46:24 -0500

Seen: 447 times

Last updated: Mar 05 '12