Обсуждение: Cygwin PostgreSQL with TCL support (was Re: hi)
On Sun, Jun 17, 2001 at 10:35:49PM +0800, guard wrote: > please help me, > I have urgent question,I can not install pgsql 7.1 in cygwin + tcl support > I have look you reply mail In > http://www.ca.postgresql.org/mhonarc/pgsql-ports/2001-05/msg00024.html > but I can not download and not install,please tell me detailed step install > pgsql 7.1+cygwin+tcl > very thanks Please post to pgsql-cygwin@postgresql.org instead of sending private email so others can benefit too. Did you read the following too? http://www.ca.postgresql.org/mhonarc/pgsql-ports/2001-05/msg00032.html It clearly states that I don't TCL, so I don't have any incentive to attempt to build a Cygwin PostgreSQL with TCL support. May be someone else on the mailing list can be of more help. Jason -- Jason Tishler Director, Software Engineering Phone: 732.264.8770 x235 Dot Hill Systems Corp. Fax: 732.264.8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
[I thought this thread was closed ;] Jason Tishler <Jason.Tishler@dothill.com> wrote: > > On Sun, Jun 17, 2001 at 10:35:49PM +0800, guard wrote: > > please help me, > > I have urgent question,I can not install pgsql 7.1 in cygwin + tcl support > > I have look you reply mail In > > http://www.ca.postgresql.org/mhonarc/pgsql-ports/2001-05/msg00024.html > > but I can not download and not install,please tell me detailed step install > > pgsql 7.1+cygwin+tcl > > very thanks guard, To quote from your last private message related to the above pgsql-ports thread: > I have make ok pgsql > have make pgtcl.dll > but i create pltcl Error > > My step...... > > $psql database > CREATE FUNCTION pltcl_call_handler () RETURNS OPAQUE AS > '/usr/local/pgsql/lib/pgtcl.dll' LANGUAGE 'C'; > > Error: ERROR: Can't find function pltcl_call_handler in file > /usr/local/pgsql/lib/pgtcl.dll > This looks like you don't want to use PostgreSQL from tcl/tk scripts (where pgtcl.dll is needed), but you'd rather want touse tcl programming language from inside PostgreSQL (where should be needed pltcl.dll). To use a language from those insrc/pl, you should first either do a createlang command, or a CREATE LANGUAGE statement for a database. Here's how you should build pltcl.dll. The source is found in src/pl/tcl. There are some differences from building pgtcl, but here are the steps: 1. You should edit by hand Makefile.tcldefs a. You must set TCL_SHARED_BUILD = 1 , else the make would notice the extension can't be build. b. For the other lines having right values in form @VALUE@, you should delete the @VALUES@. 2. Like the case of pgtcl, the dllwrap command won't add "-ltcl80" option, so you must add it by hand. In my case, I hadto add "-L../../backend -lpostgres" also. My dllwrap command was: "dllwrap -o pltcl.dll --def pltcl.def pltcl.o ../../../src/utils/dllinit.o -lcygipc -lcrypt -ltcl80 -L../../backend -lpostgres" That should be it. SLao __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/
"guard" <guard@ficnet.net> wrote: > > Dear SLao > > very thanks, > I had RUN step > my step > 1. cd /postgresql-7.1.2/src/pl/tcl > make > 2.set (Makefile.tcldefs) TCL_SHARED_BUILD = 1 Here is your mistake -- as I stated, your step 1. doesn't execute, you are just noticed your tcl isn't build SHARED. So youmust change places for the steps 2 and 1, respectively. > 3.(Makefile.tcldefs) not found @VALUE@ The @VALUE@ is a generic specification, not an actual item in the Makefile.tcldefs file. You could use instead of VALUE name,any name you found in Makefile.tcldefs between @ and @ :) > 4.because not pltcl.o so > RUN "dllwrap -o pltcl.dll --def pltcl.def pltcl.o > ../../../src/utils/dllinit.o -lcygipc -lcrypt -ltcl80 -L../../backend -lpost > gres > > Error ---- > gcc: pltcl.o: No such file or directory > dllwrap: gcc exited with status 1 It will be present after completing the exchange between your 1 and 2 steps. > > please help me,thanks > > > > > > To quote from your last private message related to the above pgsql-ports > thread: > > > > > I have make ok pgsql > > > have make pgtcl.dll > > > but i create pltcl Error > > > > > > My step...... > > > > > > $psql database > > > ??CREATE FUNCTION pltcl_call_handler () RETURNS OPAQUE AS > > > ????'/usr/local/pgsql/lib/pgtcl.dll' LANGUAGE 'C'; > > > > > > Error: ERROR: Can't find function pltcl_call_handler in file > > > /usr/local/pgsql/lib/pgtcl.dll > > > > > > > This looks like you don't want to use PostgreSQL from tcl/tk scripts > (where pgtcl.dll is needed), but you'd rather want to use tcl programming > language from inside PostgreSQL (where should be needed pltcl.dll). To use a > language from those in src/pl, you should first either do a createlang > command, or a CREATE LANGUAGE statement for a database. > > > > Here's how you should build pltcl.dll. > > The source is found in src/pl/tcl. There are some differences from > building pgtcl, but here are the steps: > > > > 1. You should edit by hand Makefile.tcldefs > > a. You must set TCL_SHARED_BUILD = 1 , else the make would notice the > extension can't be build. > > b. For the other lines having right values in form @VALUE@, you should > delete the @VALUES@. > > > > 2. Like the case of pgtcl, the dllwrap command won't add "-ltcl80" option, > so you must add it by hand. In my case, I had to add > "-L../../backend -lpostgres" also. > > > > My dllwrap command was: > > > > "dllwrap -o pltcl.dll --def pltcl.def pltcl.o > ../../../src/utils/dllinit.o -lcygipc -lcrypt -ltcl80 -L../../backend -lpost > gres" > > > > That should be it. > > > > 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 > Regards, SLao __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/
"guard" <guard@ficnet.net> wrote: > > Dear SLao > > sorry,my english bad,I had with your method > I run full step... > (1) tar zxvf postgresql-7.1.2 > (2) ./configure --with-tcl --with-tclconfig=/lib --without-tk > (3) cd /postgresql-7.1.2/src/pl/tcl > (4) make (if not run make ,not found Makefile.tcldefs) > (5) vi Makefile.tcldefs (edit TCL_SHARED_BUILD = 1) > (6) I not to understand > "The @VALUE@ is a generic specification, not an actual item in the > Makefile.tcldefs file. You could use instead of VALUE name, any name you > found in Makefile.tcldefs between @ and @ :)" > (7)make > error message: > i686-pc-cygwin-gcc > @CFLAGS_OPTIMIZE@ -I../../../src/include -I/usr/local/include -c -o > pltcl.o pltcl.c > i686-pc-cygwin-gcc: cannot specify -o with -c or -s and multiple > compilations > make: *** [pltcl.o] Error 1 > The above @CFLAGS_OPTIMIZE@ is such a @VARIABLE@ I was refering. So are those I marked with ^ in your Makefile.tcldefs; theymust be deleted from there all. > > > > > my Makefile.tcldefs > ================ > TCL_VERSION = 8.0 > TCL_MAJOR_VERSION = 8 > TCL_MINOR_VERSION = 0 > TCL_PATCH_LEVEL = p2 > TCL_CC = i686-pc-cygwin-gcc > TCL_DEFS = > TCL_DBGX = @TCL_DBGX@ ^ > TCL_CFLAGS_DEBUG = @CFLAGS_DEBUG@ ^ > TCL_CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ ^ > TCL_SHARED_BUILD = 1 > TCL_LIB_FILE = libtcl80.a > TCL_BIN_DIR = /cygnus/netrel/build/gdb-20001125-1/tcl/win > TCL_LIB_FULL_PATH = @TCL_LIB_FULL_PATH@ ^ > TCL_LIBS = -lm > TCL_PREFIX = /usr > TCL_EXEC_PREFIX = /usr > TCL_SHLIB_CFLAGS = > TCL_EXTRA_CFLAGS = @EXTRA_CFLAGS@ ^ > TCL_SHLIB_LD = > TCL_SHLIB_LD_LIBS = > TCL_SHLIB_SUFFIX = > TCL_DL_LIBS = > TCL_LD_FLAGS = > TCL_LD_SEARCH_FLAGS = > TCL_COMPAT_OBJS = > TCL_RANLIB = i686-pc-cygwin-ranlib > TCL_LIB_FLAG = @TCL_LIB_FLAG@ ^ > TCL_BUILD_LIB_SPEC = -L/cygnus/netrel/build/gdb-20001125-1/tcl/win -ltcl80 > TCL_LIB_SPEC = -L/usr/lib -ltcl80 > TCL_LIB_VERSIONS_OK = nodots > TCL_SHARED_LIB_SUFFIX = > TCL_UNSHARED_LIB_SUFFIX = 80.a > TCL_SRC_DIR = /cygnus/netrel/src/gdb-20001125-1/tcl > TCL_PACKAGE_PATH = /usr/lib > > > Ok? SLao __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/
"guard" <guard@ficnet.net> wrote: > > Dear SLao > > sorry,I had remove @VALUE@ > and > RUN "dllwrap -o pltcl.dll --def pltcl.def pltcl.o > ../../../src/utils/dllinit.o -lcygipc -lcrypt -ltcl80 -L../../backend -lpost > > have get pltcl.dll > but call function is error > > create function pltcl_call_handler() returns opaque > as '/lib/pltcl.dll' > language 'C'; ...........................is OK > > create trusted procedural language 'pltcl' > handler pltcl_call_handler > lancompiler 'PL/Tcl'; .............................. is OK > > CREATE FUNCTION to_zero(float8) RETURNS float8 AS ' > return $1 > ' LANGUAGE 'pltcl'; ......................... is OK > > select to_zero(5) ..............not ok > Error: ERROR: pltcl: internal error - cannot create 'normal' interpreter > I think you must stop your posts here. From here, my own experience with using PL/TCL is weak. Maybe the general or the interfacesmailist may help you more at this point. SLao __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/