Re: [HACKERS] PL/TCL bug (?)

From: jwieck(at)debis(dot)com (Jan Wieck)
To: daniele(at)orlandi(dot)com (Daniele Orlandi)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] PL/TCL bug (?)
Date: 1999-02-03 09:54:32
Message-ID: m107z0z-000EBPC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Daniele Orlandi wrote:

> Hi,
>
> I'm having serious problems with postgresql and TCL as a procedural language.
>
> I did a clean compilantion and install --with-tcl.
> I did an initdb, created the language and a demo function found on the site.
>
> This is the result:
>
> a=> create function pltcl_call_handler() returns opaque
> a-> as '/usr/postgres/lib/pltcl.so'
> a-> language 'C';
> CREATE
> a=>
> a=> create trusted procedural language 'pltcl'
> a-> handler pltcl_call_handler
> a-> lancompiler 'PL/Tcl';
> CREATE
> a=> CREATE FUNCTION tcl_max (int4, int4) RETURNS int4 AS '
> a'> if {$1 > $2} {return $1}
> a'> return $2
> a'> ' LANGUAGE 'pltcl';
> CREATE

Anything correct so far.

> a=> select tcl_max(3,7);
> ERROR: Load of file /usr/postgres/lib/pltcl.so failed: /usr/lib/libtcl8.0.so:
> undefined symbol: stat

There's something wrong with your Tcl installation. The Tcl
shared lib does not correctly reference the library where
stat() is in. It was linked with a missing -l...

You might try to link pltcl.so with the additional library.
Try adding -lm -lc.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 1999-02-03 10:17:10 Re: [HACKERS] 6.5 beta and ORDER BY patch
Previous Message Michael Meskes 1999-02-03 07:57:46 ecpg patch