Re: [MACTCL] Tcl load command and mac os x

From: Jerry LeVan <jerry(dot)levan(at)eku(dot)edu>
To: "Daniel A(dot) Steffen" <steffen(at)ics(dot)mq(dot)edu(dot)au>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>, tcl-mac(at)lists(dot)sourceforge(dot)net
Subject: Re: [MACTCL] Tcl load command and mac os x
Date: 2004-04-07 03:52:53
Message-ID: 0C3E3D15-8847-11D8-BB09-000393779D9C@eku.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I dove into config guts and figured out the way to build via specifing
the location
of the config scripts for tcl and tk...

pgtksh behaves badly, clicking on the "pgtksh" window generates an
error:

set front process failed,-606

I can't get the menu for the wish window ;(

I guess I will have to ponder the dynamic loading of libs...

If anyone *has* got the loading to work, I would appreciate some
pointers...

--Jerry
On Apr 6, 2004, at 9:04 PM, Daniel A. Steffen wrote:

> Jerry,
>
> On Wednesday, Apr 7, 2004, at 08:25 Australia/Sydney, Jerry LeVan
> wrote:
>> % load /usr/local/pgsql/lib/libpgtcl.so
>> dyld: tclsh malformed library: /usr/local/pgsql/lib/libpgtcl.so (not
>> a Mach-O library file, bad filetype value)
>
> this should do it, however it appears that your library isn't a Mac OS
> X shared library, probably you built a MachO bundle instead of a MachO
> dylib. You'll have to look at the postgres buildsystem to see why it
> doesn't use the information in tclConfig.sh (i.e. TCL_SHLIB_LD) to
> build tcl extensions. The link line should use '-dynamiclib' and not
> '-bundle', c.f. 'man ld' for details.
>
> also, you really want to use the OSX standard .dylib shared library
> extension, so that you can use
> [load libpgtcl[info sharedlibextension]]
> in cross-platform tcl code.
>
>> % load /usr/local/pgsql/lib/libpgtcl.a
>> dyld: tclsh malformed library: /usr/local/pgsql/lib/libpgtcl.a (not a
>> Mach-O file, bad magic number)
>
> you cannot load static libraries
>
>> Question 2) Since I have Apple's Tcl and the Aqua Tcl/Tk how do I
>> force config to use the
>> aqua version?
>
> if postgres has a TEA compliant configure script, use
> ./configure --with-tcl=/Library/Frameworks/Tcl.framework
> --with-tclinclude=/Library/Frameworks/Tcl.framework/Headers
>
> similar issues have come up many many times before on the tcl-mac
> list, you may want to consult the list archives...
>
> Cheers,
>
> Daniel
>
> --
> ** Daniel A. Steffen ** "And now for something completely
> ** Dept. of Mathematics ** different" Monty Python
> ** Macquarie University ** <mailto:steffen(at)maths(dot)mq(dot)edu(dot)au>
> ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/>
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Daniel A. Steffen 2004-04-07 03:56:14 Re: [MACTCL] Tcl load command and mac os x
Previous Message wespvp 2004-04-07 03:50:24 Re: thread_test.c problems