tada / pljava

PL/Java is a free add-on module that brings Java™ Stored Procedures, Triggers, Functions, Aggregates, Operators, Types, etc., to the PostgreSQL™ backend.
http://tada.github.io/pljava/
Other
242 stars 77 forks source link

PL/JAVA 1.5.6 fails with EnterpriseDB 15.2 #427

Open Nick-712 opened 1 year ago

Nick-712 commented 1 year ago

Not sure how to build using MSVC . Getting below linker issue .

[INFO] Timestamp.obj : error LNK2001: unresolved external symbol _errstart [ERROR] Timestamp.obj : error LNK2001: unresolved external symbol _errstart [INFO] TupleTable.obj : error LNK2001: unresolved external symbol _errstart [ERROR] TupleTable.obj : error LNK2001: unresolved external symbol _errstart [INFO] JNICalls.obj : error LNK2001: unresolved external symbol _errstart [ERROR] JNICalls.obj : error LNK2001: unresolved external symbol _errstart [INFO] PgObject.obj : error LNK2001: unresolved external symbol _errstart [ERROR] PgObject.obj : error LNK2001: unresolved external symbol _errstart [INFO] PgSavepoint.obj : error LNK2001: unresolved external symbol _errstart [ERROR] PgSavepoint.obj : error LNK2001: unresolved external symbol _errstart [INFO] Portal.obj : error LNK2001: unresolved external symbol _errstart [ERROR] Portal.obj : error LNK2001: unresolved external symbol _errstart [INFO] ExecutionPlan.obj : error LNK2001: unresolved external symbol _errstart [ERROR] ExecutionPlan.obj : error LNK2001: unresolved external symbol _errstart [INFO] Function.obj : error LNK2001: unresolved external symbol _errstart [ERROR] Function.obj : error LNK2001: unresolved external symbol _errstart [INFO] InstallHelper.obj : error LNK2001: unresolved external symbol _errstart [ERROR] InstallHelper.obj : error LNK2001: unresolved external symbol _errstart [INFO] Invocation.obj : error LNK2001: unresolved external symbol _errstart [ERROR] Invocation.obj : error LNK2001: unresolved external symbol _errstart [INFO] AclId.obj : error LNK2001: unresolved external symbol _errstart [ERROR] AclId.obj : error LNK2001: unresolved external symbol _errstart [INFO] Backend.obj : error LNK2001: unresolved external symbol _errstart [ERROR] Backend.obj : error LNK2001: unresolved external symbol _errstart [INFO] Composite.obj : error LNK2001: unresolved external symbol _errstart [ERROR] Composite.obj : error LNK2001: unresolved external symbol _errstart [INFO] Exception.obj : error LNK2001: unresolved external symbol _errstart [ERROR] Exception.obj : error LNK2001: unresolved external symbol _errstart [INFO] Type.obj : error LNK2019: unresolved external symbol _errfinish referenced in function _Type_fromJavaType [ERROR] Type.obj : error LNK2019: unresolved external symbol _errfinish referenced in function _Type_fromJavaType

ran the mvn command via developer command prompt from msvc .

Java version 1.8._231 and same JRE . Enterprisedb 15.2 Windows Server 2012 64 bit

enviornment path has java , edb lib and edb include and bin paths .

Also some issue related to String and other was made using https://github.com/tada/pljava/commit/070a6a549ff41ca364aa9a8ea6ab902e932395a6#diff-5b780505df5ec631808ff70b8820bc152bbafc7569543971e255f6c281cc3d7c

and this https://github.com/tada/pljava/pull/413/files

image

arey-netceler commented 5 months ago

Hello,

Same issue here with Windows 11 / Java 17 / Enterprisedb 16.2

Thanks a lot !

jcflack commented 5 months ago

Unresolved external symbols _errstart and _errfinish?

I don't have an EnterpriseDB installation handy to test against. The _errstart and _errfinish symbols are used in vanilla PostgreSQL's backend error logging system:

https://www.postgresql.org/docs/current/error-message-reporting.html

https://github.com/postgres/postgres/blob/master/src/include/utils/elog.h#L99

Also, the screenshot attached in the first comment shows another unresolved external symbol, _UnregisterXactCallback.

I would have to speculate that EnterpriseDB has made some incompatible change to the way vanilla PostgreSQL works in those areas, and corresponding patches to PL/Java would be needed to build on EDB. The patches might have to be developed by someone with access to the EDB .h files to refer to and an EDB installation to test on.

(Any EDB customer who is able to compile other extensions does have the .h files installed.)