Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
tieugiang91 opened this issue Oct 14, 2020 · 6 comments
Open

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

tieugiang91 opened this issue Oct 14, 2020 · 6 comments

Comments

@tieugiang91
Copy link

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
Copy link
Member

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

https://asciinema.org/a/nEJKfmwpxF6rEzCPUYdL9floe

@mengchaoheng
Copy link

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
Copy link

mengchaoheng commented Jan 31, 2023

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
Copy link
Contributor

Ryanf55 commented Feb 24, 2023

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
Copy link
Member

Is Gradle 8.0.1 the version released with Ubuntu 22.04?

@Ryanf55
Copy link
Contributor

Ryanf55 commented Mar 14, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants