Thread: Cannot build JDBC driver for PostgreSQL 7.12 on NT

Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
Pat Hardy
Date:
Hello,

When building Postgres 7.1.2, I compile the JDBC drivers. During
the compilation, I'm getting lots of errors. Can anyone tell me how I
can fix this? Please see the results of my compilation below.

Thanks.

= = = = = = =

make[3]: Entering directory `/cygdrive/c/postgresql-
7.1.2/src/interfaces/jdbc'
/cygdrive/c/ant/bin/ant -buildfile ../../../build.xml -Dmajor=7 -
Dminor=1 -Dful
version=7.1.2 -Ddef_pgport=5432
Buildfile: ..\..\..\build.xml

jar:

call:

prepare:

check_versions:

driver:
     [echo] Configured build for the JDBC2 edition driver.

compile:
    [javac] Compiling 41 source files to C:\postgresql-
7.1.2\src\interfaces\jdb
\build
    [javac] C:\postgresql-
7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
99: ';' expected
    [javac]     return ${major};
    [javac]             ^
    [javac] C:\postgresql-
7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
09: ';' expected
    [javac]     return ${minor};
    [javac]             ^
    [javac] C:\postgresql-
7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
99: cannot resolve symbol
    [javac] symbol  : variable $
    [javac] location: class org.postgresql.Driver
    [javac]     return ${major};
    [javac]            ^
    [javac] C:\postgresql-
7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
09: cannot resolve symbol
    [javac] symbol  : variable $
    [javac] location: class org.postgresql.Driver
    [javac]     return ${minor};
    [javac]            ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
    [javac] 4 errors

BUILD FAILED

C:\postgresql-7.1.2\src\interfaces\jdbc\build.xml:99: Compile failed,
messages
hould have been provided.

Total time: 5 seconds
make[3]: *** [all] Error 1
make[3]: Leaving directory `/cygdrive/c/postgresql-
7.1.2/src/interfaces/jdbc'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/cygdrive/c/postgresql-
7.1.2/src/interfaces'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/cygdrive/c/postgresql-7.1.2/src'
make: *** [all] Error 2
/cygdrive/c/postgresql-7.1.2#

Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
Jason Tishler
Date:
Pat,

On Sun, Jun 03, 2001 at 10:58:08PM -0400, Pat Hardy wrote:
> When building Postgres 7.1.2, I compile the JDBC drivers. During
> the compilation, I'm getting lots of errors. Can anyone tell me how I
> can fix this? Please see the results of my compilation below.

