pg_config broken in 7.1.1 on FreeBSD with Tcl + Java

Started by Glenn Trewittalmost 25 years ago4 messagesbugs
Jump to latest
#1Glenn Trewitt
glenn@trewitt.org

When I build PostgreSQL 7.1.1 from the port on FreeBSD 4.3, pg_config
gets built with a syntax error in the "val_configure=..." line. It
looks like multiple levels of single quotes, where different kinds of
quotes should have been used.

This gives an error when pg_config is executed, and the --configure
option produces no output.

Thanks!
- Glenn Trewitt

Here is the beginning of pg_config:

#! /bin/sh

# This shell script saves various pieces of information about the
# installed version of PostgreSQL. Packages that interface to
# PostgreSQL can use it to configure their build.
#
# Author: Peter Eisentraut <peter_e@gmx.net>
# Public domain

# $Header:
/home/projects/pgsql/cvsroot/pgsql/src/bin/pg_config/pg_config.sh,v 1.2
2000
/11/11 22:59:47 petere Exp $

me=`basename $0`

# stored configuration values
val_bindir='/usr/local/bin'
val_includedir='/usr/local/include/pgsql'
val_libdir='/usr/local/lib'
val_configure='--enable-locale --enable-syslog --with-CXX
--sysconfdir=/usr/local/etc/p
ostgresql '--with-includes=/usr/local/include /usr/local/include/tcl8.3
/usr/local/incl
ude/tk8.3' --with-libraries=/usr/local/lib --docdir=/usr/local/share/doc
--includedir=/
usr/local/include/pgsql --with-java --with-openssl --enable-multibyte
--with-tcl '--wit
h-tclconfig=/usr/local/lib/tcl8.3 /usr/local/lib/tk8.3'
--with-tkconfig=/usr/local/lib/
tk8.3 --prefix=/usr/local i386--freebsd4.3'
val_version='7.1.1'

help="\
$me provides information about the installed version of PostgreSQL.

Usage: $me --bindir | --includedir | --libdir | --configure | --version

Operation modes:
--bindir show location of user executables
--includedir show location of C header files
--libdir show location of object code libraries
--configure show options given to 'configure' script when
PostgreSQL was built
--version show PostgreSQL version and exit

Report bugs to <pgsql-bugs@postgresql.org>."

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Glenn Trewitt (#1)
Re: pg_config broken in 7.1.1 on FreeBSD with Tcl + Java

Glenn Trewitt writes:

When I build PostgreSQL 7.1.1 from the port on FreeBSD 4.3, pg_config
gets built with a syntax error in the "val_configure=..." line. It
looks like multiple levels of single quotes, where different kinds of
quotes should have been used.

What is the configure line that this installation uses?

val_configure='--enable-locale --enable-syslog --with-CXX
--sysconfdir=/usr/local/etc/p
ostgresql '--with-includes=/usr/local/include /usr/local/include/tcl8.3
/usr/local/incl
ude/tk8.3' --with-libraries=/usr/local/lib --docdir=/usr/local/share/doc
--includedir=/
usr/local/include/pgsql --with-java --with-openssl --enable-multibyte
--with-tcl '--wit
h-tclconfig=/usr/local/lib/tcl8.3 /usr/local/lib/tk8.3'
--with-tkconfig=/usr/local/lib/
tk8.3 --prefix=/usr/local i386--freebsd4.3'

Where do these extra quotes come from?

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter

#3Glenn Trewitt
glenn@trewitt.org
In reply to: Peter Eisentraut (#2)
Re: pg_config broken in 7.1.1 on FreeBSD with Tcl + Java

I'm not sure that I understand the question. I just installed PostgreSQL
from the FreeBSD port and selected the Tcl, Java, and OpenSSL options. I'm
guessing that whatever generated pg_config saw the spaces in, for example,
"--with-includes=/usr/local/include /usr/local/include/tcl8.3
/usr/local/include/tk8.3" and added the single-quotes to protect them. Using
the same flavor of quotes at the outer level caused sh to terminate the
string early and attempt to interpret "/usr/local/include/tcl8.3" as a
command.

I presume that the configure arguments were:
--enable-locale --enable-syslog --with-CXX
--sysconfdir=/usr/local/etc/postgresql
'--with-includes=/usr/local/include /usr/local/include/tcl8.3
/usr/local/include/tk8.3'
--with-libraries=/usr/local/lib
--docdir=/usr/local/share/doc
--includedir=/usr/local/include/pgsql
--with-java --with-openssl --enable-multibyte --with-tcl
'--with-tclconfig=/usr/local/lib/tcl8.3 /usr/local/lib/tk8.3'
--with-tkconfig=/usr/local/lib/tk8.3
--prefix=/usr/local i386--freebsd4.3

The original quoted text got mangled by my mailer - there are many extra
newlines. Some of the above may get mangled, as well.

I think that this problem can be solved by using double quotes when
val_configure="....." is generated.

- Glenn

Peter Eisentraut wrote:

Show quoted text

Glenn Trewitt writes:

When I build PostgreSQL 7.1.1 from the port on FreeBSD 4.3, pg_config
gets built with a syntax error in the "val_configure=..." line. It
looks like multiple levels of single quotes, where different kinds of
quotes should have been used.

What is the configure line that this installation uses?

val_configure='--enable-locale --enable-syslog --with-CXX
--sysconfdir=/usr/local/etc/p
ostgresql '--with-includes=/usr/local/include /usr/local/include/tcl8.3
/usr/local/incl
ude/tk8.3' --with-libraries=/usr/local/lib --docdir=/usr/local/share/doc
--includedir=/
usr/local/include/pgsql --with-java --with-openssl --enable-multibyte
--with-tcl '--wit
h-tclconfig=/usr/local/lib/tcl8.3 /usr/local/lib/tk8.3'
--with-tkconfig=/usr/local/lib/
tk8.3 --prefix=/usr/local i386--freebsd4.3'

Where do these extra quotes come from?

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter

#4Peter Eisentraut
peter_e@gmx.net
In reply to: Glenn Trewitt (#1)
Re: pg_config broken in 7.1.1 on FreeBSD with Tcl + Java

Glenn Trewitt writes:

When I build PostgreSQL 7.1.1 from the port on FreeBSD 4.3, pg_config
gets built with a syntax error in the "val_configure=..." line. It
looks like multiple levels of single quotes, where different kinds of
quotes should have been used.

Fixed now.

--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter