<?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>RedBrain @ $HOME : ~ $ &#187; autoconf</title>
	<atom:link href="http://redbrain.co.uk/index.php/tag/autoconf/feed/" rel="self" type="application/rss+xml" />
	<link>http://redbrain.co.uk</link>
	<description>Frustrated Software Developer</description>
	<lastBuildDate>Wed, 16 Nov 2011 17:36:07 +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>Intel C++ Complilers Linux</title>
		<link>http://redbrain.co.uk/index.php/quick-tips/intel-c-complilers-linux/</link>
		<comments>http://redbrain.co.uk/index.php/quick-tips/intel-c-complilers-linux/#comments</comments>
		<pubDate>Sat, 28 Nov 2009 16:15:27 +0000</pubDate>
		<dc:creator>redbrain</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[Random]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Update!]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[c/c++]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://redbrain.co.uk/?p=485</guid>
		<description><![CDATA[<p>So if you know me you&#8217;ll know i think compilers are cool&#8230; yeah i know i am weird lol. So any-way&#8217;s this is something i never really got around to until last night. Which was setting up the Intel C/C++ compilers in my Computer which is running Debian. If  you ever look at using compilers [...]]]></description>
			<content:encoded><![CDATA[<p>So if you know me you&#8217;ll know i think compilers are cool&#8230; yeah i know i am weird lol. So any-way&#8217;s this is something i never really got around to until last night. Which was setting up the Intel C/C++ compilers in my Computer which is running Debian. If  you ever look at using compilers other than GCC such as like Sun Studio and Intel C++ you may find its very messy feeling. What i mean is they have like a nasty install.sh, and to be quite honest they fail lol. Since they generally only cared about creating RPM&#8217;s and hoping your running Red Hat since most customers who would buy these compilers would be running a Red Hat server farm. So if your project is using Autoconf and Automake you dont have to worry about a thing, once the compilers are installed it will be one quick minor change to your configure.ac. And your all set!</p>
<p>First off go and download the 750mb tarball of the Intel C compilers over at: <a href="http://software.intel.com/en-us/intel-compilers/">http://software.intel.com/en-us/intel-compilers/</a></p>
<blockquote><p>% tar zxvf l_cproc_p_11.1.059_ia32.tgz</p>
<p>% cd l_cproc_p_11.1.059_ia32</p>
<p>% ./install.sh</p>
<p># follow all the instructions it complained i didn&#8217;t have java installed but you don&#8217;t need it. Once your finished it should all be installed to /opt/intel/Compiler</p>
<p>% PATH=$PATH:/opt/intel/Compiler/11.0/069/bin/ia32</p>
<p>% LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/intel/Compiler/11.1/059/lib/ia32/:/usr/lib/</p></blockquote>
<p>You should be able to run &#8216;icc&#8217; but you will probably get the error: &#8221; /opt/intel/Compiler/11.1/059/bin/ia32/mcpcom: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory</p>
<p>compilation aborted for test.c (code 127)&#8221;</p>
<p>So you need to install an older libstdc++ on debian it is:</p>
<blockquote><p>% aptitude install libstdc++5</p></blockquote>
<p>That should be it lets give it a test:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw4">int</span> main<span class="br0">&#40;</span> <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; ;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">return</span> <span class="nu0">0</span>;</div>
</li>
<li class="li2">
<div class="de2"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<blockquote><p>% icc test.c</p></blockquote>
<p>Should work now! If your project uses a Configure.ac lets make a quick change:</p>
<blockquote><p>Change your AC_PROG_CC to:<br />
AC_PROG_CC([icc gcc cc cl])</p></blockquote>
<p>This is the order in which the configure should search for each compiler. Since you need GCC installed to use Intel C++ you need to put ICC at the top of the list! Hope this helps someone!</p>
]]></content:encoded>
			<wfw:commentRss>http://redbrain.co.uk/index.php/quick-tips/intel-c-complilers-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python, GCC and Crules :-)</title>
		<link>http://redbrain.co.uk/index.php/about-me/python-gcc-and-crules/</link>
		<comments>http://redbrain.co.uk/index.php/about-me/python-gcc-and-crules/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 17:28:33 +0000</pubDate>
		<dc:creator>redbrain</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[Crules]]></category>
		<category><![CDATA[Update!]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://redbrain.co.uk/?p=446</guid>
		<description><![CDATA[<p style="text-align: left;">Hey guys, I&#8217;ve been pretty quiet this summer i guess so as it may seem, but I&#8217;ve been working frigging hard. I&#8217;m starting to get things coming together! So what am i doing? I&#8217;ve been doing a little freelance server work, I&#8217;ve been working on CRULES which is coming along nicely a lot [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">Hey guys, I&#8217;ve been pretty quiet this summer i guess so as it may seem, but I&#8217;ve been working frigging hard. I&#8217;m starting to get things coming together! So what am i doing? I&#8217;ve been doing a little freelance server work, I&#8217;ve been working on CRULES which is coming along nicely a lot of the back-end is working pretty nice now and i just need to keep working at it, but i am also trying to start a new front-end into GCC. So what does that mean, so in <a href="http://gcc.gnu.org/">GCC </a>the gnu compiler collection its a collection of compilers i am writing a small paper on the architecture of GCC and how to build a new front-end but more on that later, but what i mean is each language in GCC be it ADA, Fortran, C, C++, Java they are all front-ends to GCC, that is the part which does the semantic analysis and parsing of the pain text source code into the GIMPLE tree for middle end optimization from there code-generation.</p>
<p style="text-align: left;">So i am making a Python compiler(front-end), well starting too its going quite slow because i am in the middle of finishing up some <a href="http://www.gnu.org/software/automake/">automake</a> work, and crules definitions. And GCC is quite complex in its development but its quite amazing and the most amazing project i have ever seen. I mean its development consists of many little files in different languages that aren&#8217;t even front-ends in GCC. For example a .md machine description is written in LISP that describes the architecture of an OS or Processor this makes it easier to port GCC to new systems, <a href="http://gcc.gnu.org/wiki/GIMPLE">GIMPLE the IR</a> was a language called SIMPLE but its GNU/Simple = GIMPLE, this gives the IR a better formalization, lang.opt files for command line options so you dont have to do any command line parsing in your front-end thats up to the gcc driver program( I&#8217;ll explain this some other time), Make-lang.in GNU/Make on how your code should be compiled, config-lang.in its in bash but does all the configuration on how the front-end is build with respect to Stage-x as in the boot-strap if it requires libraries to be built like JAVA needs libjava or if its an optional language.</p>
<div class="wp-caption alignright" style="width: 310px"><a href="http://ihasahotdog.files.wordpress.com/2009/08/funny-dog-pictures-uses-force.jpg?w=500&amp;h=332"><img title="o_O" src="http://ihasahotdog.files.wordpress.com/2009/08/funny-dog-pictures-uses-force.jpg?w=500&amp;h=332" alt="The force!" width="300" height="199" /></a><p class="wp-caption-text">The force!</p></div>
<p style="text-align: left;">Thats a lot of stuff people probably don&#8217;t care about! <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  But its interesting what other project uses a cool a setup as that! I mean <a href="http://en.wikipedia.org/wiki/Lisp_(programming_language)">LISP</a>, there isn&#8217;t even a lisp compiler in there but there its a bit of a one in the backend. There are some exciting things coming from GCC at the moment, <a href="http://gcc.gnu.org/wiki/LinkTimeOptimization">LTO </a>or <a href="http://gcc.gnu.org/wiki/Graphite">graphite</a> springs to mind, they aren&#8217;t ready yet, but LTO mean Link time optimization, so when you compile your program with gcc in whatever language, you compile each file to object code individually but you use gcc to link each object code and library together instead of using LD explicitly because it works nicer, so on Link time optimization when your linking all the code together another pass of the optimizations goes over a huge IR of all the object code to re-structure of remove dead code etc all the usual optimizations. And with OPEN/MP becoming pretty popular graphite you can pass flags like -fparallelize-all to extract loops even dependence loops to push in open/mp pragmas to make fully parallelized code without having to lift a finger. I&#8217;m working quite slowly to write 3 papers in total, a long thesis on Crules you can check it in my git-repos over at <a href="http://code.redbrain.co.uk">http://code.redbrain.co.uk</a> and i am working on a thesis on the python-front-end as-well as a little paper on the gcc architecture. There is a tagged branch for a front-end-skeleton here on my git-repos: <a href="http://code.redbrain.co.uk/cgit.cgi/gcc-python/">http://code.redbrain.co.uk/cgit.cgi/gcc-python/</a></p>
<p style="text-align: left;">So there is a lot of work there. And i chose to do a python front-end due to the fact everyone can say python is an awesome language no-one can deny that, it has been very well designed; language design is something a lot of people can over-look or take too far and python was a good mix in my opinion. What i mean is if you spend too long on language design your language will become very messy and hard for users to become comfortable with, something that has happened Haskell in my opinion although the way non-determinism is very clever in how Haskell has implemented it. On the other hand if you don&#8217;t spend enough time designing your language its going to be very messy and not much re-use of syntax. One thing to remember in design there is always a reason for the smallest of things be it the reason of using an identifier to using a &#8216;.&#8217; for access or &#8216;- &gt;;&#8217; for pointer access, keywords have to make sense etc.</p>
<p style="text-align: left;">I was invited to join the graphite project i posted a quick patch to fix a part of their build-system, but i am not sure what i can really contribute because i would need to work full-time on it because its been going for some time now. Some of the work is pretty exciting. I am going to see later if i can maby merge the actual python parser from python into my GCC front-end because this would make a very nice setup to mirror the language features of python to an extend but there will be differences an GNU&#8217;isms because the mere fact that this will be compiled handling things like IO will rely on linking against libraries and the python pre-processor functions like import and from etc will be fiddly to work but i should be  able to take alot of work from the gnuJava front-end as there are similarities in how certain things work.</p>
<p style="text-align: left;">
<div class="wp-caption alignleft" style="width: 310px"><a href="http://icanhascheezburger.files.wordpress.com/2009/08/funny-pictures-kitten-wonders-where-gravity-went.jpg"><img title="Distracting" src="http://icanhascheezburger.files.wordpress.com/2009/08/funny-pictures-kitten-wonders-where-gravity-went.jpg" alt="Something to Distract you! :)" width="300" height="200" /></a><p class="wp-caption-text">Something to Distract you! <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></div>
<p style="text-align: left;">
<p style="text-align: left;">Anyways from my goggling i haven&#8217;t been able to find an implementation of python that is compiled properly i mean natively compiled, some people mix the up the fact that python does create byte-code like java think its compiled code and it really isn&#8217;t. I remember at university a lecturer told us that compiling JAVA code you were creating Machine code to run natively on a computer. And he got the pipeline so wrong in creating a binary. They always made it seem that a compiler was a piece of magic that made a binary and java is NOT a compiled language unless you use GCJ. I personally find <a href="http://en.wikipedia.org/wiki/Linker">linkers</a> are a piece of magic these days a lot of the know-how in how linkers are build is quite complicated in some ways. Although what you are essentially doing is taking the object code output from an assembler and creating an <a href="http://en.wikipedia.org/wiki/Executable_and_Linkable_Format">ELF</a> format file with the object code in the correct segments and data in the top segment etc. And on windows its a <a href="http://en.wikipedia.org/wiki/COFF">COFF</a> format i think, but even at that what are you doing and what does object code look-like is it literally the binary format of instructions in order from the corresponding assembly code?!</p>
<p style="text-align: left;">I would love to understand more on how that all works, but i mean an object code file is a not a plain text binary file so yeah i even posted to comp.compilers a thread on manging the jit you can look for it in the archives but its something that is still quite hidden, and only a few people who implemented it understand, i see how it all partly works because of the libjit project. like the defintions of an a.out and ELF were quite understandable i guess. But with a<a href="http://en.wikipedia.org/wiki/Just-in-time_compilation"> jit</a> if your able to for example jit a function like:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw4">int</span> multiply<span class="br0">&#40;</span> <span class="kw4">int</span> x, <span class="kw4">int</span> y <span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; <span class="kw1">return</span> x*y;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p style="text-align: left;">If you are able to make target assembly code for this, and you assemble it and link it properly you have a binary how do you actually execute it in a useful way for an interpreter?! I mean do you keep adding new functions into this image and use dlopen functions and treat the symbols like a dynamic library and execute them that way through <a href="http://en.wikipedia.org/wiki/Dynamic_loading">dlopen</a>? I mean this is what the <a href="http://llvm.org/">LLVM</a> project hides from the users very well but anyways enough of that. <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: left;">Anyways thats what I&#8217;ve been doing for a summer what have you been up to?! <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You can follow some of my stuff on several mailing lists like bison,<a href="http://www.gnu.org/software/autoconf/">autoconf</a>, automake, gcc-help, gcc,comp.compilers. I helped a guy a while back on his bison parser, bison is a very useful tool, but for doing more free-form grammars is a pain I&#8217;ve found and i like to think i know <a href="http://en.wikipedia.org/wiki/Yacc">YACC</a> pretty well now from using it for about a year.</p>
<p style="text-align: left;">By the way I&#8217;ll be posting a <a href="http://wiki.redbrain.co.uk">wiki</a> links on crules soon for example on how the language works etc and why but i would really like it if people read my thesis when its finished because i designed this language from a very specific set of reasons in the beginning for a specific application, but its become a fully multi-paradigm language in its design now, and this is what my thesis on it describes.</p>
<p style="text-align: left;">Anyways i&#8217;m going back to get some work done and i have <a href="http://www.belfastlinux.org/wiki/Main_Page">BLUG</a> tomorrow! <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Oh hey i found a new favourite band bought their album as soon as i heard this, its a polish metal band they are probably the a new <a href="http://www.nightwish.com/">Nightwish</a> i guess! They are very good!</p>
<p style="text-align: left;"><!-- Smart Youtube --><span class="youtube"><object width="425" height="373"><param name="movie" value="http://www.youtube.com/v/LapknbGS7Os&amp;rel=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" /><param name="allowFullScreen" value="true" /><embed wmode="transparent" src="http://www.youtube.com/v/LapknbGS7Os&amp;rel=1&amp;color1=3a3a3a&amp;color2=999999&amp;border=1&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="373" ></embed><param name="wmode" value="transparent" /></object></span></p>
<p style="text-align: left;">I think thats enough for now i have some photos to upload but i&#8217;ll do that next time <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://redbrain.co.uk/index.php/about-me/python-gcc-and-crules/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Autoconf for dummies :)</title>
		<link>http://redbrain.co.uk/index.php/quick-tips/autoconf-for-dummies/</link>
		<comments>http://redbrain.co.uk/index.php/quick-tips/autoconf-for-dummies/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 17:24:11 +0000</pubDate>
		<dc:creator>redbrain</dc:creator>
				<category><![CDATA[Quick Tips]]></category>
		<category><![CDATA[autoconf]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://redbrain.co.uk/?p=188</guid>
		<description><![CDATA[<p>I have been making a projects up wth autoconf  recently and i intend to clean up all my projects here if its java to be with ant build file! And then on with c projects with autoconf etc..</p>
<p>Anyways yeah read it because it makes it so easy this tutorial!  </p>
<p>Whoops forgot to link: http://www.galassi.org/mark//mydocs/autoconf_tutorial_toc.html</p>
<p>ciao [...]]]></description>
			<content:encoded><![CDATA[<p>I have been making a projects up wth autoconf  recently and i intend to clean up all my projects here if its java to be with ant build file! And then on with c projects with autoconf etc..</p>
<p>Anyways yeah read it because it makes it so easy this tutorial! <img src='http://redbrain.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Whoops forgot to link: <a href="http://www.galassi.org/mark//mydocs/autoconf_tutorial_toc.html" target="_blank">http://www.galassi.org/mark//mydocs/autoconf_tutorial_toc.html</a></p>
<p>ciao for now!</p>
]]></content:encoded>
			<wfw:commentRss>http://redbrain.co.uk/index.php/quick-tips/autoconf-for-dummies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

