aws/amazon-kinesis-video-streams-parser-library

[BUG] Compile failure on v1.2.3

byongwu opened this issue · 8 comments

Logging

< snip >
[ERROR] /Users/byochong/code/amazon-kinesis-video-streams-parser-library/target/generated-sources/delombok/com/amazonaws/kinesisvideo/parser/utilities/OutputSegmentMerger.java:[397,24] duplicate default label
[ERROR] /Users/byochong/code/amazon-kinesis-video-streams-parser-library/target/generated-sources/delombok/com/amazonaws/kinesisvideo/parser/utilities/OutputSegmentMerger.java:[406,24] duplicate default label
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

Describe the bug
Compile fails with mvn clean install.

SDK version number
v1.2.2 or git:68f80586b4206d765a737435f0bb179585364ff6

Open source building

  • maven version
/Users/byochong/code/amazon-kinesis-video-streams-parser-library % mvn --version
Apache Maven 3.8.4 (9b656c72d54e5bacbed989b64718c159fe39b537)
Maven home: /usr/local/Cellar/maven/3.8.4/libexec
Java version: 17.0.2, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home
Default locale: en_KR, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.7", arch: "x86_64", family: "mac"
  • java version
/Users/byochong/code/amazon-kinesis-video-streams-parser-library % java --version
openjdk 11.0.12 2021-07-20
OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)
  • javac version
/Users/byochong/code/amazon-kinesis-video-streams-parser-library % javac --version
javac 11.0.12

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/aws/amazon-kinesis-video-streams-parser-library/
  2. cd amazon-kinesis-video-streams-parser-library
  3. mvn clean install

Expected behavior
No compile errors

Screenshots
Uploading image.png…

Desktop (please complete the following information):

  • OS: MacOS Catalina 10.15.7 (19H1715)
  • Browser: Chrome
  • Version

Additional context
There seems to be a related bug in projectlombok/lombok#3087. But that issue is closed, any chance I am doing it wrong or the lombok version being old?

Thanks in advance.

Hi @byongwu, I'm not able to reproduce this issue with Java 11 (OpenJDK) and maven 3.8.4. Have you made any changes to the code? We have a new release v1.2.3, can you please try that out and see if the issue persists?

@niyatim23 No, I haven't made any change to the code. Yes, I will get the new code and try out.

@niyatim23 I tested with v1.2.3 (the latest) and the failure still happens. Just in case, I posted the full log (log.txt). Do you think I am missing something?

@byongwu, I'm not sure. Can you please try using the following java configuration and see if that works for you:

openjdk 11.0.14 2022-01-18 LTS
OpenJDK Runtime Environment Corretto-11.0.14.9.1 (build 11.0.14+9-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.14.9.1 (build 11.0.14+9-LTS, mixed mode)

@niyatim23 . Thanks for the guidance.
Just in case, I used Cloud9 + ubuntu 18.04 LTS and installed Maven (sudo apt install maven)
It worked! Looks like it was local dev environment issue. I will use Cloud9 instead of my local Mac book.

  • Java version
$ java --version
openjdk 11.0.13 2021-10-19
OpenJDK Runtime Environment (build 11.0.13+8-Ubuntu-0ubuntu1.18.04)
OpenJDK 64-Bit Server VM (build 11.0.13+8-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
  • Maven version
$ mvn --version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 11.0.13, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-1065-aws", arch: "amd64", family: "unix"

Thank you!

Just to let you know that I got my Mac compiled as well. It was the problem that maven@3.8.4 internally installed openjdk@17.0.2 at /usr/local/Cellar/openjdk/17.0.2/libexec/openjdk.jdk/Contents/Home and caused the "too high java version" problem.

In order to resolve this problem,

  • I reinstalled openjdk@11 via brew reinstall openjdk@11
  • Then set the $JAVA_HOME so that Maven can override internal openjdk@17: export JAVA_HOME=/usr/local/opt/openjdk@11

Therefore, maven@3.8.4 + openjdk@11.0.12 is working.

Same error, here is my config:

~/Projects/amazon-kinesis-video-streams-parser-library [isen-media] % java --version
openjdk 18.0.1 2022-04-19
OpenJDK Runtime Environment Homebrew (build 18.0.1+0)
OpenJDK 64-Bit Server VM Homebrew (build 18.0.1+0, mixed mode, sharing)
~/Projects/amazon-kinesis-video-streams-parser-library [isen-media] % mvn --version
Apache Maven 3.8.5 (3599d3414f046de2324203b78ddcf9b5e4388aa0)
Maven home: /usr/local/Cellar/maven/3.8.5/libexec
Java version: 18.0.1, vendor: Homebrew, runtime: /usr/local/Cellar/openjdk/18.0.1/libexec/openjdk.jdk/Contents/Home
Default locale: en_NL, platform encoding: UTF-8
OS name: "mac os x", version: "12.3.1", arch: "x86_64", family: "mac"

Although when I switch to JDK 11 (Correto) it started working.