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

Amazon Kinesis Video Streams parser library is for developers to include in their applications that makes it easy to work with the output of video streams such as retrieving frame-level objects, metadata for fragments, and more.
Apache License 2.0
103 stars 52 forks source link

[BUG] Compile failure on v1.2.3 #155

Closed byongwu closed 2 years ago

byongwu commented 2 years ago

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

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):

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

Thanks in advance.

niyatim23 commented 2 years ago

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?

byongwu commented 2 years ago

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

byongwu commented 2 years ago

@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?

niyatim23 commented 2 years ago

@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)
byongwu commented 2 years ago

@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.

Thank you!

byongwu commented 2 years ago

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,

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

asyschikov commented 2 years ago

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.

chie2727 commented 5 months ago

Was experiencing the same issue on Amazon Linux 2023. Switching to JDK 11 definitely solves the problem: sudo yum install java-11-amazon-corretto java-11-amazon-corretto-devel maven-amazon-corretto11