Re: building 7.4 with plperl

From: Gianni Mariani <gianni(at)mariani(dot)ws>
To: Postgres <pgsql-general(at)postgresql(dot)org>
Subject: Re: building 7.4 with plperl
Date: 2003-11-18 07:57:39
Message-ID: 3FB9D0F3.3010404@mariani.ws
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Gianni Mariani wrote:

>
> Before I go deep into this - does anyone have the quick fix for this ?
>
> Some facts - the 7.3.4 version of plperl.c has the same errors in the
> 7.4 tree.
> The 7.4 version of plperl.c (with some error handling API calls
> commented out) compiles fine in the 7.3.4 tree.
> (Same machine - same install of perl !) Points to using some
> alternate perl API probably by macro collision ?

/* Define to 1 to build client libraries as thread-safe code.
(--enable-thread-safety) */
#define USE_THREADS 1

So this seems to be the collision.

--enable-thread-safety is a new option for libpq - however this collides
with perl's use of the same macro.

I suspect that the right answer would be to change the name USE_THREADS
to PG_USE_THREADS for pg.

Quick and nasty work around patch:

--- plperl.c.7.4 Thu Sep 4 08:16:39 2003
+++ plperl.c Mon Nov 17 23:07:05 2003
@@ -55,6 +55,7 @@
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"

+#undef USE_THREADS
/* perl stuff */
#include "EXTERN.h"
#include "perl.h"

another fix would be to make plplerl use the explicit api.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message 黎维 王 2003-11-18 08:43:16 how to get historical data?
Previous Message Mark Kirkwood 2003-11-18 07:16:27 Re: snort, acid and postgres