eProsima / Micro-XRCE-DDS-Gen

Micro XRCE-DDS IDL code generator tool. Looking for commercial support? Contact info@eprosima.com
Apache License 2.0
10 stars 13 forks source link

Fail to build Micro-XRCE-DDS-Gen #32

Open tieugiang91 opened 4 years ago

tieugiang91 commented 4 years ago

I cloned the source code from Git and also separately cloned IDL-Parser into thirdparty folder from: https://github.com/eProsima/IDL-Parser/tree/9e36ac4b18c8083ac7106761a8a6e908e04ae458 gradle build failed with the following errors: `

Task :compileJava FAILED warning: [options] source value 6 is obsolete and will be removed in a future release warning: [options] target value 1.6 is obsolete and will be removed in a future release warning: [options] To suppress warnings about obsolete options, use -Xlint:-options. /home/tyna/Data110220/Ubuntu/Makino/DDS/xrcedds/Micro-XRCE-DDS-Gen/src/main/java/com/eprosima/uxr/microxrceddsgen.java:291: error: cannot find symbol keyann.addMember(new AnnotationMember("value", new PrimitiveTypeCode(TypeCode.KIND_BOOLEAN), "true")); ^ symbol: variable KIND_BOOLEAN location: class TypeCode /home/tyna/Data110220/Ubuntu/Makino/DDS/xrcedds/Micro-XRCE-DDS-Gen/src/main/java/com/eprosima/uxr/microxrceddsgen.java:295: error: cannot find symbol topicann.addMember(new AnnotationMember("value", new PrimitiveTypeCode(TypeCode.KIND_BOOLEAN), "true")); ^ symbol: variable KIND_BOOLEAN location: class TypeCode /home/tyna/Data110220/Ubuntu/Makino/DDS/xrcedds/Micro-XRCE-DDS-Gen/src/main/java/com/eprosima/uxr/microxrceddsgen.java:298: error: constructor TemplateManager in class TemplateManager cannot be applied to given types; TemplateManager tmanager = new TemplateManager("Common"); ^ required: String,Context,boolean found: String reason: actual and formal argument lists differ in length /home/tyna/Data110220/Ubuntu/Makino/DDS/xrcedds/Micro-XRCE-DDS-Gen/src/main/java/com/eprosima/uxr/idl/grammar/Context.java:58: error: cannot find symbol if(typedecl.getTypeCode().getKind() == TypeCode.KIND_STRUCT && typedecl.isInScope()) ^ symbol: variable KIND_STRUCT location: class TypeCode 4 errors 3 warnings

FAILURE: Build failed with an exception. ` OS: Ubuntu 20.04 JDK: openjdk 11.0.8 Gradle: 4.4.1

pablogs9 commented 3 years ago

Hello, sorry for the late reply. Here you have an example step by step guide for installing this:

https://asciinema.org/a/nEJKfmwpxF6rEzCPUYdL9floe

mengchaoheng commented 2 years ago

Hello, sorry for the late reply. Here you have an example step by step guide for installing this:

https://asciinema.org/a/nEJKfmwpxF6rEzCPUYdL9floe

The video is error

mengchaoheng commented 1 year ago

The requirements "Gradle is an open-source build automation tool, version 7.0 or higher is required." in the doc are wrong, the installation of gradle 7.6 cannot compile Micro-XRCE-DDS-Gen, and the installation method shown in the video installs the 4.4.1 version of gradle, which can successfully compile Micro-XRCE-DDS-Gen. @pablogs9

Ryanf55 commented 1 year ago

I have ran into this too. Which version of Gradle should we be using?

ryan@ryan-m93p:~/Documents/ardu_ws/src/gen_ws/Micro-XRCE-DDS-Gen$ gradle --version

------------------------------------------------------------
Gradle 8.0.1
------------------------------------------------------------

Build time:   2023-02-17 20:09:48 UTC
Revision:     68959bf76cef4d28c678f2e2085ee84e8647b77a

Kotlin:       1.8.10
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.17 (Ubuntu 11.0.17+8-post-Ubuntu-1ubuntu222.04)
OS:           Linux 5.19.0-32-generic amd64

This does not work, and was installed on Linux Ubuntu 22.04, which I am using ROS2 Humble on.

pablogs9 commented 1 year ago

Is Gradle 8.0.1 the version released with Ubuntu 22.04?

Ryanf55 commented 1 year ago

No. It's 4.4.1 https://packages.ubuntu.com/jammy/gradle