Group: pgsql.hackers


Subject: plperl failure on OS X 10.5(.1)
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/21/2007 11:39:14 AM
Alvaro Herrera <alvherre@alvh.no-ip.org> writes: > Nothing fatal? Huh, you have a curious idea about warnings. This makes > me think you have the wrong headers or something -- the argument > mentioned in all these cases is bool, so maybe there is an ABI > incompatibility somewhere. Yeah, and it's hardly difficult to see how that might lead to the reported "null prosrc" error, either. bool isnull; ... prosrcdatum = SysCacheGetAttr(PROCOID, procTup, Anum_pg_proc_prosrc, &isnull); if (isnull) elog(ERROR, "null prosrc"); > Perhaps a Perl header is redefining "bool" on your platform? Seems the question is not so much about OS X as it is about what perl you're using ... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings

Subject: plperl failure on OS X 10.5(.1)
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/21/2007 1:50:52 PM
Brandon Maust <bmaust@u.washington.edu> writes: > On 21 Nov, 2007, at 08:39 , Tom Lane wrote: >> Seems the question is not so much about OS X as it is about what >> perl you're using ... > it's 5.8.8, as provided by apple (same for gcc, etc): > perl on OS X does look to be constitutively defining a 'bool' as _Bool > via gcc's stdbool.h, so perhaps this is more of a compiler issue? No, because I see the identical content in stdbool.h on OS X 10.4 (perl 5.8.6) and it is not causing a problem here. Apparently 5.8.8 is sucking stdbool.h into the compile where 5.8.6 did not. Can you track down just what the inclusion path is? I'm tempted to fix this with #ifdef bool #undef bool #endif in plperl.h after pulling in the Perl headers. However, it's not clear to me why you aren't seeing warnings about "false" and "true" getting redefined, if stdbool.h is really getting included. For reference, the interesting part of stdbool.h on 10.4 looks like #define false 0 #define true 1 #define bool _Bool #if __STDC_VERSION__ < 199901L && __GNUC__ < 3 typedef int _Bool; #endif Since this is gcc 3, I suppose that the typedef isn't being used here but must get supplied internally by the compiler... regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: You can help support the PostgreSQL project by donating at http://www.postgresql.org/about/donate

Subject: plperl failure on OS X 10.5(.1)
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/21/2007 2:26:26 PM
I wrote: > Apparently 5.8.8 > is sucking stdbool.h into the compile where 5.8.6 did not. Can you > track down just what the inclusion path is? I pulled down the perl 5.8.8 sources and cannot find a reference to stdbool.h anywhere. What I do find is that "handy.h" defines what Perl thinks bool is: #ifndef HAS_BOOL # if defined(UTS) || defined(VMS) # define bool int # else # define bool char # endif # define HAS_BOOL 1 #endif On OSX 10.4 this file is installed in /System/Library/Perl/5.8.6/darwin-thread-multi-2level/CORE/handy.h Would you look at what 10.5 has? I suspect that Apple has modified their version to force bool to be int as of 10.5. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings