Repository navigation
Errors when compiling 1.6.4 against PostgreSQL 15 #412
Copy link
Copy link
Closed
Description
When compiling PL/Java 1.6.4 against PostgreSQL 15.0 I get (many instances of) the below error:
[INFO] Using compiling/linking rules for Linux
In file included from /home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/c/Backend.c:59:
/home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/include/pljava/type/String.h:32:25: error: conflicting types for ‘String’
typedef struct String_* String;
^~~~~~
In file included from /opt/foo/postgres/15/include/server/nodes/parsenodes.h:28,
from /opt/foo/postgres/15/include/server/utils/guc.h:16,
from /opt/foo/postgres/15/include/server/access/tableam.h:23,
from /opt/foo/postgres/15/include/server/commands/trigger.h:16,
from /opt/foo/postgres/15/include/server/executor/spi.h:16,
from /home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/c/Backend.c:19:
/opt/foo/postgres/15/include/server/nodes/value.h:61:3: note: previous declaration of ‘String’ was here
} String;
^~~~~~
As well as these:
/home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/c/type/Type.c: In function ‘TypeClass_alloc2’:
/home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/c/type/Type.c:1084:26: warning: cast between incompatible function types from ‘void (*)(struct PgObject_ *)’ to ‘jvalue (*)(struct Type_ *, Datum)’ {aka ‘union jvalue (*)(struct Type_ *, long unsigned int)’} [-Wcast-function-type]
self->coerceDatum = (DatumCoercer)_PgObject_pureVirtualCalled;
^
/home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/c/type/Type.c:1085:26: warning: cast between incompatible function types from ‘void (*)(struct PgObject_ *)’ to ‘Datum (*)(struct Type_ *, struct _jobject *)’ {aka ‘long unsigned int (*)(struct Type_ *, struct _jobject *)’} [-Wcast-function-type]
self->coerceObject = (ObjectCoercer)_PgObject_pureVirtualCalled;
^
/home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/c/type/Type.c: In function ‘Type_registerType’:
/home/builder/rpmbuild/BUILD/pljava-1_6_4/pljava-so/src/main/c/type/Type.c:1176:3: warning: cast between incompatible function types from ‘void (*)(struct PgObject_ *)’ to ‘struct Type_ * (*)(Oid)’ {aka ‘struct Type_ * (*)(unsigned int)’} [-Wcast-function-type]
(TypeObtainer)_PgObject_pureVirtualCalled);
^
This particular compilation was against openjdk-latest on RHEL8 which is Java 19.
Metadata
Metadata
Assignees
Labels
No labels
Activity
[-]Compiling 1.6.4 against PostgreSQL 15[/-][+]Errors when compiling 1.6.4 against PostgreSQL 15[/+]caseylai commentedon Nov 10, 2022
Same issue here. Currently the only way is downgrade PostgreSQL to 14.
kjraman commentedon Nov 14, 2022
Hi @caseylai
Are you able to complete the mvn build?
I'm using docker and having the same issue.
I tried with PostgreSQL 13 and 15 . Same issue.
openjdk-11 is not availble. the least version available is openjdk-17. Still same issue.
If someone help to overcome this it is highly appreciated.
caseylai commentedon Nov 14, 2022
@kjraman I completed the mvn build with PostgreSQL 14.6 and PL/Java 1.6.4 (OpenJDK 11 and 17 both okay) following the build tutorial. But failed with PG 15 (including 15.0 and 15.1).
yevon commentedon Nov 14, 2022
Really interested in this also, as I'm unable to make it to work with postgresql 15. I think that this is due to the strict type verifications of postgresql 15, as char and text are treated differently, I came with this issue in other libraries too (PostgREST).
yevon commentedon Nov 14, 2022
I'm not very used to maven, could somebody help me to check why my build is failing?
What I did:
Errors received:
[ERROR] Failed to parse plugin descriptor for org.postgresql:pljava-pgxs:1.6.4 (/mnt/c/Users/gabri/Documents/Proyectos/Education/library-pl-java/pljava-pgxs/target/classes): No plugin descriptor found at META-INF/maven/plugin.xml -> [Help 1]
fmbiete commentedon Nov 15, 2022
1.6.4 is not compatible with PostgreSQL v15, to make it build you need to apply the changes proposed in #413
jcflack commentedon Jun 5, 2023
Pull request #437 has been merged, to appear in the next release.
jcflack commentedon Jun 14, 2023
Believed resolved in 1.6.5.