Sorry, but I have no idea why you are having build problems but the
following in Driver.java is very suspicious:

    [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
99: ';' expected
    [javac]     return ${major};
    [javac]             ^
    [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
09: ';' expected
    [javac]     return ${minor};

When I grep through my Driver.java, I cannot find any occurrences
of ${major} or ${minor}.  I believe that they should be 7 and 1,
respectively.  Somehow your configure/make went awry.

Nevertheless, why don't you just use the Cygwin PostgreSQL 7.1.2
distribution that contains a pre-built postgresql.jar?  You find
postgresql-7.1.2-1.tar.gz on a Cygwin mirror:

    http://www.cygwin.com/mirrors.html

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
Pat Hardy
Date:
On 4 Jun 2001, at 11:38, Jason Tishler wrote:

> Pat,
>
> On Sun, Jun 03, 2001 at 10:58:08PM -0400, Pat Hardy wrote:
> > When building Postgres 7.1.2, I compile the JDBC drivers. During
> > the compilation, I'm getting lots of errors. Can anyone tell me how I
> > can fix this? Please see the results of my compilation below.
>
> Sorry, but I have no idea why you are having build problems but the
> following in Driver.java is very suspicious:
>
>     [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
> 99: ';' expected
>     [javac]     return ${major};
>     [javac]             ^
>     [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
> 09: ';' expected
>     [javac]     return ${minor};
>
> When I grep through my Driver.java, I cannot find any occurrences
> of ${major} or ${minor}.  I believe that they should be 7 and 1,
> respectively.  Somehow your configure/make went awry.
>
> Nevertheless, why don't you just use the Cygwin PostgreSQL 7.1.2
> distribution that contains a pre-built postgresql.jar?  You find
> postgresql-7.1.2-1.tar.gz on a Cygwin mirror:
>
>     http://www.cygwin.com/mirrors.html
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone: 732.264.8770 x235
> Dot Hill Systems Corp.               Fax:   732.264.8798
> 82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
>

I did a "./configure --with-java" followed by a "make" and that's what
happened. I'll try one more time. If it doesn't work, I'll look for the
JAR file you mentioned.

Thanks.

>



Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
s0lao@netscape.net (S. L.)
Date:
[...]
> > Sorry, but I have no idea why you are having build problems but the
> > following in Driver.java is very suspicious:
> >
> >     [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
> > 99: ';' expected
> >     [javac]     return ${major};
> >     [javac]             ^      
> >     [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
> > 09: ';' expected
> >     [javac]     return ${minor};
> >

I had the same problem when tested the the .jar creation under cygwin.

It seems that the source tree comes with a Driver.java included, which has those statements (magically inserted :). A
"makeclean" followed by a "make" in src/interfaces/jdbc, solves this error, because in org/postgresql exists a
Driver.java.in,which generates the real Driver.java an actual build needs. 

The presence of the original Driver.java prevents this generation, leading to the above problem.

Regards,

                           SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
Jason Tishler
Date:
SLao,

On Wed, Jun 06, 2001 at 03:07:17AM -0400, S. L. wrote:
> I had the same problem when tested the the .jar creation under cygwin.
>
> It seems that the source tree comes with a Driver.java included,
> which has those statements (magically inserted :). A "make clean"
> followed by a "make" in src/interfaces/jdbc, solves this error, because
> in org/postgresql exists a Driver.java.in, which generates the real
> Driver.java an actual build needs.
>
> The presence of the original Driver.java prevents this generation,
> leading to the above problem.

To which source are you referring?  I just checked both the source from
a PostgreSQL mirror and the one that I uploaded to the Cygwin mirrors.
Neither contain a Driver.java.  Are you sure that Driver.java is not
left over from a previous make?

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
s0lao@netscape.net (S. L.)
Date:
[...]
> To which source are you referring?  I just checked both the source from
> a PostgreSQL mirror and the one that I uploaded to the Cygwin mirrors.
> Neither contain a Driver.java.  Are you sure that Driver.java is not
> left over from a previous make?

Ok, I must admit, I didn't check the source before neither before ./configure --with-java nor after the first make :)
Itcan be that one of these commande create the above Driver.java. I checked this in 7.1 and in 7.1.2 versions (with
sourcesfrom ftp.postgresql.org) 

Thanks,

                                   SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
Pat Hardy
Date:
> [...]
> > > Sorry, but I have no idea why you are having build problems but the
> > > following in Driver.java is very suspicious:
> > >
> > >     [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
> > > 99: ';' expected
> > >     [javac]     return ${major};
> > >     [javac]             ^      
> > >     [javac] C:\postgresql-7.1.2\src\interfaces\jdbc\org\postgresql\Driver.java:
> > > 09: ';' expected
> > >     [javac]     return ${minor};
> > >
>
> I had the same problem when tested the the .jar creation under cygwin.
>
> It seems that the source tree comes with a Driver.java included, which has those statements (magically inserted :). A
"makeclean" followed by a "make" in src/interfaces/jdbc, solves this error, because in org/postgresql exists a
Driver.java.in,which generates the real Driver.java an actual  
build needs.
>
> The presence of the original Driver.java prevents this generation, leading to the above problem.
>
> Regards,
>
>                            SLao


Thanks. The installation is built and running.

Thanks again.


_______________________________________________________________________
P Hardy Technologies Incorporated
Computer and Internet Consulting Services
PO Box 1024 - Bay Shore, LI, NY 11706-0533
http://www.phardy.com

Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
Pat Hardy
Date:
> SLao,
>
> On Wed, Jun 06, 2001 at 03:07:17AM -0400, S. L. wrote:
> > I had the same problem when tested the the .jar creation under cygwin.
> >
> > It seems that the source tree comes with a Driver.java included,
> > which has those statements (magically inserted :). A "make clean"
> > followed by a "make" in src/interfaces/jdbc, solves this error, because
> > in org/postgresql exists a Driver.java.in, which generates the real
> > Driver.java an actual build needs.
> >
> > The presence of the original Driver.java prevents this generation,
> > leading to the above problem.
>
> To which source are you referring?  I just checked both the source from
> a PostgreSQL mirror and the one that I uploaded to the Cygwin mirrors.
> Neither contain a Driver.java.  Are you sure that Driver.java is not
> left over from a previous make?
>
> Jason
>

Nope, it was brand-spankin' new. But all is well now.




_______________________________________________________________________
P Hardy Technologies Incorporated
Computer and Internet Consulting Services
PO Box 1024 - Bay Shore, LI, NY 11706-0533
http://www.phardy.com

Re: Cannot build JDBC driver for PostgreSQL 7.12 on NT

From
Pat Hardy
Date:
> [...]
> > To which source are you referring?  I just checked both the source from
> > a PostgreSQL mirror and the one that I uploaded to the Cygwin mirrors.
> > Neither contain a Driver.java.  Are you sure that Driver.java is not
> > left over from a previous make?
>
> Ok, I must admit, I didn't check the source before neither before ./configure --with-java nor after the first make :)
Itcan be that one of these commande create the above Driver.java. I checked this in 7.1 and in 7.1.2 versions (with
sourcesfrom ftp.postgresql.org) 
>
> Thanks,
>
>                                    SLao
> _____________



Yeah, you may be right. But if the build process generates it, how come I
wind up with errors during an initial build, causing me to build a second
time with the suggested procedure?

Pat




_______________________________________________________________________
P Hardy Technologies Incorporated
Computer and Internet Consulting Services
PO Box 1024 - Bay Shore, LI, NY 11706-0533
http://www.phardy.com