<?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>pastbedti.me &#187; vim</title>
	<atom:link href="http://www.pastbedti.me/tag/vim/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pastbedti.me</link>
	<description>About ruby, rails, postgresql and stuff....</description>
	<lastBuildDate>Wed, 01 Jun 2011 20:09:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to compile VIM under OS X</title>
		<link>http://www.pastbedti.me/2009/01/how-to-compile-vim-under-os-x/</link>
		<comments>http://www.pastbedti.me/2009/01/how-to-compile-vim-under-os-x/#comments</comments>
		<pubDate>Sun, 11 Jan 2009 09:53:31 +0000</pubDate>
		<dc:creator>Mathias Stjernström</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[compiling]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.pastbedti.me/?p=367</guid>
		<description><![CDATA[Configure and compiling VIM under OS X did not work out-of-the box for me. I did not want to use MacPorts VIM as it&#8217;s dependent on ruby (if you like me want that) and I did not find a way of compiling MacPorts VIM against my local ruby. This post is about how to get [...]]]></description>
			<content:encoded><![CDATA[<p>Configure and compiling <a href="http://www.vim.org/">VIM</a> under OS X did not work out-of-the box for me. I did not want to use <a href="http://www.macports.org/">MacPorts</a> VIM as it&#8217;s dependent on ruby (if you like me want that) and I did not find a way of compiling MacPorts VIM against my local ruby.</p>
<p>This post is about how to get VIM compiling on OS X/intel without the use of  MacPorts.</p>
<p><span id="more-367"></span></p>
<h3>1. Configure without specifying architecture</h3>
<p>When running configure without specifying architecture everything looks fine but when you run make you get this nice little error.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-rubyinterp</span> <span style="color: #660033;">--enable-multibyte</span> <span style="color: #660033;">--with-features</span>=huge<br />
... stripped output ...<br />
<span style="color: #c20cb9; font-weight: bold;">make</span><br />
<br />
Undefined symbols <span style="color: #000000; font-weight: bold;">for</span> architecture ppc:<br />
&nbsp; <span style="color: #ff0000;">&quot;_main&quot;</span>, referenced from:<br />
&nbsp; &nbsp; &nbsp; start <span style="color: #000000; font-weight: bold;">in</span> crt1.10.5.o<br />
ld: symbol<span style="color: #7a0874; font-weight: bold;">&#40;</span>s<span style="color: #7a0874; font-weight: bold;">&#41;</span> not found <span style="color: #000000; font-weight: bold;">for</span> architecture ppc<br />
collect2: <span style="color: #c20cb9; font-weight: bold;">ld</span> returned <span style="color: #000000;">1</span> <span style="color: #7a0874; font-weight: bold;">exit</span> status<br />
lipo: can<span style="color: #ff0000;">'t open input file: /var/folders/os/osNwawQ0Hreve7NDQEugQ++++TI/-Tmp-//ccD17Dx3.out (No such file or directory)<br />
make[1]: *** [Vim] Error 1<br />
make: *** [first] Error 2</span></div></td></tr></tbody></table></div>
<p>I did not do any <a href="http://en.wikipedia.org/wiki/Sherlock_Holmes">Sherlock holmes</a> work to understand this message as I do not need PPC support. I learned that there is a flag called &#8216;<strong>&#8211;with-mac-arch</strong>&#8216;.</p>
<h3>2. configure with specifying architecture</h3>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br />3<br />4<br />5<br />6<br />7<br />8<br />9<br />10<br />11<br />12<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&gt;</span> .<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--with-mac-arch</span>=intel <span style="color: #660033;">--enable-rubyinterp</span> <span style="color: #660033;">--enable-multibyte</span> <span style="color: #660033;">--with-features</span>=huge<br />
<br />
checking <span style="color: #660033;">--with-tlib</span> argument... empty: automatic terminal library selection<br />
checking <span style="color: #000000; font-weight: bold;">for</span> tgetent <span style="color: #000000; font-weight: bold;">in</span> -lncurses... <span style="color: #7a0874; font-weight: bold;">&#40;</span>cached<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #c20cb9; font-weight: bold;">yes</span><br />
ncurses library is not usable<br />
checking <span style="color: #000000; font-weight: bold;">for</span> tgetent <span style="color: #000000; font-weight: bold;">in</span> -ltermlib... no<br />
checking <span style="color: #000000; font-weight: bold;">for</span> tgetent <span style="color: #000000; font-weight: bold;">in</span> -ltermcap... no<br />
checking <span style="color: #000000; font-weight: bold;">for</span> tgetent <span style="color: #000000; font-weight: bold;">in</span> -lcurses... no<br />
no terminal library found<br />
checking <span style="color: #000000; font-weight: bold;">for</span> tgetent<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>... configure: error: NOT FOUND<span style="color: #000000; font-weight: bold;">!</span><br />
&nbsp; &nbsp; &nbsp; You need to <span style="color: #c20cb9; font-weight: bold;">install</span> a terminal library; <span style="color: #000000; font-weight: bold;">for</span> example ncurses.<br />
&nbsp; &nbsp; &nbsp; Or specify the name of the library with --with-tlib.</div></td></tr></tbody></table></div>
<p>But as you can see specifying architecture did not even make is trough configure. I tried to specifying &#8211;with-tlib and adding LIBS path did not help. I did spend quite some time on this step to solve this one, but no luck here.</p>
<h3>3. The working solution.</h3>
<p>This became the working solution for me. Not that pretty but it did work <img src='http://www.pastbedti.me/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Run ./configure without arch flags.</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">.<span style="color: #000000; font-weight: bold;">/</span>configure <span style="color: #660033;">--enable-rubyinterp</span> <span style="color: #660033;">--enable-multibyte</span> <span style="color: #660033;">--with-features</span>=huge</div></td></tr></tbody></table></div>
<p>When done, edit src/auto/config.mk and remove PPC arch.<br />
And yes! I know editing src/auto/config.mk  is not that good and that the file is getting overwritten every time you run configure</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #c20cb9; font-weight: bold;">vim</span> src<span style="color: #000000; font-weight: bold;">/</span>auto<span style="color: #000000; font-weight: bold;">/</span>config.mk</div></td></tr></tbody></table></div>
<p>on Line 26</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">&nbsp; LDFLAGS &nbsp; = -L. <span style="color: #660033;">-arch</span> ppc <span style="color: #660033;">-arch</span> i386 &nbsp;-L<span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib</div></td></tr></tbody></table></div>
<p>Remove the PPC part &#8220;<strong>-arch ppc</strong>&#8221;<br />
After removing PPC you can run:</p>
<div class="codecolorer-container bash twitlight" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><table cellspacing="0" cellpadding="0"><tbody><tr><td style="padding:5px;text-align:center;color:#888888;background-color:#EEEEEE;border-right: 1px solid #9F9F9F;font: normal 12px/1.4em Monaco, Lucida Console, monospace;"><div>1<br />2<br /></div></td><td><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #c20cb9; font-weight: bold;">make</span><br />
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">make</span> <span style="color: #c20cb9; font-weight: bold;">install</span></div></td></tr></tbody></table></div>
<p>I hope this can save someone else some time and i hope this is one of many to come blog posts that involves VIM!</p>
<p>Cheers! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.pastbedti.me/2009/01/how-to-compile-vim-under-os-x/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

