<?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>skia &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<atom:link href="https://blog.sephiroth.it/tag/skia/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.sephiroth.it</link>
	<description>programmer by pure chance</description>
	<lastBuildDate>Mon, 17 Oct 2011 00:25:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	

<image>
	<url>https://blog.sephiroth.it/wp-content/uploads/2019/03/cropped-sepy-big-32x32.png</url>
	<title>skia &#8211; Alessandro Crugnola &#8211; sephiroth.it</title>
	<link>https://blog.sephiroth.it</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Compile skia for android on Mac Lion</title>
		<link>https://blog.sephiroth.it/2011/10/17/compiling-android-source-on-mac-lion/</link>
					<comments>https://blog.sephiroth.it/2011/10/17/compiling-android-source-on-mac-lion/#respond</comments>
		
		<dc:creator><![CDATA[Alessandro Crugnola]]></dc:creator>
		<pubDate>Mon, 17 Oct 2011 00:23:28 +0000</pubDate>
				<category><![CDATA[android]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[skia]]></category>
		<guid isPermaLink="false">http://blog.sephiroth.it/?p=1575</guid>

					<description><![CDATA[Some time ago I started to look at skia as possible solution for graphics 2D editing for a native android project I was developing. Well, even if skia is part of the android system and it&#8217;s used everywhere by android itself, trying to include skia in my project was quite an hell.. Looking for resources &#8230; <a href="https://blog.sephiroth.it/2011/10/17/compiling-android-source-on-mac-lion/" class="more-link">Continue reading <span class="screen-reader-text">Compile skia for android on Mac Lion</span></a>]]></description>
										<content:encoded><![CDATA[<p>Some time ago I started to look at <a title="skia on google code" href="http://code.google.com/p/skia/" target="_blank">skia</a> as possible solution for graphics 2D editing for a native android project I was developing.<br />
Well, even if skia is part of the android system and it&#8217;s used everywhere by android itself, trying to include skia in my project was quite an hell..<br />
Looking for resources I just found old examples and tips, and every try was just a failure.. but since android uses skia internally to do graphics operations I decided to look into the android project.</p>
<p>After downloading the skia module from the android git repository I just realized it couldn&#8217;t be compiled by itself because it has external dependencies. So next step was to download and compile the whole android source code. Easy task? not at all, at least if you&#8217;re on a mac running Lion!</p>
<p>At the end I managed to compile everything and build the skia module as static module, in this way now my project can link the skia library and include correctly the skia headers.</p>
<p>Ok, I don&#8217;t have the whole procedure step by step here, first of all because it depends on the android version you&#8217;re going to compiled, second and most important because I didn&#8217;t write down all the steps 🙂 So this is more a sort of list of notes about compiling android on Lion and a reminder for myself too. ( I was trying to compile android 2.2 using &#8220;generic-user&#8221; as lunch configuration )</p>
<p>Build Android: <a title="build android source" href="http://source.android.com/source/initializing.html" target="_blank">http://source.android.com/source/initializing.html</a></p>
<p>To get rid of clearsilver errors: <a href="http://code.google.com/p/android/issues/detail?id=993#c27" target="_blank">http://code.google.com/p/android/issues/detail?id=993#c27</a></p>
<p>Java 1.5 version complaining: <a href="http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard" target="_blank">http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard</a></p>
<p>Well, the first time you&#8217;ll try to &#8220;<strong>make</strong>&#8221; everything probably you&#8217;ll get this error:</p>
<p>[cc]<br />
./external/elfutils/config-compat-darwin.h:42: error: static declaration of ‘strnlen’ follows non-static declaration<br />
[/cc]</p>
<p><strong>modify ./external/elfutils/config-compat-darwin.h.</strong><br />
replace:<br />
[cc lang=&#8221;c&#8221;]<br />
static inline size_t strnlen (const char *__string, size_t __maxlen)<br />
{<br />
int len = 0;<br />
while (__maxlen&#8211; &#038;&#038; *__string++)<br />
len++;<br />
return len;<br />
}<br />
[/cc]</p>
<p>with:<br />
[cc lang=&#8221;c&#8221;]<br />
#if 0<br />
static inline size_t strnlen (const char *__string, size_t __maxlen)<br />
{<br />
int len = 0;<br />
while (__maxlen&#8211; &#038;&#038; *__string++)<br />
len++;<br />
return len;<br />
}<br />
#endif<br />
[/cc]</p>
<p>Well, at the end of the process I just edited the Android.mk makefile into external/skia adding a new entry for BUILD_STATIC_LIBRARY and the next command was simply:</p>
<p>[cc]mmm external/skia[/cc]</p>
<p>which produced the required libskia.a file to be linked in my project.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.sephiroth.it/2011/10/17/compiling-android-source-on-mac-lion/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
