This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
compilingwithclang [2013/06/03 16:28]
sanel Replacing moinmoin warning icon with dokuwiki
compilingwithclang [2013/06/07 06:21]
kraileth Style changes & some language related changes
Line 3: Line 3:
 ===== Introduction ===== ===== Introduction =====
-In this short tutorial ​are described ​details ​about compiling edelib and +This short tutorial ​describes the details ​of compiling ​''​edelib'' ​and ''​EDE'' ​with the [[http://​clang.llvm.org/​|Clang]] compiler. It is assumed you 
-EDE with [[http://​clang.llvm.org/​|Clang]] compiler. It is assumed you +already have installed ​Clang version with the needed libraries.
-already have installed Clang version with needed libraries.+
-:!: This tutorial ​is assuming ​you have read InstallationHowTo and +:!: **Note:​** ​This tutorial ​also assumes ​you have read InstallationHowTo and have prepared ​the needed libraries and tools.
-have prepared needed libraries and tools.+
 ===== Compiling FLTK ===== ===== Compiling FLTK =====
-First we are going to compile FLTK. Clang can use libraries compiled +First we are going to compile ​''​FLTK''​''​Clang'' ​can use libraries compiled with ''​GCC''​, so if you can install ​the latest stable version ​of ''​FLTK'' ​with your distribution'​s ​package management system, feel free to do so.
-with gcc, so if you can install latest stable ​FLTK version ​as package +
-with your distribution package management system, feel free to do so.+
-However, if you would like to compile FLTK with Clang, first download +However, if you prefer ​to compile ​''​FLTK'' ​with ''​Clang''​ as well, first download ​''​FLTK'''​s ​source code, unpack it and run the following commands in terminal:
-FLTK source code, unpack it and run the following commands in terminal:+
 <​code>​ <​code>​
Line 26: Line 21:
 </​code>​ </​code>​
-or if you would like FLTK location ​on different place (default is +or in case you would like ''​FLTK''​ to be installed ​on different place (default is 
-''​/usr/local''​, use ''​prefix''​) parameter, like:+///usr/local//, use the //prefix//) parameter, like:
 <​code>​ <​code>​
Line 41: Line 36:
 ===== Compiling edelib ===== ===== Compiling edelib =====
-edelib ​should ​be compiled ​without ​much of problems and compilation +''​Edelib'' ​should ​compile ​without problems and compilation 
-commands are pretty much the same as for compiling FLTK (except you are +commands are pretty much the same as for compiling ​''​FLTK'' ​(except you are 
-using ''​jam'' ​as build tool). ​Here are they in the order:+using //​JAM// ​as build tool). ​The commands ​in the right order are:
 <​code>​ <​code>​
Line 52: Line 47:
 </​code>​ </​code>​
-You can use ''​prefix'' ​parameter ​for desired location. As superuser,+You can use the //prefix// parameter ​to set the desired location. As superuser,
 running: running:
Line 59: Line 54:
 </​code>​ </​code>​
-will install edelib ​on desired location.+will install ​''​edelib''​ to the desired location.
 ===== Compiling EDE ===== ===== Compiling EDE =====
-edelib ​compilation commands ​applies ​here too. However, if you are +''​Edelib'' ​compilation commands ​apply here too. However, if you get strange errors like:
-starting to get strange errors like:+
 <​code>​ <​code>​
Line 80: Line 74:
 </​code>​ </​code>​
-you are probably running ​latest gcc version with little bit older Clang +you are probably running ​a recent ''​GCC'' ​version with a ''​Clang'' ​version ​a bit older. If your distribution does not provide ​an updated ​''​Clang'' ​package,
-version. If your distribution does not provide updated Clang package,+
 you can apply a small hack. you can apply a small hack.
-:!: '''​Please note how this hack can change how gcc works, so after you +:!: **Please note that this hack can change how gcc works, so after you change the given file, recompile ​''​EDE'' ​and revert those changes!**
-change the given file, recompile EDE and revert those changes.'''​+
-As superuser, open the file +As superuser, open the file ///​usr/​include/​c++/​VERSION/​PLATFORM-DISTRO/​bits/​c++config.h//, where //VERSION// is the ''​GCC''​ version (like 4.7.2) and //PLATFORM-DISTRO// is distribution specific folder, like //i686-redhat-linux//Find the line:
-''​/​usr/​include/​c++/​VERSION/​PLATFORM-DISTRO/​bits/​c++config.h''​, where +
-''​VERSION'' ​is gcc version (like 4.7.2) and ''​PLATFORM-DISTRO'' ​is +
-distribution specific folder, like ''​i686-redhat-linux''​Locate ​the +
 <code cpp> <code cpp>
Line 103: Line 91:
 </​code>​ </​code>​
-which will disable ​gcc builtin atomic access functions. Recompile EDE +which will disable ​''​GCC'' ​builtin atomic access functions. Recompile ​''​EDE'' ​and install it, uncommenting above line afterwards.
-and install it, uncommenting above line.+