Thread: cygwin + postgres 7.1 + tcl support

cygwin + postgres 7.1 + tcl support

From
"Jae-Woong Hwnag"
Date:
Hi, all

Somehow, I can not compile postgres 7.1 with tcl support using cygwin.
I am getting the below error messages:

--
dlltool --export-all --output-def pgtcl.def pgtcl.o pgtclCmds.o pgtclId.o
dllwrap -o pgtcl.dll --dllname pgtcl.dll --def pgtcl.def pgtcl.o pgtclCmds.o
pgt
clId.o
../../../src/utils/dllinit.o  -lcygipc -lcrypt -L../../../src/interfaces/
libpq -lpq -L/usr/lib -L/usr/local/lib -lcrypt
pgtcl.o(.text+0xf9):pgtcl.c: undefined reference to `Tcl_CreateCommand'
pgtcl.o(.text+0x113):pgtcl.c: undefined reference to `Tcl_CreateCommand'
pgtcl.o(.text+0x12d):pgtcl.c: undefined reference to `Tcl_CreateCommand'
...

I would appreciate if somebody can point how to compile postgres 7.1 with
tcl
using cygwin.

Thanks,
Jae




Re: cygwin + postgres 7.1 + tcl support

From
s0lao@netscape.net (S. L.)
Date:
[actually I'm very happy now admin-ing my 7.1 with pgaccess, after tweaking near this problem a couple of hours]
"Jae-Woong Hwnag" <jaewh@email.com> wrote:
>
> Hi, all
>
> Somehow, I can not compile postgres 7.1 with tcl support using cygwin.
> I am getting the below error messages:
>
> --
> dlltool --export-all --output-def pgtcl.def pgtcl.o pgtclCmds.o pgtclId.o
> dllwrap -o pgtcl.dll --dllname pgtcl.dll --def pgtcl.def pgtcl.o pgtclCmds.o
> pgt
> clId.o
> ../../../src/utils/dllinit.o  -lcygipc -lcrypt -L../../../src/interfaces/
> libpq -lpq -L/usr/lib -L/usr/local/lib -lcrypt

It's obvious you don't link libtclXX.a (i.e. you don't have a "-ltclXX.a", where XX is the tcl/tk version installed
withcygwin). Configure doesn't seem to add this automatically, even if you passed a --with-tcl=DIR option. Solutions
are:

1. You add -ltclXX.a by hand to dllwrap command line
2. You don't install the binary distro of tcl/tk that comes with cygwin, as it is a mingw32 one, not a cygwin, as
PostgreSQLshould become. You either build your own cygwin version for tcl/tk or pick an already built one. [... where
thediscussion becomes OT, the cygwin port of tcl/tk could exist in two flavours, the MS windowing environment or the X
windowone, bla, bla]  

> pgtcl.o(.text+0xf9):pgtcl.c: undefined reference to `Tcl_CreateCommand'
> pgtcl.o(.text+0x113):pgtcl.c: undefined reference to `Tcl_CreateCommand'
> pgtcl.o(.text+0x12d):pgtcl.c: undefined reference to `Tcl_CreateCommand'
> ...
>
> I would appreciate if somebody can point how to compile postgres 7.1 with
> tcl
> using cygwin.
>
> Thanks,
> Jae
>
>
>
>
> ---------------------------(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
>

Hope it helped,


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

Re: cygwin + postgres 7.1 + tcl support

From
"Tim Dunnington"
Date:
I had the same problem a while back, and I tried both of these things to no
avail.  I couldn't get configure to work on the tcl sources, so I couldn't
build tcl in the first place.

I also noticed that the binary distro of postgres doesn't have tcl built in,
even though a few months ago Jason sent out the build command he was going
to use, and it included --with-tcl.  I'm guessing he didn't have any luck
either?

At any rate, has anyone actually been able to do this (compile libpgtcl on
cygwin)?

TIm

----- Original Message -----
From: "S. L." <s0lao@netscape.net>
To: <jaewh@email.com>
Cc: <pgsql-ports@postgresql.org>
Sent: Monday, May 14, 2001 1:19 AM
Subject: Re: [PORTS] cygwin + postgres 7.1 + tcl support


> [actually I'm very happy now admin-ing my 7.1 with pgaccess, after
tweaking near this problem a couple of hours]
> "Jae-Woong Hwnag" <jaewh@email.com> wrote:
> >
> > Hi, all
> >
> > Somehow, I can not compile postgres 7.1 with tcl support using cygwin.
> > I am getting the below error messages:
> >
> > --
> > dlltool --export-all --output-def pgtcl.def pgtcl.o pgtclCmds.o
pgtclId.o
> > dllwrap -o pgtcl.dll --dllname pgtcl.dll --def pgtcl.def pgtcl.o
pgtclCmds.o
> > pgt
> > clId.o
> > ../../../src/utils/dllinit.o -lcygipc -lcrypt -L../../../src/interfaces/
> > libpq -lpq -L/usr/lib -L/usr/local/lib -lcrypt
>
> It's obvious you don't link libtclXX.a (i.e. you don't have a "-ltclXX.a",
where XX is the tcl/tk version installed with cygwin). Configure doesn't
seem to add this automatically, even if you passed a --with-tcl=DIR option.
Solutions are:
>
> 1. You add -ltclXX.a by hand to dllwrap command line
> 2. You don't install the binary distro of tcl/tk that comes with cygwin,
as it is a mingw32 one, not a cygwin, as PostgreSQL should become. You
either build your own cygwin version for tcl/tk or pick an already built
one. [... where the discussion becomes OT, the cygwin port of tcl/tk could
exist in two flavours, the MS windowing environment or the X window one,
bla, bla]
>
> > pgtcl.o(.text+0xf9):pgtcl.c: undefined reference to `Tcl_CreateCommand'
> > pgtcl.o(.text+0x113):pgtcl.c: undefined reference to `Tcl_CreateCommand'
> > pgtcl.o(.text+0x12d):pgtcl.c: undefined reference to `Tcl_CreateCommand'
> > ...
> >
> > I would appreciate if somebody can point how to compile postgres 7.1
with
> > tcl
> > using cygwin.
> >
> > Thanks,
> > Jae
> >
> >
> >
> >
> > ---------------------------(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
> >
>
> Hope it helped,
>
>
>                             SLao
> __________________________________________________________________
> Get your own FREE, personal Netscape Webmail account today at
http://webmail.netscape.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://www.postgresql.org/search.mpl
>


Re: cygwin + postgres 7.1 + tcl support

From
Jason Tishler
Date:
Tim,

On Mon, May 14, 2001 at 08:23:25AM -0500, Tim Dunnington wrote:
> I also noticed that the binary distro of postgres doesn't have tcl built in,
> even though a few months ago Jason sent out the build command he was going
> to use, and it included --with-tcl.

Huh?  Do you mean me?  If so, I don't recall stating this intention.
See the following for my stated intentions:

    http://postgresql.readysetnet.com/mhonarc/pgsql-ports/2001-04/msg00069.html

which I later simplified due to some of Peter Eisentraut's suggestions.

> I'm guessing he didn't have any luck either?

Since I don't use TCL, I never tried to build PostgreSQL with TCL support.

The bottom line is: if Cygwin PostgreSQL with TCL support builds OOTB,
then I will rebuild my distribution to include it.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: cygwin + postgres 7.1 + tcl support

From
s0lao@netscape.net (S. L.)
Date:
"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/

Re: cygwin + postgres 7.1 + tcl support

From
"guard"
Date:
i try cygwin+pgsql 7.1
not work please help me


> configure --with-tcl --with-tclconfig=/lib --with-perl   ok
> ln -s /bin/cygtclsh80.exe /bin/tclsh   ok
> ln -s /bin/cygwish80.exe /bin/wish  ok
> configure --with-tcl --with-tclconfig=/lib --with-perl  ok
> make -i  ok
> cd src/interfaces/libpgtcl/   ok
>
> ( [...] here I edited pgTclId.c and commented out 2 lines with undefined
refferences to Tcl_CreateFileHandler and Tcl_DeleteFileHandler -- 693/694
and 715 -- respectively)        ok
>
> make    NOT OK
error message
PgtclId.o  ....undefined referend to 'Tcl_Alloc'
PgtclId.o  ....undefined referend to 'Tcl_...'
PgtclId.o  ....undefined referend to 'Tcl_...'

> 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 -lcry
pt -ltcl80



"S. L." <s0lao@netscape.net> ���g���l��
news:04410B88.3F3582D2.00013D13@netscape.net...
> "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-outs and 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 -lcry
pt -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 windows cygwin 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 anything about 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/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster