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

Failing while building postgresql version 42.2.20 using ./gradlew build (postgresql:42.2.20) #3233

Closed
shivsrivastava opened this issue Apr 28, 2024 · 4 comments

Comments

@shivsrivastava
Copy link

Package artifact id: pgjdbc

source code url: https://github.com/pgjdbc/pgjdbc/tree/REL42.2.20

Issue Description: Failing while building postgresql version 42.2.20 using ./gradlew build (postgresql:42.2.20)

JDK Version: 1.8

Build CMD: ./gradlew build

MVN Version: NA

gradle version - 8.x

Error Log:

2024-04-29T02:02:06.131+0530 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API.
2024-04-29T02:02:06.685+0530 [ERROR] [system.err] C:\code\Code-Latest\postgresql42.2.20\code\pgjdbc\pgjdbc-jre6\build\jcp\preprocessMain\org\postgresql\jre7\sasl\ScramAuthenticator.java:60: error: diamond operator is not supported in -source 1.6
2024-04-29T02:02:06.689+0530 [ERROR] [system.err] List mechanisms = new ArrayList<>();
2024-04-29T02:02:06.691+0530 [ERROR] [system.err] ^
2024-04-29T02:02:06.696+0530 [ERROR] [system.err] (use -source 7 or higher to enable diamond operator)
2024-04-29T02:02:06.991+0530 [ERROR] [system.err] 1 error
2024-04-29T02:02:06.995+0530 [DEBUG] [org.gradle.internal.operations.DefaultBuildOperationRunner] Build operation 'Compile Java for :postgresql-jre6:compileJava' completed

attachement: build log attached (jdk 1.8)
Failed_java_8.txt

OS: windows 10

@davecramer
Copy link
Member

jre6 no longer builds.

Dave

@shivsrivastava
Copy link
Author

jre6 no longer builds.

Dave

Hi @davecramer , Thanks for update . Can you please let me know what was the exact issue and also please let me know which jdk version I need to use? I have tried with jdk-8 here.

@davecramer
Copy link
Member

You need to set

pgjdbc.skip.jre6=true
pgjdbc.skip.jre7=false

in gradle.properties

@vlsi
Copy link
Member

vlsi commented May 12, 2024

@shivsrivastava , you attempt building stale version, so please figure out what goes wrong.

REL42.2.20 misses this change that is vital for it to build: #2205
As a workaround you could execute ./gradlew :postgresql:removeTypeAnnotations before building 42.2.20, or you could build the latest one on the 42.2 branch which is 42.2.27.

@vlsi vlsi closed this as completed May 12, 2024
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

3 participants