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

Gradle 7.0 and Ubuntu 22.04 and JVM 11 fail to compile #44

Closed Ryanf55 closed 1 year ago

Ryanf55 commented 1 year ago

Hello. I am trying to use Micro XRCE DDS Gen. I have been able to build and run the Micro XRCE DDS Agent and use it, however, I can't make my own application because the generator doesn't work.

Additionally, there is no docker image for MicroXRCE DDS Gen that I can tell. The EProsima downloads server seems to be down right now, so I cannot check.

As far as gradle version, from previous work with DDS using FastDDSGen, it says to use the latest gradle. For MicroXRCEDDSGen, the docs say version 7.0 or higher is required.

Any recommendations to fix this error are appreciated. Thanks!

Try building

ryan@ryan-m93p:~/Documents/ardu_ws/src/gen_ws/Micro-XRCE-DDS-Gen$ gradle build -Dbranch=v1.2.5

FAILURE: Build failed with an exception.

* Where:
Build file '/home/ryan/Documents/ardu_ws/src/gen_ws/Micro-XRCE-DDS-Gen/build.gradle' line: 26

* What went wrong:
A problem occurred evaluating root project 'Micro-XRCE-DDS-Gen'.
> Could not find method compile() for arguments [file collection] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 219ms

Gradle Version

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

------------------------------------------------------------
Gradle 7.0
------------------------------------------------------------

Build time:   2021-04-09 22:27:31 UTC
Revision:     d5661e3f0e07a8caff705f1badf79fb5df8022c4

Kotlin:       1.4.31
Groovy:       3.0.7
Ant:          Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM:          11.0.17 (Ubuntu 11.0.17+8-post-Ubuntu-1ubuntu222.04)
OS:           Linux 5.19.0-32-generic amd64

Git hash

ryan@ryan-m93p:~/Documents/ardu_ws/src/gen_ws/Micro-XRCE-DDS-Gen$ git log -n 1
commit e99cdf4ab896f3645926584fd095b997cf973fd3 (HEAD -> master, tag: v1.1.0, origin/master, origin/HEAD)
Merge: e27c0b5 00206a6
Author: Pablo Garrido <pablogs9@gmail.com>
Date:   Fri May 8 07:54:30 2020 +0200

    Merge pull request #31 from eProsima/v1.1.0

    Release v1.1.0
pablogs9 commented 1 year ago

Hello @Ryanf55, I have been testing and it works with the gradle version that apt install gradle provides (4.4.1) in 22.04. I have planned for the next release to check compatibility with gradle 7, but since it is not distributed with latest Ubuntu LTS it is not a priority.

If you find a fix, please open a PR.

Ryanf55 commented 1 year ago

Ok. If I use sdkman to install gradle, it doesn't work, even when I use sdkman it to install 4.4.1. If, instead, I install gradle with apt.

As a fix, I'm happy to update the installation documentation saying to install gradle with apt, rather than using latest or >7.0. I only have time to contribute doc changes at this point.

pablogs9 commented 1 year ago

That would be great, thanks

pablogs9 commented 1 year ago

Hello, the approach changed: https://github.com/eProsima/Micro-XRCE-DDS-Gen/pull/47

Just make a ./gradlew assemble on the recursive cloned repo.

Can we close this?

Ryanf55 commented 1 year ago

Just tested on Ubuntu 22.04, it works. Thanks!

The docs here were good.