Re: [HACKERS] Problem linking libecpg.5.3.dylib on OS X

2007-01-12 Thread Michael Meskes
On Thu, Jan 11, 2007 at 10:47:32PM -0500, Tom Lane wrote:
> Actually I'd suggest that using an exported variable at all is probably
> bad style.  I'd suggest that libecpg export a set() function instead:
> ...

I think I found an easier solution. With my latest commit ecpg uses a
#define to set a different debug level and the lib sets the regression
flags according to that level. This still needs a global variable in the
library but it is not accessed from the outside.

Hopefully this works on all archs.

Michael
-- 
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: [EMAIL PROTECTED]
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [HACKERS] Problem linking libecpg.5.3.dylib on OS X

2007-01-11 Thread Tom Lane
"Jim C. Nasby" <[EMAIL PROTECTED]> writes:
> I'm seeing the following on cuckoo:
> -L/opt/local/lib -lpgtypes -lpq -lm  -o libecpg.5.3.dylib
> ld: Undefined symbols:
> _ecpg_internal_regression_mode
> /usr/bin/libtool: internal link edit command failed

It looks like Joachim's last patch thinks it's OK for libecpg to try to
reference a variable declared by the calling program.  This will
surely Not Work everywhere, and even if it did work it'd be a bad idea
because it would guarantee that existing calling programs would break at
the next libecpg update.  The reference has to go the other way.

Actually I'd suggest that using an exported variable at all is probably
bad style.  I'd suggest that libecpg export a set() function instead:

static int ecpg_regression_mode = 0;

void ecpg_set_regression_mode(int mode) {
ecpg_regression_mode = mode;
}

regards, tom lane

---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


[HACKERS] Problem linking libecpg.5.3.dylib on OS X

2007-01-11 Thread Jim C. Nasby
I'm seeing the following on cuckoo:

gcc -pipe -no-cpp-precomp -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Winline -Wdeclaration-after-statement -Wendif-labels
-fno-strict-aliasing -g   -dynamiclib -install_name
/Users/buildfarm/buildfarm/HEAD/inst/lib/libecpg.5.dylib
-compatibility_version 5 -current_version 5.3  -multiply_defined
suppress  execute.o typename.o descriptor.o data.o error.o prepare.o
memory.o connect.o misc.o path.o  thread.o -L../pgtypeslib
-L../../../../src/interfaces/libpq -L../../../../src/port
-L/opt/local/lib -lpgtypes -lpq -lm  -o libecpg.5.3.dylib
ld: Undefined symbols:
_ecpg_internal_regression_mode
/usr/bin/libtool: internal link edit command failed
make[4]: *** [libecpg.5.3.dylib] Error 1

http://lnk.nu/pgbuildfarm.org/cxd.pl 

Any suggestions? Google and the archives aren't turning anything up :(
-- 
Jim Nasby[EMAIL PROTECTED]
EnterpriseDB  http://enterprisedb.com  512.569.9461 (cell)

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match