gnegg programming with passion

29Aug/0916

Snow Leopard and PHP

Earlier versions of Mac OS X always had pretty outdated versions of PHP in their default installation, so what you usually did was to go to entropy.ch and fetch the packages provided there.

Now, after updating to Snow Leopard you'll notice that the entropy configuration has been removed and once you add it back in, you'll see Apache segfaulting and some missing symbol errors.

Entropy has not updated the packages to snow leopard yet, so you could have a look at PHP that came with stock snow leopard: This time it's even bleeding edge: Snow Leopard comes with PHP 5.3.0.

Unfortunately though, some vital extensions are missing, most notably for me, the PostgeSQL extension.

This time around though, Snow Leopard comes with a functioning PHP development toolset, so there's nothing stopping you to build it yourself, so here's how to get the official PostgreSQL extension working on Snow Leopard's stock php:

  1. Make sure that you have installed the current Xcode Tools. You'll need a working compiler for this.
  2. Make sure that you have installed PostgreSQL and know where it is on your machine. In my case, I've used the One-click installer from EnterpriseDB (which persisted the update to 10.6).
  3. Now that Snow Leopard uses a full 64bit userspace, we'll have to make sure that the PostgreSQL client library is available as a 64 bit binary - or even better, as an universal binary.Unfortunately, that's not the case with the one-click installer, so we'll have to fix that first:
    1. Download the sources of the PostgreSQL version you have installed from postgresql.org
    2. Open a terminal and use the following commands:
      % tar xjf postgresql-[version].tar.bz2
      % cd postgresql-[version]
      % CFLAGS="-arch i386 -arch x86_64" ./configure --prefix=/usr/local/mypostgres
      % make

      make will fail sooner or later because you the postgres build scripts can't handle building an universal binary server, but the compile will progress enough for us to now build libpq. Let's do this:

      % make -C src/interfaces
      % sudo make -C src/interfaces install
      % make -C src/include
      % sudo make -C src/include install
      % make -C src/bin
      % sudo make -C src/bin install
  4. Download the php 5.3.0 source code from their website. I used the bzipped version.
  5. Open your Terminal and cd to the location of the download. Then use the following commands:
    % tar -xjf php-5.3.0.tar.bz2
    % cd php-5.3.0/ext/pgsql
    % phpize
    % ./configure --with-pgsql=/usr/local/mypostgres
    % make -j8 # in case of one of these nice 8 core macs :p
    % sudo make install
    % cd /etc
    % cp php.ini-default php.ini
  6. Now edit your new php.ini and add the line extension=pgsql.so

And that's it. Restart Apache (using apachectl or the System Preferences) and you'll have PostgreSQL support.

All in all this is a tedious process and it's the price us early adopters have to pay constantly.

If you want an honest recommendation on how to run PHP with PostgreSQL support on Snow Leopard, I'd say: Don't. Wait for the various 3rd party packages to get updated.

