Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 67D7F9FB34E for ; Mon, 23 Apr 2007 20:57:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 52170-10 for ; Mon, 23 Apr 2007 20:57:26 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 1D6C49FA59C for ; Mon, 23 Apr 2007 20:57:31 -0300 (ADT) Received: from 222-154-134-238.jetstream.xtra.co.nz ([222.154.134.238] helo=[10.1.1.3]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1Hg8PR-00034u-Al; Tue, 24 Apr 2007 11:57:29 +1200 Message-ID: <462D47E5.6000301@opencloud.com> Date: Tue, 24 Apr 2007 11:57:25 +1200 From: Oliver Jowett User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) MIME-Version: 1.0 To: Tom Lane CC: pgsql-jdbc@postgreSQL.org Subject: Re: Can't build postgresql-jdbc-8.2-505 on Fedora 7 References: <15989.1177368625@sss.pgh.pa.us> In-Reply-To: <15989.1177368625@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/93 X-Sequence-Number: 16942 Tom Lane wrote: > So I tried to import 8.2-505 into Red Hat's development tip, and it blew > up on me with errors that look like Java version incompatibilities, > for instance > > [javac] 53. ERROR in /builddir/build/BUILD/postgresql-jdbc-8.2.505/org/postgresql/jdbc3g/Jdbc3gArray.java (at line 17) > [javac] public class Jdbc3gArray extends org.postgresql.jdbc2.AbstractJdbc2Array implements java.sql.Array > [javac] ^^^^^^^^^^^ > [javac] The type Jdbc3gArray must implement the inherited abstract method Array.getArray(long, int, Map) > [javac] ---------- > > [javac] 57. ERROR in /builddir/build/BUILD/postgresql-jdbc-8.2.505/org/postgresql/jdbc3g/Jdbc3gArray.java (at line 24) > [javac] public Object getArray(Map < String, Class < ? >> map) throws SQLException > [javac] ^^^^^^^^^^^^^ > [javac] Syntax error, parameterized types are only available if source level is 5.0 > [javac] ---------- > > The identical SRPM builds fine on my Fedora Core 6 workstation, although > I notice it says > > [echo] Configured build for the JDBC3 edition driver with SSL > > where the failed build has > > [echo] Configured build for the JDBC3g edition driver with SSL > > FC6 has java-1.4.2 where 7 has java-1.5.0. It looks like ant's java.specification.version is reporting 1.5 (hence configuring the build for "jdbc3g" -- JDBC3 + generics), but the default ant task (with no source=... parameter) is invoking a compiler that is expecting 1.4 source. I'm guessing that's because gcj is implementing 1.5 but defaulting to 1.4 source (which is different to the Sun JVM) You could try adding 'source="1.5"' as an attribute of the task. Or if you're running Ant 1.7 you can pass -Dant.build.javac.source=1.5 on the ant command line. (both untested) -O