Re: Postgres 7.3 from source --with-tcl : Errors again... - Mailing list pgsql-cygwin

From Jason Tishler
Subject Re: Postgres 7.3 from source --with-tcl : Errors again...
Date
Msg-id 20030114201352.GD1692@tishler.net
Whole thread Raw
In response to Postgres 7.3 from source --with-tcl : Errors again... (part 2)  (Andrew Klimov <and_k_98@yahoo.com>)
Responses Re: Postgres 7.3 from source --with-tcl : Errors again...  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-cygwin
Andrew,

[Peter, please comment on my last question and the patch in general.  Is
such a patch desired now that Cygwin supports a more recent Tcl/Tk
version?  Would you be willing to help me polish it since I'm not sure
how to resolve some of the issues properly?]

On Tue, Jan 14, 2003 at 09:31:25AM -0800, Andrew Klimov wrote:
> Thank you, Jason, for fast reply to my previous e-mail.

No problem.

Attached is a *work-in-progress* patch that enables PostgreSQL CVS to
build "cleanly" when configured as follows:

    $ configure --with-tcl --with-tclconfig=/usr/lib ...

Note that I needed to configure --with-tclconfig, but I did *not* have to
do the following:

    $ ln -s /bin/tclsh83 /bin/tclsh
    $ ln -s /bin/wish83.exe /bin/wish

to get configure to succeed.  However, see my final point below...

> With this make proceeds building pgtcl.dll and pq.dll
> successfully.However, when go to /src/pl/tcl directory and trying to
> build pltcl:
>
> make[3]: Entering directory `/usr/src/postgresql-7.3.1/src/pl/tcl'
> gcc-2 -O2 -Wall -Wmissing-prototypes -Wmissing-declarations  -I../../../src/
  ^^^^^
  *****

> include   -c -o pltcl.o pltcl.c
>
> In file included from pltcl.c:40:
> /usr/include/tcl.h:234: warning: `DLLIMPORT' redefined
> ../../../src/include/pg_config_os.h:26: warning: this is the location of the
> previous definition

gcc 3.2 did not produce the above warning!  I wish that it did, because
it would have saved me some time.  The above is "worked around" in my
patch by including pg_config_os.h before tcl.h.  Unfortunately, there is
a namespace clash with DLLIMPORT in the PostgreSQL and TCL sources.  I'm
not sure what is the best way to fix this long term.

BTW, I'm wondering if PostgreSQL's autoconf stuff (i.e., config/tcl.m4)
should be modified to find Cygwin's tclsh (i.e., tclsh83.exe)?  I
believe that this should obviate the need to configure --with-tclconfig.

Thanks,
Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Attachment

pgsql-cygwin by date:

Previous
From: Andrew Klimov
Date:
Subject: Postgres 7.3 from source --with-tcl : Errors again... (part 2)
Next
From: s0lao@netscape.net (S. L.)
Date:
Subject: Re: Postgres 7.3 from source --with-tcl : Errors again...