./configure --with-java fails - Mailing list pgsql-general
From | Markus Wollny |
---|---|
Subject | ./configure --with-java fails |
Date | |
Msg-id | 2266D0630E43BB4290742247C8910575059E703F@dozer.computec.de Whole thread Raw |
Responses |
Re: ./configure --with-java fails
|
List | pgsql-general |
Hi!
I am trying to build PostgreSQL 7.4.3 with Java enabled; I've got Apache Ant version 1.5 and j2sdk1.4.1_05 installed:
Verifiying ant:
# which javac
/usr/java/j2sdk1.4.1_05/bin/javac
# ant -version
Apache Ant version 1.5 compiled on October 15 2002
/usr/java/j2sdk1.4.1_05/bin/javac
# ant -version
Apache Ant version 1.5 compiled on October 15 2002
Verifying java-compiler:
# which javac
/usr/java/j2sdk1.4.1_05/bin/javac
/usr/java/j2sdk1.4.1_05/bin/javac
Verifying environment variables:
# export|grep java
declare -x JAVA_BINDIR="/usr/java/j2sdk1.4.1_05/bin"
declare -x JAVA_HOME="/usr/java/j2sdk1.4.1_05"
declare -x JAVA_ROOT="/usr/java/j2sdk1.4.1_05"
declare -x JRE_HOME="/usr/java/j2sdk1.4.1_05/jre"
declare -x PATH="/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/kde3/bin:/usr/java/j2sdk1.4.1_05/bin:/usr/java/j2sdk1.4.1_05/jre/bin"
declare -x JAVA_BINDIR="/usr/java/j2sdk1.4.1_05/bin"
declare -x JAVA_HOME="/usr/java/j2sdk1.4.1_05"
declare -x JAVA_ROOT="/usr/java/j2sdk1.4.1_05"
declare -x JRE_HOME="/usr/java/j2sdk1.4.1_05/jre"
declare -x PATH="/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/kde3/bin:/usr/java/j2sdk1.4.1_05/bin:/usr/java/j2sdk1.4.1_05/jre/bin"
I ran the ./configure-script as follows:
./configure --prefix=/opt/pgsql --datadir=/var/lib/pgsql/data/base --enable-locale --with-perl --with-java --enable-odbc --enable-syslog
The last lines of configure-output are
checking whether to build Java/JDBC tools... yes
checking for jakarta-ant... no
checking for ant... /usr/bin/ant
checking whether /usr/bin/ant works... no
configure: error: ant does not work
checking for ant... /usr/bin/ant
checking whether /usr/bin/ant works... no
configure: error: ant does not work
The configure.log contains the following relevant lines:
configure:3139: checking whether to build Java/JDBC tools
configure:3150: result: yes
configure:3157: checking for jakarta-ant
configure:3190: result: no
configure:3157: checking for ant
configure:3175: found /usr/bin/ant
configure:3187: result: /usr/bin/ant
configure:3198: checking whether /usr/bin/ant works
configure:3222: /usr/bin/ant -buildfile conftest.xml 1>&2
Buildfile: conftest.xml
configure:3150: result: yes
configure:3157: checking for jakarta-ant
configure:3190: result: no
configure:3157: checking for ant
configure:3175: found /usr/bin/ant
configure:3187: result: /usr/bin/ant
configure:3198: checking whether /usr/bin/ant works
configure:3222: /usr/bin/ant -buildfile conftest.xml 1>&2
Buildfile: conftest.xml
conftest:
[javac] Compiling 1 source file
[javac] Modern compiler not found - looking for classic compiler
[javac] Compiling 1 source file
[javac] Modern compiler not found - looking for classic compiler
BUILD FAILED
file:/usr/src/postgresql/postgresql-7.4.3/conftest.xml:3: Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
file:/usr/src/postgresql/postgresql-7.4.3/conftest.xml:3: Cannot use classic compiler, as it is not available. A common solution is to set the environment variable JAVA_HOME to your jdk directory.
Total time: 2 seconds
configure:3225: $? = 1
configure: failed java program was:
public class conftest {
int testmethod(int a, int b) {
return a + b;
}
}
configure: failed build file was:
<project name="conftest" default="conftest">
<target name="conftest">
<javac srcdir="." includes="conftest.java">
</javac>
</target>
</project>
configure:3241: result: no
configure:3245: error: ant does not work
configure:3225: $? = 1
configure: failed java program was:
public class conftest {
int testmethod(int a, int b) {
return a + b;
}
}
configure: failed build file was:
<project name="conftest" default="conftest">
<target name="conftest">
<javac srcdir="." includes="conftest.java">
</javac>
</target>
</project>
configure:3241: result: no
configure:3245: error: ant does not work
Help would be very much appreciated; on second thoughts: Is it at all necessary to build the JDBC-driver myself or can I safely use the precompiled .jar-file from http://jdbc.postgresql.org/download.html on my clients? And if I compile without the --with-java, will the resulting PostgreSQL-server-installation have any shortcomings in integrating with JDBC-applications? What exactly are the "Java/JDBC tools" aside from the JDBC-driver jar-file?
Kind regards
Markus
pgsql-general by date: