<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>我的备忘录 &#187; Kafeifei</title>
	<atom:link href="http://www.nimab.org/author/kafeifei/feed" rel="self" type="application/rss+xml" />
	<link>http://www.nimab.org</link>
	<description>穷困潦倒</description>
	<lastBuildDate>Mon, 29 Aug 2011 02:53:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Leopard 编译 universal php5</title>
		<link>http://www.nimab.org/2007/12/11/24.html</link>
		<comments>http://www.nimab.org/2007/12/11/24.html#comments</comments>
		<pubDate>Mon, 10 Dec 2007 17:02:19 +0000</pubDate>
		<dc:creator>Kafeifei</dc:creator>
				<category><![CDATA[bash]]></category>
		<category><![CDATA[Bsd]]></category>
		<category><![CDATA[MacosX]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.nimab.org/2007/12/11/24.html</guid>
		<description><![CDATA[因为自带的php没有gd所以要重编 因为服务器用的是x86_64 httpd+php5所以要编 x86_64 因为自带的httpd+php是 universal ，所以要这样做 自带的httpd很好，所以不搞它了 参考: ppc就不要了 export MACOSX_DEPLOYMENT_TARGET=10.5 export ARCHFLAGS='-arch i386 -arch x86_64' export CFLAGS='-arch i386 -arch x86_64 -O3 -pipe' export CXXFLAGS='-arch i386 -arch x86_64 -O3 -pipe' export LDFLAGS='-arch i386 -arch x86_64 -bind_at_load' make时候可能出现这样的提示： gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags 在 configure 的时候加上 [...]]]></description>
			<content:encoded><![CDATA[<p>因为自带的php没有gd所以要重编<br />
因为服务器用的是x86_64 httpd+php5所以要编 x86_64<br />
因为自带的httpd+php是 universal ，所以要这样做<br />
自带的httpd很好，所以不搞它了<br />
<strong>参考:</strong><br />
ppc就不要了</p>
<blockquote><p>
export MACOSX_DEPLOYMENT_TARGET=10.5<br />
export ARCHFLAGS='-arch i386 -arch x86_64'<br />
export CFLAGS='-arch i386 -arch x86_64 -O3 -pipe'<br />
export CXXFLAGS='-arch i386 -arch x86_64 -O3 -pipe'<br />
export LDFLAGS='-arch i386 -arch x86_64 -bind_at_load'
</p></blockquote>
<p>make时候可能出现这样的提示：</p>
<blockquote><p>gcc-4.0: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags</p></blockquote>
<p>在 configure 的时候加上 --disable-dependency-tracking</p>
<blockquote><p>
'./configure' \<br />
'--prefix=/usr' \<br />
'--with-config-file-path=/private/etc' \<br />
'--sysconfdir=/private/etc' \<br />
'--with-apxs2=/usr/sbin/apxs' \<br />
'--with-iconv=/usr/local' \<br />
'--with-mhash=/usr/local' \<br />
'--with-gettext=/usr/local' \<br />
'--with-mysql=/usr/local' \<br />
'--with-mysqli=/usr/local/bin/mysql_config' \<br />
'--with-pdo-mysql=/usr/local' \<br />
'--with-openssl=/usr' \<br />
'--with-zlib=/usr' \<br />
'--with-curl=/usr' \<br />
'--with-gd' \<br />
'--with-png-dir=/usr/X11' \<br />
'--with-jpeg-dir=/usr/local' \<br />
'--with-freetype-dir=/usr/X11' \<br />
'--with-xpm-dir=/usr/X11' \<br />
'--enable-gd-native-ttf' \<br />
'--enable-mbstring' \<br />
'--enable-sockets' \
</p></blockquote>
<p>已有的库就不重装了，只需自己安装 gawk, libiconv, mhash, gettext, mysql, jpeg<br />
需要特别注意：系统自带的liviconv有问题，需要自己编一份到/usr/local(小心不要覆盖以前的，否则可能连sh都不能执行了)，php在configure时就算指定了 --with-iconv=/usr/local 它还是首先找到 /usr/include/iconv.h ,而且 --help 里只提到 --with-iconv-dir=，应该使用 --with-iconv=<br />
解决方法：</p>
<blockquote><p>
sh#mv /usr/include/iconv.h /usr/include/iconv.h.bak
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.nimab.org/2007/12/11/24.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

