<?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>Wilted buttercup, grey skies, and geek &#187; _g_bit_nth_lsf</title>
	<atom:link href="http://mmt.me.uk/blog/tag/_g_bit_nth_lsf/feed/" rel="self" type="application/rss+xml" />
	<link>http://mmt.me.uk/blog</link>
	<description>Mischa’s ramblings on the interweb</description>
	<lastBuildDate>Mon, 16 Jan 2012 23:23:02 +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>ld: duplicate symbol _g_bit_nth_lsf Mac OSX Leopard/Darwin</title>
		<link>http://mmt.me.uk/blog/2009/07/07/ld-duplicate-symbol-_g_bit_nth_lsf-mac-osx-leoparddarwin/</link>
		<comments>http://mmt.me.uk/blog/2009/07/07/ld-duplicate-symbol-_g_bit_nth_lsf-mac-osx-leoparddarwin/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 16:41:46 +0000</pubDate>
		<dc:creator>Mischa</dc:creator>
				<category><![CDATA[glib]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[_g_bit_nth_lsf]]></category>

		<guid isPermaLink="false">http://mmt.me.uk/blog/?p=19</guid>
		<description><![CDATA[I have had some problems installing software from source on my Max OS X Leopard machine. I should thank Martin Szomszor for his help on getting this working, but after some time faffing we finally got it sorted out. I found that I was having problems making software on Leopard, which I could build fine [...]]]></description>
			<content:encoded><![CDATA[<p>I have had some problems installing software from source on my <a href="http://www.apple.com/macosx/">Max OS X Leopard machine.</a> I should thank <a href="http://users.ecs.soton.ac.uk/mns2/">Martin Szomszor</a> for his help on getting this working, but after some time faffing we finally got it sorted out.</p>
<p>I found that I was having problems making software on Leopard, which I could build fine on my linux (<a href="http://fedoraproject.org/">fedora</a>) machines. The error I was getting was:</p>
<p><b>ld: duplicate symbol _g_bit_nth_lsf in foo.o and bar.o</b></p>
<p>I am running Leopard 10.5.3. I was using glib2, installed via <a href="http://www.finkproject.org/">Fink</a>, version number: 2.12.0-103. After spending lots of time googling I found the following article to be of the most use, <a href="http://www.anders.com/cms/241/Wireshark/MacPorts">&#8220;Wireshark with Macports&#8221;</a>, where Anders Brownworth pointed out that the error was due to a &#8220;<a href="http://trac.macosforge.org/projects/macports/ticket/13006">extern inline bug in glib/gutils.h which is easily fixed</a>&#8220;.</p>
<p>So to fix this:</p>
<ul>
<li>I located <b>gutils.h</b>, which I found here:<br/><br />
 /sw/include/glib-2.0/glib/gutils.h</li>
<li>I then replaced these lines:<br/><br />
<code>#ifdef G_IMPLEMENT_INLINES<br/><br />
#  define G_INLINE_FUNC<br/><br />
#  undef  G_CAN_INLINE<br/></p>
<p>#elif defined (__GNUC__)<br/><br />
#  define G_INLINE_FUNC extern inline<br/><br />
#elif defined (G_CAN_INLINE)</code></li>
<li>With this:<br/><br />
<code>#ifdef G_IMPLEMENT_INLINES<br/><br />
#  define G_INLINE_FUNC<br/><br />
#  undef  G_CAN_INLINE<br/><br />
<font color="red"><code>#elif defined (__APPLE__)<br/><br />
#  define G_INLINE_FUNC static inline</code></font><br/></p>
<p>#elif defined (__GNUC__) <br/><br />
#  define G_INLINE_FUNC extern inline<br/><br />
#elif defined (G_CAN_INLINE)</code></li>
<li>By adding these two middle lines:<br/><br />
<font color="red"><b><code>#elif defined (__APPLE__)<br/><br />
#  define G_INLINE_FUNC static inline</code></b></font></li>
<li>The start of the fragment of code was at line number <em>96</em> in my <b>gutils.h</b> file</li>
</ul>
<p>Here is a link to my edited and working <a href="http://mmt.me.uk/files/gutils.h">gutils.h file</a>.</p>
<p><b>Note 1:</b> I would make sure I get a copy of my original gutils.h file, as this may come in handy</p>
<p><b>Note 2:</b> There is a <a href="http://trac.macosforge.org/projects/macports/attachment/ticket/13006/glib2-inline.2.patch?format=raw">patch</a> which one could apply to make the same changes which I have just described here. This patch follows this <a href="http://trac.macports.org/ticket/13006">ticket</a>. I didn&#8217;t know what to do with the patch file, so I ended up editing the file by hand:). I am guessing that is something todo with macports, mmm, nevermind, its working now.</p>
]]></content:encoded>
			<wfw:commentRss>http://mmt.me.uk/blog/2009/07/07/ld-duplicate-symbol-_g_bit_nth_lsf-mac-osx-leoparddarwin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

