pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-jdbc@postgreSQL.org
Subject: Re: Can't build postgresql-jdbc-8.2-505 on Fedora 7
Date: Tue, 24 Apr 2007 11:57:25 +1200
Message-ID: <462D47E5.6000301@opencloud.com> (raw)
In-Reply-To: <15989.1177368625@sss.pgh.pa.us>
References: <15989.1177368625@sss.pgh.pa.us>

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 <javac> 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 <javac> 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



view thread (9+ messages)  latest in thread

Message-ID: <462D47E5.6000301@opencloud.com>
Permalink:  ../462D47E5.6000301@opencloud.com/
Also on:    postgresql.org/message-id/462D47E5.6000301@opencloud.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: oliver@opencloud.com, tgl@sss.pgh.pa.us
  Subject: Re: Can't build postgresql-jdbc-8.2-505 on Fedora 7
  In-Reply-To: <462D47E5.6000301@opencloud.com>
  References: <15989.1177368625@sss.pgh.pa.us> <462D47E5.6000301@opencloud.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox