8.1RC1 fails to build on OS X (10.4)

From: Idar Tollefsen <idart(at)performancedesign(dot)no>
To: pgsql-hackers(at)postgresql(dot)org
Subject: 8.1RC1 fails to build on OS X (10.4)
Date: 2005-11-02 14:15:41
Message-ID: 4368CA0D.9070803@performancedesign.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

uname -a:
Darwin fulcrum.local 8.3.0 Darwin Kernel Version 8.3.0: Mon Oct 3 20:04:04 PDT
2005; root:xnu-792.6.22.obj~2/RELEASE_PPC Power Macintosh powerpc

gcc --version:
powerpc-apple-darwin8-gcc-4.0.0 (GCC) 4.0.0 (Apple Computer, Inc. build 5026)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configuration options:
--prefix=/Library/PostgreSQL \
--localstatedir=/var/db/pgsql \
--build=powerpc-apple-darwin8 \
--host=powerpc-apple-darwin8 \
--target=powerpc-apple-darwin8 \
--disable-debug \
--with-openssl \
--with-bonjour \
--with-java \
--enable-thread-safety

Trying to build 8.1RC1 on the above configuration fails because it seems to have
defined bool, but still doesn't seem to know what bool is. This causes it to
fail the thread safety test during configuration and then bomb out during build
with errors like these:

/Users/idart/src/postgresql-8.1RC1/build/src/../../src/interfaces/ecpg/include/ecpglib.h:84:
warning: data definition has no type or storage class
/Users/idart/src/postgresql-8.1RC1/build/src/../../src/interfaces/ecpg/include/ecpglib.h:85:
error: parse error before 'ECPGdescribe'
/Users/idart/src/postgresql-8.1RC1/build/src/../../src/interfaces/ecpg/include/ecpglib.h:85:
error: parse error before 'bool'
/Users/idart/src/postgresql-8.1RC1/build/src/../../src/interfaces/ecpg/include/ecpglib.h:85:
warning: type defaults to 'int' in declaration of 'ECPGdescribe'
/Users/idart/src/postgresql-8.1RC1/build/src/../../src/interfaces/ecpg/include/ecpglib.h:85:
warning: data definition has no type or storage class
make[4]: *** [informix.o] Error 1
make[3]: *** [all] Error 2
make[2]: *** [all] Error 2
make[1]: *** [all] Error 2
make: *** [all] Error 2

The attached patches simply makes sure bool, true and false always gets defined
on OS X. This fixes the problems, but I'm afraid it might be a bit naive as the
patches don't consider OS X version, GCC version, or any other factors that
migth impact the build. Not to mention that it might break things if the patched
headers were included in a C++ program.

I see that the build farm contains "tuna" with 10.4.2 and GCC 4.0, and
apparently it builds just fine on that configuration (albeit without thread
safety). If there are other solutions to this, I would appreciate it if someone
could point me in the right direction.

- IT

Attachment Content-Type Size
boolpatches text/plain 2.4 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-11-02 14:16:25 Re: PGXS on VPATH?
Previous Message Pollard, Mike 2005-11-02 14:15:03 Re: Reducing the overhead of NUMERIC data