lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
980 stars 388 forks source link

Install instructions have wrong openjdk dependency for Ubuntu 18.04 and 20.04 #330

Open lauralindzey opened 4 years ago

lauralindzey commented 4 years ago

The instructions here indicate that default-jdk is a dependency for LCM. However, that leads to a build failure related to hamcrest:

[ 95%] Building Java objects for hamcrest-core.jar
org/hamcrest/core/AllOf.java:60: error: no suitable method found for allOf(List<Matcher<? super T#1>>)
        return allOf(Arrays.asList(matchers));
               ^
    method AllOf.<T#2>allOf(Iterable<Matcher<? super T#2>>) is not applicable
      (inference variable T#3 has incompatible bounds
        equality constraints: Matcher<? super CAP#1>
        lower bounds: Matcher<? super T#1>)

Using openjdk-8-jdk fixed the issue:

$ sudo apt remove default-jdk
$ sudo apt autoremove
$ sudo apt install openjdk-8-jdk
ashuang commented 4 years ago

Thanks for the report, do you mind submitting a PR?

bluesquall commented 3 years ago

Looks like there may have been a fix upstream — LCM builds from master @ 501bb44 on Ubuntu 20.04.1 LTS without any problems now, using default-jdk (openjdk11).

Also built and ran lcm-spy without problems with openjdk 11 on arch Linux.