Обсуждение: postgresql-tcl

Поиск
Список
Период
Сортировка

postgresql-tcl

От
JLT
Дата:
Can someone tell me how to use the libpgtcl in the OS X 10.4.9 system
When I try load libpgtcl  it tells me it is not a dylib


TEST
jlt$ tclsh8.4
% load /usr/local/pgsql/lib/libpgtcl.so
no suitable image found.  Did find:        /usr/local/pgsql/lib/libpgtcl.so: not a dylib




Thanks
John



Re: postgresql-tcl

От
L Bayuk
Дата:
On Fri, Jul 27, 2007 at 03:49:02PM -0400, JLT wrote:
> Can someone tell me how to use the libpgtcl in the OS X 10.4.9 system
> When I try load libpgtcl  it tells me it is not a dylib
> 
> TEST
> jlt$ tclsh8.4
> % load /usr/local/pgsql/lib/libpgtcl.so
> no suitable image found.  Did find:
>        /usr/local/pgsql/lib/libpgtcl.so: not a dylib

There are 3 Tcl interfaces to PostgreSQL, all hosted on pgfoundry.org.

pgintcl is my pure-Tcl version. You might want to try it at least to get
started, as it should run anywhere you have Tcl.

For best performance, use one of the C implementations: pgtcl or pgtclng.
(Both of these compile into "libpgtcl", by the way.)
But these will need to be compiled for your system type. Pgtclng is mine,
but I don't have access to an OS X system so I can't test it or build it
for OS X. The Pgtcl project might have a libpgtcl built for your OS X.

Where did your libpgtcl.so come from?


Re: postgresql-tcl

От
Brett Schwarz
Дата:
Sounds like you have a unix lib.

