Re: 7.3b1 installation - Mailing list pgsql-general

From Bruce Momjian
Subject Re: 7.3b1 installation
Date
Msg-id 200209061431.g86EVYC18111@candle.pha.pa.us
Whole thread Raw
In response to Re: 7.3b1 installation  (Jeff Davis <list-pgsql-general@empires.org>)
List pgsql-general
OK, patch applied to test JAVA_HOME and throw appropriate error before
searching for Ant.  Autoconf run.

---------------------------------------------------------------------------

Jeff Davis wrote:
> Yes, JAVA_HOME is correct. A test as you mention would have made it easier for
> me to determine the problem than "ant doesn't work". A minor problem, but
> certainly worth testing for.
>
> Thanks!
>
> Regards,
>     Jeff Davis
>
> On Friday 06 September 2002 02:29 am, Thomas O'Dowd wrote:
> > Jeff,
> >
> > I imagine that this was the variable JAVA_HOME? The current
> > configuration seems to assume that you have this set. The configure
> > script should probably check that this variable to be set to a directory
> > and ask the user to set this first instead of failing with the vague
> > message that Ant doesn't work.
> >
> > Probably something like this...
> >
> > if test ! -d "$JAVA_HOME" ; then
> >     AC_MSG_ERROR([Set JAVA_HOME variable to build Java components])
> > fi
> >
> > This could be done before the path test in configure.in?
> >
> > Tom.
> >
> > On Fri, 2002-09-06 at 05:52, Jeff Davis wrote:
> > > Oh, I see. I found the problem. My environment variables appearently
> > > weren't set right, so when it tested ant, it got an error with the java
> > > compiler, and exited with nonzero. So, I guess technically ant was
> > > working fine, but the java compiler wasn't. Thanks for the test case,
> > > Tom, and for the advice from all who responded.
> > >
> > > Regards,
> > >     Jeff Davis
> > >
> > > On Thursday 05 September 2002 01:20 pm, Tom Lane wrote:
> > > > Jeff Davis <list-pgsql-general@empires.org> writes:
> > > > > I have ant 1.5 already.
> > > > >
> > > > > When I run "./configure --with-java" I get:
> > > > > ----
> > > > > checking whether /usr/bin/ant works... no
> > > > > configure: error: ant does not work
> > > > > ----
> > > >
> > > > Hmph.  Well, the test that configure is running seems pretty
> > > > straightforward:
> > > >
> > > >     cat > conftest.java << EOF
> > > > public class conftest {
> > > >     int testmethod(int a, int b) {
> > > >         return a + b;
> > > >     }
> > > > }
> > > > EOF
> > > >
> > > >     cat > conftest.xml << EOF
> > > > <project name="conftest" default="conftest">
> > > >  <target name="conftest">
> > > >   <javac srcdir="." includes="conftest.java">
> > > >   </javac>
> > > >  </target>
> > > > </project>
> > > > EOF
> > > >
> > > >     pgac_cmd='$ANT -buildfile conftest.xml 1>&2'
> > > >     { (eval echo "$as_me:$LINENO: \"$pgac_cmd\"") >&5
> > > >   (eval $pgac_cmd) 2>&5
> > > >   ac_status=$?
> > > >   echo "$as_me:$LINENO: \$? = $ac_status" >&5
> > > >   (exit $ac_status); }
> > > >     pgac_save_status=$?
> > > >     if test $? = 0 && test -f ./conftest.class ; then
> > > >       pgac_cv_prog_ant_works=yes
> > > >     else
> > > >       echo "configure: failed java program was:" >&5
> > > >       cat conftest.java >&5
> > > >       echo "configure: failed build file was:" >&5
> > > >       cat conftest.xml >&5
> > > >       pgac_cv_prog_ant_works=no
> > > >     fi
> > > >
> > > > In English, that's creating conftest.java and conftest.xml and then
> > > > running "/usr/bin/ant -buildfile conftest.xml".  If ant returns nonzero
> > > > exit status or doesn't create conftest.class, then it's considered
> > > > broken.  What happens if you try the same thing by hand?
> > > >
> > > > (Alternatively, look into the config.log to see what configure thought
> > > > happened.)
> > > >
> > > >             regards, tom lane
> > > >
> > > > ---------------------------(end of
> > > > broadcast)--------------------------- TIP 3: if posting/reading through
> > > > Usenet, please send an appropriate subscribe-nomail command to
> > > > majordomo@postgresql.org so that your message can get through to the
> > > > mailing list cleanly
> > >
> > > ---------------------------(end of broadcast)---------------------------
> > > TIP 4: Don't 'kill -9' the postmaster
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: configure.in
===================================================================
RCS file: /cvsroot/pgsql-server/configure.in,v
retrieving revision 1.206
diff -c -c -r1.206 configure.in
*** configure.in    5 Sep 2002 18:28:45 -0000    1.206
--- configure.in    6 Sep 2002 14:28:58 -0000
***************
*** 371,376 ****
--- 371,379 ----
  AC_MSG_CHECKING([whether to build Java/JDBC tools])
  PGAC_ARG_BOOL(with, java, no, [  --with-java             build JDBC interface and Java tools],
  [AC_MSG_RESULT(yes)
+ if test ! "$JAVA_HOME" -o ! -d "$JAVA_HOME" ; then
+   AC_MSG_ERROR([Set the JAVA_HOME environment variable to build Java components])
+ fi
  PGAC_PATH_ANT
  if test -z "$ANT"; then
    AC_MSG_ERROR([Ant is required to build Java components])

pgsql-general by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: What is 'Postgres'?
Next
From: Bruce Momjian
Date:
Subject: Re: AutoCommit mode in PostgreSQL (7.3 beta1 from CVS 05.09.2002)