Thread: PL/Tcl: internal error - cannot create 'normal' interpreter

PL/Tcl: internal error - cannot create 'normal' interpreter

From
Fabian Peters
Date:
Hi everybody,

I'm stuck getting PL/Tcl to work with postgresql-7.3.2 and Tcl8.4 under OS X
10.2.4. I compiled from source with the following configure flags:

./configure --with-includes=/sw/include/ --with-libraries=/sw/lib --with-tcl
--with-tkconfig=/Library/Frameworks/Tk.framework

The pgtclsh seems to work fine but calling a function in a database from
psql results in the following:

> ERROR:  pltcl: internal error - cannot create 'normal' interpreter

I ran the test suite, which also produces the above error. A search of the
archives didn't return much, so I'm pretty clueless now.

Any ideas as to what might be the problem or how to get some more detailed
info greatly appreciated...

cheers

Fabian



Re: PL/Tcl: internal error - cannot create 'normal' interpreter

From
Tom Lane
Date:
Fabian Peters <fabian@ngi.de> writes:
>> ERROR:  pltcl: internal error - cannot create 'normal' interpreter

> Any ideas as to what might be the problem or how to get some more detailed
> info greatly appreciated...

Apparently Tcl_CreateSlave() is failing.  Although it doesn't say so on
its man page, it seems likely to me that the parent interpreter's result
would be set to a possibly-useful error message.  You might try adding
code to pltcl.c to add the "hold" interpreter's result to this error
message.

We've heard other reports of strange failures involving Tcl_CreateSlave,
but AFAIR the other ones prevented pltcl.so from even getting linked.
If you learn anything I'd like to hear about it...
        regards, tom lane



Re: PL/Tcl: internal error - cannot create 'normal' interpreter

From
Jan Wieck
Date:
I cannot think of any reason why it would fail to create the 'normal'
interpreter after successfully creating the 'hold' one ... so CC me on
that please.


Jan

Tom Lane wrote:
> 
> Fabian Peters <fabian@ngi.de> writes:
> >> ERROR:  pltcl: internal error - cannot create 'normal' interpreter
> 
> > Any ideas as to what might be the problem or how to get some more detailed
> > info greatly appreciated...
> 
> Apparently Tcl_CreateSlave() is failing.  Although it doesn't say so on
> its man page, it seems likely to me that the parent interpreter's result
> would be set to a possibly-useful error message.  You might try adding
> code to pltcl.c to add the "hold" interpreter's result to this error
> message.
> 
> We've heard other reports of strange failures involving Tcl_CreateSlave,
> but AFAIR the other ones prevented pltcl.so from even getting linked.
> If you learn anything I'd like to hear about it...


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #



Re: PL/Tcl: internal error - cannot create 'normal'

From
Fabian Peters
Date:
Tom, Jan,

thanks for your feedback! I suspect there might be a problem with the OS X
way of linking. Right now I don't have the time to investigate this any
further. But I'll have to get back to it in a couple of weeks and will keep
you posted...

cheers

Fabian

> Fabian Peters <fabian@ngi.de> writes:
>>> ERROR:  pltcl: internal error - cannot create 'normal' interpreter
> 
>> Any ideas as to what might be the problem or how to get some more detailed
>> info greatly appreciated...
> 
> Apparently Tcl_CreateSlave() is failing.  Although it doesn't say so on
> its man page, it seems likely to me that the parent interpreter's result
> would be set to a possibly-useful error message.  You might try adding
> code to pltcl.c to add the "hold" interpreter's result to this error
> message.
> 
> We've heard other reports of strange failures involving Tcl_CreateSlave,
> but AFAIR the other ones prevented pltcl.so from even getting linked.
> If you learn anything I'd like to hear about it...
> 
> regards, tom lane