Comments (16) Trackbacks (0)
  1. my build failed at

    make -j8

    in step 5

    Downloads/php-5.3.0/ext/pgsql/pgsql.c:6200: warning: passing argument 3 of ‘php_addslashes’ from incompatible pointer type
    make: *** [pgsql.lo] Error 1

  2. Please post more of your output. The warning about the pointer type is not related with the error.

  3. Hi Philip,
    I think it gives the same error here. Below my output. Maybe it has something to do with the PostgreSQL version. I’m using 8.4.
    Also you’ll have to put sudo in front of “make -C src/interfaces install”, but that doesn’t solve this problem.

    /bin/sh /test/php-5.3.0/ext/pgsql/libtool –mode=compile cc -I. -I/test/php-5.3.0/ext/pgsql -DPHP_ATOM_INC -I/test/php-5.3.0/ext/pgsql/include -I/test/php-5.3.0/ext/pgsql/main -I/test/php-5.3.0/ext/pgsql -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/mypostgres/include -DHAVE_CONFIG_H -g -O2 -c /test/php-5.3.0/ext/pgsql/pgsql.c -o pgsql.lo
    cc -I. -I/test/php-5.3.0/ext/pgsql -DPHP_ATOM_INC -I/test/php-5.3.0/ext/pgsql/include -I/test/php-5.3.0/ext/pgsql/main -I/test/php-5.3.0/ext/pgsql -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/mypostgres/include -DHAVE_CONFIG_H -g -O2 -c /test/php-5.3.0/ext/pgsql/pgsql.c -fno-common -DPIC -o .libs/pgsql.o
    In file included from /test/php-5.3.0/ext/pgsql/php_pgsql.h:32,
    from /test/php-5.3.0/ext/pgsql/pgsql.c:46:
    /usr/local/mypostgres/include/libpq-fe.h:29:26: error: postgres_ext.h: No such file or directory
    In file included from /test/php-5.3.0/ext/pgsql/php_pgsql.h:32,
    from /test/php-5.3.0/ext/pgsql/pgsql.c:46:
    /usr/local/mypostgres/include/libpq-fe.h:211: error: expected specifier-qualifier-list before ‘Oid’
    /usr/local/mypostgres/include/libpq-fe.h:341: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
    /usr/local/mypostgres/include/libpq-fe.h:348: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
    /usr/local/mypostgres/include/libpq-fe.h:362: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
    /usr/local/mypostgres/include/libpq-fe.h:369: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
    /usr/local/mypostgres/include/libpq-fe.h:428: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PQftable’
    /usr/local/mypostgres/include/libpq-fe.h:431: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PQftype’
    /usr/local/mypostgres/include/libpq-fe.h:436: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PQoidValue’
    /usr/local/mypostgres/include/libpq-fe.h:442: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PQparamtype’
    /usr/local/mypostgres/include/libpq-fe.h:516: error: expected declaration specifiers or ‘…’ before ‘Oid’
    /usr/local/mypostgres/include/libpq-fe.h:521: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lo_creat’
    /usr/local/mypostgres/include/libpq-fe.h:522: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lo_create’
    /usr/local/mypostgres/include/libpq-fe.h:525: error: expected declaration specifiers or ‘…’ before ‘Oid’
    /usr/local/mypostgres/include/libpq-fe.h:526: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lo_import’
    /usr/local/mypostgres/include/libpq-fe.h:527: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘lo_import_with_oid’
    /usr/local/mypostgres/include/libpq-fe.h:528: error: expected declaration specifiers or ‘…’ before ‘Oid’
    In file included from /test/php-5.3.0/ext/pgsql/pgsql.c:46:
    /test/php-5.3.0/ext/pgsql/php_pgsql.h:44:28: error: libpq/libpq-fs.h: No such file or directory
    In file included from /test/php-5.3.0/ext/pgsql/pgsql.c:46:
    /test/php-5.3.0/ext/pgsql/php_pgsql.h:211: error: expected declaration specifiers or ‘…’ before ‘Oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘_php_pgsql_notice_handler’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:818: warning: passing argument 2 of ‘_php_pgsql_trim_message’ from incompatible pointer type
    /test/php-5.3.0/ext/pgsql/pgsql.c:822: warning: cast from pointer to integer of different size
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zm_startup_pgsql’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:978: error: ‘PG_DIAG_SEVERITY’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:978: error: (Each undeclared identifier is reported only once
    /test/php-5.3.0/ext/pgsql/pgsql.c:978: error: for each function it appears in.)
    /test/php-5.3.0/ext/pgsql/pgsql.c:979: error: ‘PG_DIAG_SQLSTATE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:980: error: ‘PG_DIAG_MESSAGE_PRIMARY’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:981: error: ‘PG_DIAG_MESSAGE_DETAIL’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:982: error: ‘PG_DIAG_MESSAGE_HINT’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:983: error: ‘PG_DIAG_STATEMENT_POSITION’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:990: error: ‘PG_DIAG_CONTEXT’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:991: error: ‘PG_DIAG_SOURCE_FILE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:992: error: ‘PG_DIAG_SOURCE_LINE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:993: error: ‘PG_DIAG_SOURCE_FUNCTION’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘php_pgsql_do_connect’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:1226: warning: cast from pointer to integer of different size
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘php_pgsql_get_link_info’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:1403: error: ‘PG_VERSION’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_query_params’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:1735: warning: assignment makes pointer from integer without a cast
    /test/php-5.3.0/ext/pgsql/pgsql.c:1740: warning: assignment makes pointer from integer without a cast
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_prepare’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:1821: warning: assignment makes pointer from integer without a cast
    /test/php-5.3.0/ext/pgsql/pgsql.c:1825: warning: assignment makes pointer from integer without a cast
    /test/php-5.3.0/ext/pgsql/pgsql.c: At top level:
    /test/php-5.3.0/ext/pgsql/pgsql.c:2077: error: expected declaration specifiers or ‘…’ before ‘Oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘get_field_name’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:2086: error: ‘oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_field_table’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:2145: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2145: error: expected ‘;’ before ‘oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:2161: error: ‘oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2163: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘php_pgsql_get_field_info’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:2240: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2240: error: expected ‘;’ before ‘oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:2267: warning: passing argument 2 of ‘get_field_name’ makes pointer from integer without a cast
    /test/php-5.3.0/ext/pgsql/pgsql.c:2267: error: too many arguments to function ‘get_field_name’
    /test/php-5.3.0/ext/pgsql/pgsql.c:2273: error: ‘oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_last_oid’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:2826: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2826: error: expected ‘;’ before ‘oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:2836: error: ‘oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2837: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_lo_create’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:2927: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2927: error: expected ‘;’ before ‘pgsql_oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:2957: error: ‘wanted_oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2957: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:2966: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:2976: error: ‘pgsql_oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2976: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:2985: error: ‘INV_READ’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2985: error: ‘INV_WRITE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:2985: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_lo_unlink’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:3003: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3003: error: expected ‘;’ before ‘oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3010: error: ‘oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3010: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3019: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3023: error: expected ‘;’ before ‘oid_long’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3027: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3038: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3042: error: expected ‘;’ before ‘oid_long’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3056: error: too many arguments to function ‘lo_unlink’
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_lo_open’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:3073: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3073: error: expected ‘;’ before ‘oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3082: error: ‘oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3082: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3091: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3095: error: expected ‘;’ before ‘oid_long’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3099: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3110: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3114: error: expected ‘;’ before ‘oid_long’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3134: error: ‘INV_READ’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3136: error: ‘INV_WRITE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3149: error: too many arguments to function ‘lo_open’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3156: error: too many arguments to function ‘lo_open’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3157: error: too many arguments to function ‘lo_unlink’
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_lo_import’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:3318: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3318: error: expected ‘;’ before ‘returned_oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3356: error: expected ‘;’ before ‘wanted_oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3361: error: ‘wanted_oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3361: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3370: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3381: error: ‘returned_oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3383: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3393: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_lo_export’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:3409: error: ‘Oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3409: error: expected ‘;’ before ‘oid’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3416: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3420: error: ‘oid’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:3420: error: expected ‘;’ before ‘oid_long’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3424: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3433: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3437: error: expected ‘;’ before ‘oid_long’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3443: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3454: error: expected ‘;’ before ‘strtoul’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3464: error: expected ‘)’ before numeric constant
    /test/php-5.3.0/ext/pgsql/pgsql.c:3468: error: expected ‘;’ before ‘oid_long’
    /test/php-5.3.0/ext/pgsql/pgsql.c:3489: error: too many arguments to function ‘lo_export’
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘zif_pg_result_error_field’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:4251: error: ‘PG_DIAG_SEVERITY’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4251: error: ‘PG_DIAG_SQLSTATE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4251: error: ‘PG_DIAG_MESSAGE_PRIMARY’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4251: error: ‘PG_DIAG_MESSAGE_DETAIL’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4252: error: ‘PG_DIAG_MESSAGE_HINT’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4252: error: ‘PG_DIAG_STATEMENT_POSITION’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4259: error: ‘PG_DIAG_CONTEXT’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4259: error: ‘PG_DIAG_SOURCE_FILE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4259: error: ‘PG_DIAG_SOURCE_LINE’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c:4260: error: ‘PG_DIAG_SOURCE_FUNCTION’ undeclared (first use in this function)
    /test/php-5.3.0/ext/pgsql/pgsql.c: In function ‘php_pgsql_result2array’:
    /test/php-5.3.0/ext/pgsql/pgsql.c:6200: warning: passing argument 3 of ‘php_addslashes’ from incompatible pointer type
    make: *** [pgsql.lo] Error 1

  4. It’s not the PostgreSQL version. Same error with 8.3.7.
    I got everything working by copying src/include/postgres_ext.h and src/include/libpq to the /usr/local/mypostgres/include and defining PG_VERSION in config.h.

  5. right. you need to install the includes aswell – I forgot that in my article because I have reused the existing enterprise db installation:

    % sudo make -C src/include install

    I have updated the blog entry

  6. when building libpq ..

    edward-rockwells-macbook-pro:postgresql-8.4.0 edwardrockwell$ make -C src/interfaces/
    ar crs libpq.a fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o fe-lobj.o fe-protocol2.o fe-protocol3.o pqexpbuffer.o pqsignal.o fe-secure.o libpq-events.o md5.o ip.o wchar.o encnames.o noblock.o pgstrcasecmp.o thread.o
    ar: libpq.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it)
    ar: libpq.a: Inappropriate file type or format
    make[1]: *** [libpq.a] Error 1
    make: *** [all] Error 2

    of course when building at step 3-2 I’m not sure how far the build is supposed to get before it fails .. but here’s what I’ve got ..

    edward-rockwells-macbook-pro:postgresql-8.4.0 edwardrockwell$ CFLAGS=”-arch i386 -arch x86_64″ ./configure –prefix=/usr/local/postgres-8.4.0/
    checking build system type… i386-apple-darwin10.0.0
    checking host system type… i386-apple-darwin10.0.0
    checking which template to use… darwin
    checking whether to build with 64-bit integer date/time support… yes
    checking whether NLS is wanted… no
    checking for default port number… 5432
    checking for block size… 8kB
    checking for segment size… 1GB
    checking for WAL block size… 8kB
    checking for WAL segment size… 16MB
    checking for gcc… gcc
    checking for C compiler default output file name… a.out
    checking whether the C compiler works… yes
    checking whether we are cross compiling… no
    checking for suffix of executables…
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking if gcc -no-cpp-precomp supports -Wdeclaration-after-statement… yes
    checking if gcc -no-cpp-precomp supports -Wendif-labels… yes
    checking if gcc -no-cpp-precomp supports -fno-strict-aliasing… yes
    checking if gcc -no-cpp-precomp supports -fwrapv… yes
    checking whether the C compiler still works… yes
    checking how to run the C preprocessor… gcc -no-cpp-precomp -E
    checking allow thread-safe client libraries… no
    checking whether to build with Tcl… no
    checking whether to build Perl modules… no
    checking whether to build Python modules… no
    checking whether to build with GSSAPI support… no
    checking whether to build with Kerberos 5 support… no
    checking whether to build with PAM support… no
    checking whether to build with LDAP support… no
    checking whether to build with Bonjour support… no
    checking whether to build with OpenSSL support… no
    checking for grep that handles long lines and -e… /usr/bin/grep
    checking for egrep… /usr/bin/grep -E
    checking for ld used by GCC… /usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld
    checking if the linker (/usr/libexec/gcc/i686-apple-darwin10/4.2.1/ld) is GNU ld… no
    checking for ranlib… ranlib
    checking for strip… strip
    checking whether it is possible to strip libraries… no
    checking for ar… ar
    checking for tar… /usr/bin/tar
    checking whether ln -s works… yes
    checking for gawk… gawk
    checking for bison… bison
    configure: using bison (GNU Bison) 2.3
    checking for flex… /usr/bin/flex
    configure: using flex 2.5.35
    checking for perl… /opt/local/bin/perl
    checking for main in -lm… yes
    checking for library containing setproctitle… no
    checking for library containing dlopen… none required
    checking for library containing socket… none required
    checking for library containing shl_load… no
    checking for library containing getopt_long… none required
    checking for library containing crypt… none required
    checking for library containing fdatasync… none required
    checking for library containing gethostbyname_r… no
    checking for library containing shmget… none required
    checking for -lreadline… yes (-lreadline)
    checking for inflate in -lz… yes
    checking for ANSI C header files… yes
    checking for sys/types.h… yes
    checking for sys/stat.h… yes
    checking for stdlib.h… yes
    checking for string.h… yes
    checking for memory.h… yes
    checking for strings.h… yes
    checking for inttypes.h… yes
    checking for stdint.h… yes
    checking for unistd.h… yes
    checking crypt.h usability… no
    checking crypt.h presence… no
    checking for crypt.h… no
    checking dld.h usability… no
    checking dld.h presence… no
    checking for dld.h… no
    checking fp_class.h usability… no
    checking fp_class.h presence… no
    checking for fp_class.h… no
    checking getopt.h usability… yes
    checking getopt.h presence… yes
    checking for getopt.h… yes
    checking ieeefp.h usability… no
    checking ieeefp.h presence… no
    checking for ieeefp.h… no
    checking langinfo.h usability… yes
    checking langinfo.h presence… yes
    checking for langinfo.h… yes
    checking poll.h usability… yes
    checking poll.h presence… yes
    checking for poll.h… yes
    checking pwd.h usability… yes
    checking pwd.h presence… yes
    checking for pwd.h… yes
    checking sys/ipc.h usability… yes
    checking sys/ipc.h presence… yes
    checking for sys/ipc.h… yes
    checking sys/poll.h usability… yes
    checking sys/poll.h presence… yes
    checking for sys/poll.h… yes
    checking sys/pstat.h usability… no
    checking sys/pstat.h presence… no
    checking for sys/pstat.h… no
    checking sys/resource.h usability… yes
    checking sys/resource.h presence… yes
    checking for sys/resource.h… yes
    checking sys/select.h usability… yes
    checking sys/select.h presence… yes
    checking for sys/select.h… yes
    checking sys/sem.h usability… yes
    checking sys/sem.h presence… yes
    checking for sys/sem.h… yes
    checking sys/socket.h usability… yes
    checking sys/socket.h presence… yes
    checking for sys/socket.h… yes
    checking sys/shm.h usability… yes
    checking sys/shm.h presence… yes
    checking for sys/shm.h… yes
    checking sys/tas.h usability… no
    checking sys/tas.h presence… no
    checking for sys/tas.h… no
    checking sys/time.h usability… yes
    checking sys/time.h presence… yes
    checking for sys/time.h… yes
    checking sys/un.h usability… yes
    checking sys/un.h presence… yes
    checking for sys/un.h… yes
    checking termios.h usability… yes
    checking termios.h presence… yes
    checking for termios.h… yes
    checking ucred.h usability… no
    checking ucred.h presence… no
    checking for ucred.h… no
    checking utime.h usability… yes
    checking utime.h presence… yes
    checking for utime.h… yes
    checking wchar.h usability… yes
    checking wchar.h presence… yes
    checking for wchar.h… yes
    checking wctype.h usability… yes
    checking wctype.h presence… yes
    checking for wctype.h… yes
    checking kernel/OS.h usability… no
    checking kernel/OS.h presence… no
    checking for kernel/OS.h… no
    checking kernel/image.h usability… no
    checking kernel/image.h presence… no
    checking for kernel/image.h… no
    checking SupportDefs.h usability… no
    checking SupportDefs.h presence… no
    checking for SupportDefs.h… no
    checking netinet/in.h usability… yes
    checking netinet/in.h presence… yes
    checking for netinet/in.h… yes
    checking for netinet/tcp.h… yes
    checking readline/readline.h usability… yes
    checking readline/readline.h presence… yes
    checking for readline/readline.h… yes
    checking readline/history.h usability… yes
    checking readline/history.h presence… yes
    checking for readline/history.h… yes
    checking zlib.h usability… yes
    checking zlib.h presence… yes
    checking for zlib.h… yes
    checking whether byte ordering is bigendian… no
    checking for an ANSI C-conforming const… yes
    checking for inline… inline
    checking for preprocessor stringizing operator… yes
    checking for signed types… yes
    checking for working volatile… yes
    checking for __func__… yes
    checking whether struct tm is in sys/time.h or time.h… time.h
    checking for struct tm.tm_zone… yes
    checking for tzname… yes
    checking for union semun… yes
    checking for struct sockaddr_un… yes
    checking for struct sockaddr_storage… yes
    checking for struct sockaddr_storage.ss_family… yes
    checking for struct sockaddr_storage.__ss_family… no
    checking for struct sockaddr_storage.ss_len… yes
    checking for struct sockaddr_storage.__ss_len… no
    checking for struct sockaddr.sa_len… yes
    checking for struct addrinfo… yes
    checking for struct cmsgcred… no
    checking for struct fcred… no
    checking for struct sockcred… no
    checking for struct option… yes
    checking for z_streamp… yes
    checking for int timezone… yes
    checking types of arguments for accept()… int, int, struct sockaddr *, socklen_t *
    checking whether gettimeofday takes only one argument… no
    checking for cbrt… yes
    checking for dlopen… yes
    checking for fcvt… yes
    checking for fdatasync… yes
    checking for getpeereid… yes
    checking for getpeerucred… no
    checking for getrlimit… yes
    checking for memmove… yes
    checking for poll… yes
    checking for pstat… no
    checking for readlink… yes
    checking for setproctitle… no
    checking for setsid… yes
    checking for sigprocmask… yes
    checking for symlink… yes
    checking for sysconf… yes
    checking for towlower… yes
    checking for utime… yes
    checking for utimes… yes
    checking for waitpid… yes
    checking for wcstombs… yes
    checking for posix_fadvise… no
    checking whether posix_fadvise is declared… no
    checking whether fdatasync is declared… no
    checking whether strlcat is declared… yes
    checking whether strlcpy is declared… yes
    checking whether F_FULLFSYNC is declared… yes
    checking for struct sockaddr_in6… yes
    checking for PS_STRINGS… no
    checking for snprintf… yes
    checking for vsnprintf… yes
    checking whether snprintf is declared… yes
    checking whether vsnprintf is declared… yes
    checking for isinf… yes
    checking for crypt… yes
    checking for getopt… yes
    checking for getrusage… yes
    checking for inet_aton… yes
    checking for random… yes
    checking for rint… yes
    checking for srandom… yes
    checking for strdup… yes
    checking for strerror… yes
    checking for strlcat… yes
    checking for strlcpy… yes
    checking for strtol… yes
    checking for strtoul… yes
    checking for unsetenv… yes
    checking for getaddrinfo… yes
    checking for getopt_long… yes
    checking for rl_completion_append_character… yes
    checking for rl_completion_matches… yes
    checking for rl_filename_completion_function… yes
    checking for replace_history_entry… yes
    checking for sigsetjmp… yes
    checking whether sys_siglist is declared… yes
    checking for syslog… yes
    checking syslog.h usability… yes
    checking syslog.h presence… yes
    checking for syslog.h… yes
    checking for opterr… yes
    checking for optreset… yes
    checking for strtoll… yes
    checking for strtoull… yes
    checking for atexit… yes
    checking for fseeko… yes
    checking for _LARGEFILE_SOURCE value needed for large files… no
    checking test program… ok
    checking whether long int is 64 bits… yes
    checking for unsigned long… yes
    checking size of unsigned long… 8
    checking for void *… yes
    checking size of void *… 8
    checking for size_t… yes
    checking size of size_t… 8
    checking whether to build with float4 passed by value… yes
    checking whether to build with float8 passed by value… yes
    checking for short… yes
    checking alignment of short… 2
    checking for int… yes
    checking alignment of int… 4
    checking for long… yes
    checking alignment of long… 8
    checking for double… yes
    checking alignment of double… 8
    checking for int8… no
    checking for uint8… no
    checking for int64… no
    checking for uint64… no
    checking for sig_atomic_t… yes
    checking for POSIX signal interface… yes
    checking for special C compiler options needed for large files… no
    checking for _FILE_OFFSET_BITS value needed for large files… no
    checking for off_t… yes
    checking size of off_t… 8
    checking for working memcmp… yes
    checking for onsgmls… no
    checking for nsgmls… no
    checking for openjade… no
    checking for jade… no
    checking for DocBook V4.2… no
    checking for DocBook stylesheets… no
    checking for collateindex.pl… no
    checking for sgmlspl… no
    checking for docbook2man…
    checking if gcc -no-cpp-precomp supports -Wl,-dead_strip_dylibs… yes
    configure: using CFLAGS=-arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv
    configure: using CPPFLAGS=
    configure: using LDFLAGS= -Wl,-dead_strip_dylibs
    configure: creating ./config.status
    config.status: creating GNUmakefile
    config.status: creating src/Makefile.global
    config.status: creating src/include/pg_config.h
    config.status: src/include/pg_config.h is unchanged
    config.status: creating src/interfaces/ecpg/include/ecpg_config.h
    config.status: src/interfaces/ecpg/include/ecpg_config.h is unchanged
    config.status: linking ./src/backend/port/tas/dummy.s to src/backend/port/tas.s
    config.status: linking ./src/backend/port/dynloader/darwin.c to src/backend/port/dynloader.c
    config.status: linking ./src/backend/port/sysv_sema.c to src/backend/port/pg_sema.c
    config.status: linking ./src/backend/port/sysv_shmem.c to src/backend/port/pg_shmem.c
    config.status: linking ./src/backend/port/dynloader/darwin.h to src/include/dynloader.h
    config.status: linking ./src/include/port/darwin.h to src/include/pg_config_os.h
    config.status: linking ./src/makefiles/Makefile.darwin to src/Makefile.port
    edward-rockwells-macbook-pro:postgresql-8.4.0 edwardrockwell$ make
    make -C doc all
    gzip -d -c man.tar.gz | /usr/bin/tar xf -
    make -C src all
    make -C port all
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o chklocale.o chklocale.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o copydir.o copydir.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o dirmod.o dirmod.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o exec.o exec.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o noblock.o noblock.c
    echo “#define PGBINDIR \”/usr/local/postgres-8.4.0//bin\”" >pg_config_paths.h
    echo “#define PGSHAREDIR \”/usr/local/postgres-8.4.0//share\”" >>pg_config_paths.h
    echo “#define SYSCONFDIR \”/usr/local/postgres-8.4.0//etc\”" >>pg_config_paths.h
    echo “#define INCLUDEDIR \”/usr/local/postgres-8.4.0//include\”" >>pg_config_paths.h
    echo “#define PKGINCLUDEDIR \”/usr/local/postgres-8.4.0//include\”" >>pg_config_paths.h
    echo “#define INCLUDEDIRSERVER \”/usr/local/postgres-8.4.0//include/server\”" >>pg_config_paths.h
    echo “#define LIBDIR \”/usr/local/postgres-8.4.0//lib\”" >>pg_config_paths.h
    echo “#define PKGLIBDIR \”/usr/local/postgres-8.4.0//lib\”" >>pg_config_paths.h
    echo “#define LOCALEDIR \”/usr/local/postgres-8.4.0//share/locale\”" >>pg_config_paths.h
    echo “#define DOCDIR \”/usr/local/postgres-8.4.0//share/doc/\”" >>pg_config_paths.h
    echo “#define HTMLDIR \”/usr/local/postgres-8.4.0//share/doc/\”" >>pg_config_paths.h
    echo “#define MANDIR \”/usr/local/postgres-8.4.0//share/man\”" >>pg_config_paths.h
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o path.o path.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o pgsleep.o pgsleep.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o pgstrcasecmp.o pgstrcasecmp.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o qsort.o qsort.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o qsort_arg.o qsort_arg.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c -o sprompt.o sprompt.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -DFRONTEND -I../../src/include -c thread.c
    ar crs libpgport.a chklocale.o copydir.o dirmod.o exec.o noblock.o path.o pgsleep.o pgstrcasecmp.o qsort.o qsort_arg.o sprompt.o thread.o
    ranlib: archive library: libpgport.a will be fat and ar(1) will not be able to operate on it
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c chklocale.c -o chklocale_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c copydir.c -o copydir_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c dirmod.c -o dirmod_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c exec.c -o exec_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c noblock.c -o noblock_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c path.c -o path_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c pgsleep.c -o pgsleep_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c pgstrcasecmp.c -o pgstrcasecmp_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c qsort.c -o qsort_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c qsort_arg.c -o qsort_arg_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c sprompt.c -o sprompt_srv.o
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/port -I../../src/include -c thread.c -o thread_srv.o
    ar crs libpgport_srv.a chklocale_srv.o copydir_srv.o dirmod_srv.o exec_srv.o noblock_srv.o path_srv.o pgsleep_srv.o pgstrcasecmp_srv.o qsort_srv.o qsort_arg_srv.o sprompt_srv.o thread_srv.o
    ranlib: archive library: libpgport_srv.a will be fat and ar(1) will not be able to operate on it
    make -C timezone all
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/include -c -o localtime.o localtime.c
    localtime.c: In function ‘differ_by_repeat’:
    localtime.c:148: warning: integer overflow in expression
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/include -c -o strftime.o strftime.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/include -c -o pgtz.o pgtz.c
    ( echo src/timezone/localtime.o src/timezone/strftime.o src/timezone/pgtz.o ) >objfiles.txt
    make -C ../../src/port all
    make[3]: Nothing to be done for `all’.
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/include -c -o zic.o zic.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/include -c -o ialloc.o ialloc.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../src/include -c -o scheck.o scheck.c
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv zic.o ialloc.o scheck.o localtime.o -L../../src/port -Wl,-dead_strip_dylibs -lpgport -lz -lreadline -lm -o zic
    make -C backend all
    make -C ../../src/port all
    make[3]: Nothing to be done for `all’.
    prereqdir=`cd parser/ >/dev/null && pwd` && \
    cd ../../src/include/parser/ && rm -f gram.h && \
    ln -s “$prereqdir/gram.h” .
    make -C utils fmgroids.h
    AWK=’awk’ /bin/sh Gen_fmgrtab.sh ../../../src/include/catalog/pg_proc.h
    cd ../../src/include/utils/ && rm -f fmgroids.h && \
    ln -s ../../../src/backend/utils/fmgroids.h .
    make -C utils probes.h
    sed -f ./Gen_dummy_probes.sed probes.d >probes.h
    cd ../../src/include/utils/ && rm -f probes.h && \
    ln -s ../../../src/backend/utils/probes.h .
    make -C access all
    make -C common all
    gcc -no-cpp-precomp -arch i386 -arch x86_64 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -I../../../../src/include -c -o heaptuple.o heaptuple.c
    heaptuple.c: In function ‘heap_fill_tuple’:
    heaptuple.c:196: error: duplicate case value
    heaptuple.c:196: error: previously used here
    lipo: can’t figure out the architecture type of: /var/folders/tV/tV0yTb6aELWiQ3MNi-voxE+++TI/-Tmp-//ccJVQNVD.out
    make[4]: *** [heaptuple.o] Error 1
    make[3]: *** [common-recursive] Error 2
    make[2]: *** [access-recursive] Error 2
    make[1]: *** [all] Error 2
    make: *** [all] Error 2

    I hope this helps ..

  7. The updates to the blog fixed it. Thanks ..

  8. @Philip: updated instructions don’t work either.
    Just do the
    # sudo make -C src/interfaces install
    and then
    # cd src/include
    # sudo cp postgres_ext.h /usr/local/mypostgres/include
    # sudo cp pg_config.h /usr/local/mypostgres/include
    # sudo cp -R libpq /usr/local/mypostgres/include
    And you still need to define PG_VERSION in the config.h file in the php build.
    Copying pg_config.h is only necessary for pdo_pgsql, that one works the same as building the pgsql extension, just use ./configure –with-pdo_pgsql=/usr/local/mypostgres

  9. @Hugo: Of PG_VERSION should get correctly defined if you run the two configure scripts. It could be though that ext/pgsql’s configure needs pg_config to work correctly which is why I also added the compilation of the client-side binaries to my instructions in the entry itself.

  10. You’re right. I did it again from the top and it works. Thanks!
    It also works for pdo_pgsql.

  11. I’m up and running again thanks to your post.

    Note to anybody who already has Postgres installed when they arrive here: I didn’t have to mess with Postgres (already installed via links below), I just went straight to the PHP instructions and installed the pgsql module.

    Also, two posts that may be helpful for anybody going through this process with Snow Leopard right now:

    [Postgres section here]
    http://afreshcup.com/2009/09/02/migrating-to-snow-leopard-for-rails-development-a-definitive-guide/
    [Above link points here for Leopard instructions that worked fine for me on Snow Leopard]
    http://devoh.com/posts/2008/10/installing-postgresql-on-mac-os-x-10.5-leopard

  12. Hi Philip, can you share on your site the pgsql.so and pdo_pgsql.so for snow leopard? I have some problems with libpq and i don’t know much about compiling stuffs….

    Thank you

  13. Thank you so much for this – it worked flawlessly!

    If you want to add in the PDO Postgres driver as well I found the following URL to be of great use:

    http://stackoverflow.com/questions/61747/installing-pdo-drivers-for-postgresql-on-mac-using-zend-for-eclipse

  14. Thanks for the tips but I steal have a problem when ./configure pdo_pgsql.

    When you say “go to ext/pgsql” in the php5.3 source folder, I do the same with “ext/pdo_pgsql”
    I run “phpize” and I try “./configure –with-pgsql=/usr/local/mypostgres”
    After some work I got that:
    checking for PostgreSQL support for PDO… yes, shared
    checking for pg_config… not found
    configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path

    My “libpq-fe.h” is in the /usr/local/mypostgres/include so I think the problem is with “pg_config” so I fixe the problem by setting “export PG_CONFIG=/path/path/pg_config”

    I enable “pdo_pgsql.so” in my php.ini but pgsql support in PDO is not enable in phpinfo();

    does anyone have any idea?

    Thanks

  15. the bit below worked for me. thanks for this page.

    Thibaut said:
    > My “libpq-fe.h” is in the /usr/local/mypostgres/include so I think the problem is with “pg_config” so I fixe the problem by setting “export PG_CONFIG=/path/path/pg_config”


Leave a comment


No trackbacks yet.