From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Creating Universal OSX binaries |
Date: | 2008-07-31 18:28:51 |
Message-ID: | 200807311828.m6VISpS25148@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Do we know this trick for creating Universal (four-architecture)
binaries for OSX?
http://r0ml.net/blog/2008/06/19/universal-postgres
---------------------------------------------------------------------------
It turns out that nobody seems to know how to build a Universal version
of PostgreSQL for OSX. This turned into a problem for me when I was
trying to build a version of PHP with support for postgres I
needed Universal (four-architecture) libraries.
The following seems to work (Im running an Intel Leopard):
1) I have the following variables set in my .bashrc --- I build
everything Universal. If you dont have these variables set, you
should set them now.
export CCFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -pipe'
export CFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -pipe
-no-cpp-precomp'
export CXXFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64 -pipe'
export LDFLAGS='-arch ppc -arch ppc64 -arch i386 -arch x86_64
-bind_at_load'
2) ./configure --with-the-options-of-your-choice
3) LD=gcc AR=libtool AROPT='-static -o' LDREL='$(LDFLAGS) -nostartfiles
-r' make -e
4) sudo make install
Step 3 was the tricky bit ;)
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-07-31 18:39:23 | Re: Creating Universal OSX binaries |
Previous Message | David Fetter | 2008-07-31 18:23:53 | Re: window function v03 against HEAD |