![]() |
“The beast is actively interested only in now, and, as it is always now and always shall be, there is an eternity of time for the accomplishment of objects.” - the wisdom of Tarzan |
Kyng Chaos |
|
Table of Contents
PostgreSQL Build
version: 8.3.3
Postgres can't be compiled universal out of the box. This is because
Edit src/makefile.global.in, change the LDREL = -Wl,-r
Don't worry about LeopardIn the postgresql source folder: Configureexport MACOSX_DEPLOYMENT_TARGET=10.5 ./configure --with-openssl --with-pam --with-krb5 --with-ldap --enable-thread-safety \ --with-bonjour --with-python --without-perl --enable-nls \ CC=ccub_3264 CFLAGS="-Os -D_FILE_OFFSET_BITS=64" LD="ccub_3264 -nostdlib" I left out perl support because perl is like python, only partially 64bits, and I haven't tried adding it (I'm not really interested in perl). When configure is done, a couple files must be patched for endianess and 64bits: src/include/pg_config.hreplace in each: 64bit stuff– the ALIGNOF_DOUBLE line with: #ifdef __LP64__ #define ALIGNOF_DOUBLE 8 #else #define ALIGNOF_DOUBLE 4 #endif – the ALIGNOF_LONG line with: #ifdef __LP64__ #define ALIGNOF_LONG 8 #else #define ALIGNOF_LONG 4 #endif – the ALIGNOF_LONG_LONG_INT line with: #ifndef __LP64__ #define ALIGNOF_LONG_LONG_INT 4 #endif – the HAVE_LL_CONSTANTS line with: #ifndef __LP64__ #define HAVE_LL_CONSTANTS 1 #endif – the HAVE_LONG_INT_64 and HAVE_LONG_LONG_INT_64 lines with: #ifdef __LP64__ #define HAVE_LONG_INT_64 #else #define HAVE_LONG_LONG_INT_64 #endif – the INT64_FORMAT line with: #ifdef __LP64__ #define INT64_FORMAT "%ld" #else #define INT64_FORMAT "%lld" #endif – the MAXIMUM_ALIGNOF line with: #ifdef __LP64__ #define MAXIMUM_ALIGNOF 8 #else #define MAXIMUM_ALIGNOF 4 #endif – the SIZEOF_SIZE_T line with: #ifdef __LP64__ #define SIZEOF_SIZE_T 8 #else #define SIZEOF_SIZE_T 4 #endif – the SIZEOF_UNSIGNED_LONG line with: #ifdef __LP64__ #define SIZEOF_UNSIGNED_LONG 8 #else #define SIZEOF_UNSIGNED_LONG 4 #endif – the UINT64_FORMAT line with: #ifdef __LP64__ #define UINT64_FORMAT "%lu" #else #define UINT64_FORMAT "%llu" #endif endian stuff– the WORDS_BIGENDIAN line with: #ifdef __BIG_ENDIAN__ #define WORDS_BIGENDIAN 1 #else #undef WORDS_BIGENDIAN #endif src/interfaces/ecpg/include/ecpg_config.h64bit stuff– the HAVE_LONG_INT_64 and HAVE_LONG_LONG_INT_64 lines with: #ifdef __LP64__ #define HAVE_LONG_INT_64 #else #define HAVE_LONG_LONG_INT_64 #endif make & installmake sudo make install TigerIn the postgresql source folder: Configureexport MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --with-openssl --with-pam --with-krb5 --with-ldap --enable-thread-safety \ --with-bonjour --with-python --without-perl --enable-nls \ CC=ccub_3264 CFLAGS="-Os -D_FILE_OFFSET_BITS=64" LD="ccub_3264 -nostdlib" When adding Python support, an up-to-date package from python.org is recommended. When configure is done, a couple files must be patched for endianess and 64bits: src/include/pg_config.hApply just the endian edits from the Leopard notes. make & installmake sudo make install PantherIn the postgresql source folder: export MACOSX_DEPLOYMENT_TARGET=10.3 ./configure --with-openssl --with-pam --with-krb5 --with-ldap --enable-thread-safety \ --with-bonjour --with-python --without-perl --enable-nls \ CFLAGS="-Os -D_FILE_OFFSET_BITS=64" LD="gcc -nostdlib" make sudo make install When adding Python support, an up-to-date package from python.org is recommended. SetupFor now, see the Postgres documentation and the Installation section of the README.postgis document. |
| Copyright © 2004-2008 Kyng Chaos All trademarks and copyrights on this page are owned by their respective owners. |
Powered By Geeklog |