Skip site navigation (1) Skip section navigation (2)

Bug #611: configure script produces incorrect results under IRIX

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #611: configure script produces incorrect results under IRIX
Date: 2002-03-11 07:08:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
Jonathan C. Patschke (jp(at)celestrion(dot)net) reports a bug with a severity of 2
The lower the number the more severe it is.

Short Description
configure script produces incorrect results under IRIX

Long Description
Under IRIX (and, presumably, other commercial UNIX platforms), the configure script in the root of the source distribution causes a number of tests to fail, where they should pass.  Some of these tests (detecting the presence of vsnprintf() and snprintf() in the system headers, for example) must pass for the resulting code to compile with MIPSpro C.

The root cause of this problem is that the script interpreter for the configure script is /bin/sh.  The configure script is NOT a /bin/sh compatible script.  It requires GNU BASH to execute properly.  This may, in all actuality, be an autoconf bug or an IRIX /bin/sh bug, but it hindered my using PostgreSQL.

WORKAROUND:  Edit the configure script to run under /usr/freeware/bin/bash, rather than /bin/sh.  Or call the script as "bash configure [options]"

SUGGESTED SOLUTION:  Since not everyone installs bash in the same location. the configure script should test its interpreter and throw an error if not running inside BASH.

Sample Code
Inserting the following code into the configure script will produce the effect I recommended above.  I placed the code just before the line reading "# Defaults:", and it worked well for me; however, putting it -after- the help generation code exits might be more fruitful.  I'm not an autoconf guru, so I wouldn't know where to put the code in

## Begin sample code
if [ "" = "$BASH_VERSION" ] ; then
   echo '*** ERROR: Not running in BASH ***'
   echo ''
   echo "The PostgreSQL configure script requires the GNU BASH"
   echo "command interpreter.  If you do not have a copy of BASH,"
   echo "you may obtain one at the following URL:"
   echo ''
   echo ""
   echo ''
   echo "If BASH is already installed on your system, please execute"
   echo "the configure script in the following manner:"
   echo ''
   echo '   bash configure [options]'
   echo ''
   exit 1;
## End sample code

No file was uploaded with this report


pgsql-bugs by date

Next:From: Bhuvan ADate: 2002-03-11 07:21:19
Subject: Re: comparing null value in plpgsql.
Previous:From: bhuvanbkDate: 2002-03-11 07:03:08
Subject: Re: comparing null value in plpgsql.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group