I just got a Mac (Intel) a couple months ago...I can try to compile one for you (I've been meaning to anyways). Do you
havea Intel or PPC Mac? If it's PPC, then I'm going to have to figure out how to do the universal libs, which may take
longer...


----- Original Message ----
From: L Bayuk <lbayuk@pobox.com>
To: jlt@wvinter.net
Cc: pgsql-interfaces@postgresql.org
Sent: Saturday, July 28, 2007 12:47:35 PM
Subject: Re: [INTERFACES] postgresql-tcl

On Fri, Jul 27, 2007 at 03:49:02PM -0400, JLT wrote:
> Can someone tell me how to use the libpgtcl in the OS X 10.4.9 system
> When I try load libpgtcl  it tells me it is not a dylib
>
> TEST
> jlt$ tclsh8.4
> % load /usr/local/pgsql/lib/libpgtcl.so
> no suitable image found.  Did find:
>        /usr/local/pgsql/lib/libpgtcl.so: not a dylib

There are 3 Tcl interfaces to PostgreSQL, all hosted on pgfoundry.org.

pgintcl is my pure-Tcl version. You might want to try it at least to get
started, as it should run anywhere you have Tcl.

For best performance, use one of the C implementations: pgtcl or pgtclng.
(Both of these compile into "libpgtcl", by the way.)
But these will need to be compiled for your system type. Pgtclng is mine,
but I don't have access to an OS X system so I can't test it or build it
for OS X. The Pgtcl project might have a libpgtcl built for your OS X.

Where did your libpgtcl.so come from?

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate      subscribe-nomail command to
majordomo@postgresql.orgso that your      message can get through to the mailing list cleanly 





____________________________________________________________________________________
Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
http://farechase.yahoo.com/


Re: postgresql-tcl

От
Brett Schwarz
Дата:
<bringing this back to the list>

If anyone is interested, there is a pre-compiled Mac OSX pgtcl at the link below.

John,

That's not the pgtcl project that I work on, so I'll let L Bayuk explain further, but it looks like you are including
ssland crypto libs, but perhaps they aren't on the platform or they can't be found. If you don't need those, then you
canget rid of the EXTRA_LIBS part (I think). Otherwise, you will need to make sure they are on your platform, and can
befound. 

BTW, the lib I built, did *not* include these (ssl crypto). I might try to add them though...

Thanks,   --brett


----- Original Message ----
From: JL <jlt2425@mac.com>
To: Brett Schwarz <brett_schwarz@yahoo.com>
Sent: Tuesday, July 31, 2007 5:07:18 AM
Subject: Re: [INTERFACES] postgresql-tcl


On Jul 30, 2007, at 22:40-Jul 30, Brett Schwarz wrote:

>
>
>
> try this...not sure if it will work. I tried to build it universal,
> so hopefully it turned out that way:
>
> http://pgfoundry.org/frs/?group_id=1000086
>
>
> I statically built in libpq, so you shouldn't need postgresql
> installed (I hope). You can just load it using the load command:
>
>   load /directory/where/lib/is/libpgtcl1.5.dylib

BINGO!  Thanks, seems to load fine.  I will test the function thru
out this day.
Thanks
John

FYI: I tried to build on this machine.  this is the output from the
configure and make operations.  I used the settings from the
documentation in the 1.6.0 package

Zaphod:~/downloads/Tcl_Tk/pgtcl/pgtcl1.6.0 jlt$ EXTRA_LIBS='-lssl -
lcrypto' ./configure --prefix=/usr/local   --libdir=/Library/Tcl   --
with-postgres-include=/usr/local/pgsql/include   --with-postgres-lib=/
usr/local/pgsql/lib   --with-tcl=/System/Library/Frameworks/
Tcl.framework   --with-tclinclude=/System/Library/Frameworks/
Tcl.framework/Headers


checking for correct TEA configuration... ok (TEA 3.5)
checking for Tcl configuration... found /System/Library/Frameworks/
Tcl.framework/tclConfig.sh
checking for existence of /System/Library/Frameworks/Tcl.framework/
tclConfig.sh... loading
configure: --exec-prefix defaulting to TCL_EXEC_PREFIX /usr
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... yes
checking for ranlib... ranlib
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking if the compiler understands -pipe... yes
checking whether byte ordering is bigendian... yes
checking for sin... yes
checking for main in -lieee... no
checking for main in -linet... no
checking net/errno.h usability... no
checking net/errno.h presence... no
checking for net/errno.h... no
checking for connect... yes
checking for gethostbyname... yes
checking dirent.h... yes
checking errno.h usability... yes
checking errno.h presence... yes
checking for errno.h... yes
checking float.h usability... yes
checking float.h presence... yes
checking for float.h... yes
checking values.h usability... no
checking values.h presence... no
checking for values.h... no
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/wait.h usability... yes
checking sys/wait.h presence... yes
checking for sys/wait.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for Tcl public headers... /System/Library/Frameworks/
Tcl.framework/Headers
checking how to build libraries... shared
checking if 64bit support is requested... no
checking if 64bit Sparc VIS support is requested... no
checking system version... Darwin-8.10.0
checking for dlopen in -ldl... yes
checking for ar... ar
checking if ld accepts -single_module flag... yes
checking if ld accepts -search_paths_first flag... yes
checking for required early compiler flags... none
checking for 64-bit integer type... long long
checking for struct dirent64... no
checking for struct stat64... no
checking for open64... no
checking for lseek64... no
checking for off64_t... no
checking for build with symbols... no
checking for tclsh... /usr/bin/tclsh8.4
configure: creating ./config.status
config.status: creating Makefile
config.status: WARNING:  Makefile.in seems to ignore the --
datarootdir setting
config.status: creating pkgIndex.tcl
++++++++++++++++++++++++++++++++++

Zaphod:~/downloads/Tcl_Tk/pgtcl/pgtcl1.6.0 jlt$ make
gcc -pipe -DPACKAGE_NAME=\"pgtcl\" -DPACKAGE_TARNAME=\"pgtcl\" -
DPACKAGE_VERSION=\"1.6.0\" -DPACKAGE_STRING=\"pgtcl\ 1.6.0\" -
DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -
DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -
DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -
DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -
DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -
DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1  -I/usr/local/pgsql/
include -I"/System/Library/Frameworks/Tcl.framework/Headers"    -Os -
Wall -Wno-implicit-int -fno-common -c `echo pgtcl.c` -o pgtcl.o

gcc -pipe -DPACKAGE_NAME=\"pgtcl\" -DPACKAGE_TARNAME=\"pgtcl\" -
DPACKAGE_VERSION=\"1.6.0\" -DPACKAGE_STRING=\"pgtcl\ 1.6.0\" -
DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -
DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -
DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -
DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -
DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -
DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1  -I/usr/local/pgsql/
include -I"/System/Library/Frameworks/Tcl.framework/Headers"    -Os -
Wall -Wno-implicit-int -fno-common -c `echo pgtclCmds.c` -o pgtclCmds.o

pgtclCmds.c: In function `execute_put_values':
pgtclCmds.c:1932: warning: `varname' might be used uninitialized in
this function
pgtclCmds.c:1933: warning: `indexname' might be used uninitialized in
this function
pgtclCmds.c: In function `Pg_escape_bytea':
pgtclCmds.c:3659: warning: passing arg 2 of pointer to function from
incompatible pointer type

gcc -pipe -DPACKAGE_NAME=\"pgtcl\" -DPACKAGE_TARNAME=\"pgtcl\" -
DPACKAGE_VERSION=\"1.6.0\" -DPACKAGE_STRING=\"pgtcl\ 1.6.0\" -
DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -
DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -
DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -
DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DWORDS_BIGENDIAN=1 -
DNO_VALUES_H=1 -DHAVE_LIMITS_H=1 -DHAVE_SYS_PARAM_H=1 -
DTCL_WIDE_INT_TYPE=long\ long -DUSE_TCL_STUBS=1  -I/usr/local/pgsql/
include -I"/System/Library/Frameworks/Tcl.framework/Headers"    -Os -
Wall -Wno-implicit-int -fno-common -c `echo pgtclId.c` -o pgtclId.o

rm -f libpgtcl1.6.0.dylib

gcc -pipe -dynamiclib -Os -Wall -Wno-implicit-int -fno-common -
prebind -headerpad_max_install_names -Wl,-search_paths_first  -Wl,-
single_module -o libpgtcl1.6.0.dylib pgtcl.o pgtclCmds.o pgtclId.o  -
L/System/Library/Frameworks/Tcl.framework/Versions/8.4 -ltclstub8.4 -
L/usr/local/pgsql/lib -lpq

ld: warning prebinding disabled because of undefined symbols
ld: Undefined symbols:
_SSL_pending
_BIO_free
_BIO_new_mem_buf
_DH_check
_DH_generate_parameters
_DH_size
_ERR_get_error
_ERR_reason_error_string
_EVP_PKEY_free
_PEM_read_DHparams
_PEM_read_PrivateKey
_PEM_read_X509
_PEM_read_bio_DHparams
_SSL_CTX_ctrl
_SSL_CTX_free
_SSL_CTX_load_verify_locations
_SSL_CTX_new
_SSL_CTX_set_tmp_dh_callback
_SSL_CTX_set_verify
_SSL_CTX_set_verify_depth
_SSL_connect
_SSL_free
_SSL_get_error
_SSL_get_ex_data
_SSL_get_peer_certificate
_SSL_library_init
_SSL_load_error_strings
_SSL_new
_SSL_read
_SSL_set_ex_data
_SSL_set_fd
_SSL_shutdown
_SSL_write
_TLSv1_method
_X509_NAME_get_text_by_NID
_X509_NAME_oneline
_X509_check_private_key
_X509_free
_X509_get_subject_name
/usr/bin/libtool: internal link edit command failed
make: *** [libpgtcl1.6.0.dylib] Error 1







____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/


Re: postgresql-tcl

От
L Bayuk
Дата:
On Tue, Jul 31, 2007 at 07:09:55AM -0700, Brett Schwarz wrote:
> 
> If anyone is interested, there is a pre-compiled Mac OSX pgtcl at the link below.
> 
> John,
> 
> That's not the pgtcl project that I work on, so I'll let L Bayuk explain further, but it looks like you are including
ssland crypto libs, but perhaps they aren't on the platform or they can't be found. If you don't need those, then you
canget rid of the EXTRA_LIBS part (I think). Otherwise, you will need to make sure they are on your platform, and can
befound.
 
> 
> BTW, the lib I built, did *not* include these (ssl crypto). I might try to add them though...


Well, if Brett has a Mac OSX library, by all means use it.

As for the problems linking pgtclng, I think EXTRA_LIBS doesn't do anything
any more. The steps in the pgtclng manual for Mac OSX are from a while ago
when somebody sent them to me, but the build process changed when I
upgraded to a newer version of the TEA build system. Yet this is probably
not a Mac OSX-specific problem. I'm thinking that if your libpq was built
with SSL, then you have to include SSL and crypto libraries whenever
linking anything with libpq. So you need a way to add libraries, but
I've never tried it. A quick look makes me think LIBS= (rather than
EXTRA_LIBS=) will work, but this is something I need to look at.