Re: cygwin + postgres 7.1 + tcl support - Mailing list pgsql-ports

From s0lao@netscape.net (S. L.)
Subject Re: cygwin + postgres 7.1 + tcl support
Date
Msg-id 04410B88.3F3582D2.00013D13@netscape.net
Whole thread Raw
In response to cygwin + postgres 7.1 + tcl support  ("Jae-Woong Hwnag" <jaewh@email.com>)
List pgsql-ports
"Tim Dunnington" <timbert@timshouse.com> wrote:
[...]
> At any rate, has anyone actually been able to do this (compile libpgtcl on
> cygwin)?
>
> TIm

Here's the way I did it today -- to recall the steps (excerpts from $HOME/.bash_history -- with some irrelevant
cut-outsand notes added): 


tar xvzf postgresql-7.1.tar.gz
cd postgresql-7.1/
configure --with-tcl --with-tclconfig=/lib --with-perl
ln -s /bin/cygtclsh80.exe /bin/tclsh
ln -s /bin/cygwish80.exe /bin/wish
configure --with-tcl --with-tclconfig=/lib --with-perl
make -i
cd ../../interfaces/libpgtcl/

( [...] here I edited pgTclId.c and commented out 2 lines with undefined refferences to Tcl_CreateFileHandler and
Tcl_DeleteFileHandler-- 693/694 and 715 -- respectively) 

make
dllwrap -o pgtcl.dll --dllname pgtcl.dll --def pgtcl.def pgtcl.o pgtclCmds.o pgtclId.o ../../../src/utils/dllinit.o
 -lcygipc-lcrypt -L../../../src/interfaces/libpq -lpq -L/usr/local/lib -lcrypt -ltcl80 

(NOTE about -ltcl80 which is hand inserted)

make -i install
cp /usr/local/pgsql/lib/pgtcl.dll /usr/local/pgsql/libpgtcl.dll

(this is how pgaccess expects the library name)

. /pgrc
ipc-daemon &
initdb
pg
psql -h localhost template1
PGLIB=c:/cygwin/usr/local/pgsql/lib cygwish80 c:/cygwin/usr/local/pgsql/share/pgaccess/main.tcl
pg stop


Final notes:
1. ". /pgrc" and "pg" commands are some shell scripts I use to initialize PG vars and to use pg_ctl according to
windowscygwin specs. 
2. This is done under windows 98 SE; I have no means to make a built under NT/2000 -- but 100% this built works on
NT/2000.
3. The c:/cygwin/usr[...] notation in cygwish80 command line is necessary, as tcl/tk are mingw32, so they don't know
anythingabout cygwin mounts 
4. My cygwin1.dll is 1.1.6.

Hope it helps,

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

pgsql-ports by date:

Previous
From: Lamar Owen
Date:
Subject: Re: 7.1.1-2.PGDG RPMset.
Next
From: Jason Tishler
Date:
Subject: Re: Win32 native port question