You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JAVAFILES target builds a class file out of the java sources. However, it runs javac $(JFLAGS) ... , where JFLAGS is defined further up in the Makefile as -d $(pkglibdir). $(pkglibdir) is usually under /usr so not writable for a non-root user.
I think what is needed here is building the class file into a temporary build directory under the current (source) directory and then installing the class file into $pglibdir during make install.
Currently, the build fails with a cryptic error while writing JDBCUtils error that is not obviously due to permission problems:
javac -d /usr/lib/postgresql/16/lib /<<PKGBUILDDIR>>/JDBCUtils.java /<<PKGBUILDDIR>>/JDBCDriverLoader.java /<<PKGBUILDDIR>>/JDBCConnection.java /<<PKGBUILDDIR>>/resultSetInfo.java
/<<PKGBUILDDIR>>/JDBCUtils.java:29: error: error while writing JDBCUtils: /usr/lib/postgresql/16/lib/JDBCUtils.class
public class JDBCUtils {
^
Note: /<<PKGBUILDDIR>>/JDBCConnection.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
make[1]: *** [/<<PKGBUILDDIR>>/Makefile:37: JAVAFILES] Error 1
The text was updated successfully, but these errors were encountered:
Actually, on further reflection, I don't think $pkglibdir is the right directory anyway. The PL/Java project installs its .jar into the $sharedir/extension directory, as jars (and Java classes) are platform-independent.
This way, one could also leave the installation to PGXS, i.e. build the .class files in the local directory and add them to DATA_built in the Makefile while also switching pkglibdir in PG_CPPFLAGS.
The
JAVAFILES
target builds a class file out of the java sources. However, it runsjavac $(JFLAGS) ...
, whereJFLAGS
is defined further up in the Makefile as-d $(pkglibdir)
. $(pkglibdir) is usually under/usr
so not writable for a non-root user.I think what is needed here is building the class file into a temporary build directory under the current (source) directory and then installing the class file into
$pglibdir
duringmake install
.Currently, the build fails with a cryptic
error while writing JDBCUtils
error that is not obviously due to permission problems:The text was updated successfully, but these errors were encountered: