<?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>PJ For President &#187; Uncategorized</title>
	<atom:link href="http://pjforpresident.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://pjforpresident.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 12 Sep 2009 04:41:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Compiling MySQL Native Bindings on OS X + MacPorts</title>
		<link>http://pjforpresident.com/2008/06/20/compiling-mysql-native-bindings-on-os-x-macports/</link>
		<comments>http://pjforpresident.com/2008/06/20/compiling-mysql-native-bindings-on-os-x-macports/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 04:37:28 +0000</pubDate>
		<dc:creator>pjdavis</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://pjforpresident.com/?p=3</guid>
		<description><![CDATA[Playing around with the partitions on my mac yesterday, i accidently deleted the efi partition (dumb of me, i know), but I figured it was about time for a reload, so i just sucked it up and wiped the mac clean.
Going through and installing all the stuff i needed for development, i ran into a [...]]]></description>
			<content:encoded><![CDATA[<p>Playing around with the partitions on my mac yesterday, i accidently deleted the efi partition (dumb of me, i know), but I figured it was about time for a reload, so i just sucked it up and wiped the mac clean.</p>
<p>Going through and installing all the stuff i needed for development, i ran into a problem installing the native mysql bindings for ruby.</p>
<p><span id="more-3"></span></p>
<blockquote>
<div>[host-192-168-254-149:~] pjdavis% sudo gem install mysql</div>
<div>Bulk updating Gem source index for: http://gems.rubyforge.org/</div>
<div>Building native extensions.  This could take a while&#8230;</div>
<div>ERROR:  Error installing mysql:</div>
<div>ERROR: Failed to build gem native extension.</div>
<div>/opt/local/bin/ruby extconf.rb install mysql</div>
<div>checking for mysql_query() in -lmysqlclient&#8230; no</div>
<div>checking for main() in -lm&#8230; yes</div>
<div>checking for mysql_query() in -lmysqlclient&#8230; no</div>
<div>checking for main() in -lz&#8230; yes</div>
<div>checking for mysql_query() in -lmysqlclient&#8230; no</div>
<div>checking for main() in -lsocket&#8230; no</div>
<div>checking for mysql_query() in -lmysqlclient&#8230; no</div>
<div>checking for main() in -lnsl&#8230; no</div>
<div>checking for mysql_query() in -lmysqlclient&#8230; no</div>
<div>*** extconf.rb failed ***</div>
<div>Could not create Makefile due to some reason, probably lack of</div>
<div>necessary libraries and/or headers.  Check the mkmf.log file for more</div>
<div>details.  You may need configuration options.</div>
<div>Provided configuration options:</div>
<div>&#8211;with-opt-dir</div>
<div>&#8211;without-opt-dir</div>
<div>&#8211;with-opt-include</div>
<div>&#8211;without-opt-include=${opt-dir}/include</div>
<div>&#8211;with-opt-lib</div>
<div>&#8211;without-opt-lib=${opt-dir}/lib</div>
<div>&#8211;with-make-prog</div>
<div>&#8211;without-make-prog</div>
<div>&#8211;srcdir=.</div>
<div>&#8211;curdir</div>
<div>&#8211;ruby=/opt/local/bin/ruby</div>
<div>&#8211;with-mysql-config</div>
<div>&#8211;without-mysql-config</div>
<div>&#8211;with-mysql-dir</div>
<div>&#8211;without-mysql-dir</div>
<div>&#8211;with-mysql-include</div>
<div>&#8211;without-mysql-include=${mysql-dir}/include</div>
<div>&#8211;with-mysql-lib</div>
<div>&#8211;without-mysql-lib=${mysql-dir}/lib</div>
<div>&#8211;with-mysqlclientlib</div>
<div>&#8211;without-mysqlclientlib</div>
<div>&#8211;with-mlib</div>
<div>&#8211;without-mlib</div>
<div>&#8211;with-mysqlclientlib</div>
<div>&#8211;without-mysqlclientlib</div>
<div>&#8211;with-zlib</div>
<div>&#8211;without-zlib</div>
<div>&#8211;with-mysqlclientlib</div>
<div>&#8211;without-mysqlclientlib</div>
<div>&#8211;with-socketlib</div>
<div>&#8211;without-socketlib</div>
<div>&#8211;with-mysqlclientlib</div>
<div>&#8211;without-mysqlclientlib</div>
<div>&#8211;with-nsllib</div>
<div>&#8211;without-nsllib</div>
<div>&#8211;with-mysqlclientlib</div>
<div>&#8211;without-mysqlclientlib</div>
<div>Gem files will remain installed in /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7 for inspection.</div>
<div>Results logged to /opt/local/lib/ruby/gems/1.8/gems/mysql-2.7/gem_make.out</div>
</blockquote>
<div>I had installed mysql with macports, and that is what was causing the problem. Turns out gem can&#8217;t find everything it needs to compile the mysql bindings. Instead of just [sourcecode language=sh]sudo gem install mysql &#8212; \<br />
&#8211;with-mysql-include=/opt/local/include/mysql5/mysql/ \<br />
&#8211;with-mysql-lib=/opt/local/lib/mysql5/mysql/ \<br />
&#8211;with-mysql-config=/opt/local/bin/mysql_config5[/sourcecode] if you installed mysql through macports or porticus.</div>
<div>Hope this helps everyone</div>
<div>Update: accoring a comment on <a href="http://blog.springenwerk.com/2008/11/rails-22-and-native-mysql-gem-on-mac-os.html">this blog</a> Bryanl (who I believe is smarticus, he just didn&#8217;t bother to fill out his blogger profile) says that all you really need is the config part. So you may only need to do [sourcecode language=sh]sudo gem install mysql &#8212; &#8211;with-mysql-config=/opt/local/bin/mysql_config5[/sourcecode]</div>
]]></content:encoded>
			<wfw:commentRss>http://pjforpresident.com/2008/06/20/compiling-mysql-native-bindings-on-os-x-macports/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
