http://apcocoa.uni-passau.de/wiki/api.php?action=feedcontributions&user=Philipp+jovanovic&feedformat=atomApCoCoAWiki - User contributions [en]2024-03-29T05:34:25ZUser contributionsMediaWiki 1.35.0http://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_sat&diff=10161Category:ApCoCoA-1:Package sat2009-10-12T12:54:31Z<p>Philipp jovanovic: </p>
<hr />
<div>The basic idea behind this package is to make SAT-Solver, like (Crypto-)MiniSat, usable in/with ApCoCoA.<br />
<br />
This package allows to solve polynomial systems over GF(2) by first converting the system to CNF-SAT in DIMACS format and then using a SAT-Solver to solve the resulting conjunctive normal form.<br />
<br />
{{ApCoCoAServer}}<br />
<br />
<em>Important</em>: The MiniSat executable must be in the ApCoCoA directory/sat/bin and you must have the permissions to read and write in this directory.<br />
<br />
For further informations see the following links:<br />
<br />
MiniSat [http://www.minisat.se], <br />
CryptoMiniSat [http://planete.inrialpes.fr/~soos/CryptoMiniSat/index.html], <br />
DIMACS [http://dimacs.rutgers.edu/]<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.LaunchCryptoMiniSat&diff=10160ApCoCoA-1:SAT.LaunchCryptoMiniSat2009-10-12T12:40:04Z<p>Philipp jovanovic: </p>
<hr />
<div><command><br />
<title>SAT.LaunchCryptoMiniSat</title><br />
<short_description>{{ApCoCoAServer}}<br />
<br />
Launches CryptoMiniSat via the ApCoCoAServer on a given input file. The result is written to the file "output".<br />
</short_description><br />
<syntax><br />
SAT.LaunchCryptoMiniSat(File:STRING)<br />
</syntax><br />
<description><br />
<itemize><br />
<item>@param <em>File</em>: The input file</item><br />
</itemize><br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.LaunchCryptoMiniSat</key><br />
<key>sat.LaunchCryptoMiniSat</key><br />
<key>LaunchCryptoMiniSat</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.FixBits&diff=10159ApCoCoA-1:SAT.FixBits2009-10-12T12:38:46Z<p>Philipp jovanovic: </p>
<hr />
<div><command><br />
<title>SAT.FixBits</title><br />
<short_description>Allows to fix chosen bits in advance within a SAT input file. The new input file is "sat_fixed.cnf".<br />
</short_description><br />
<syntax><br />
SAT.FixBits(BitList:LIST, File:STRING)<br />
</syntax><br />
<description><br />
<itemize><br />
<item>@param <em>BitList</em>: The indeterminates that should get fixed<br />
<br />
Format: [[IndetIndex_1,Value_1],[IndetIndex_2,Value_2],...]<br />
</item> <br />
<item>@param <em>File</em>: File in the SAT directory of the apcocoa folder</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.FixBits([[1,0],[2,1]],"sat.cnf"); -- fixes x[1]=0 and x[2]=1<br />
SAT.LaunchMiniSat("sat_fixed.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.FixBits</key><br />
<key>sat.FixBits</key><br />
<key>FixBits</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.ConvertToXOR&diff=10158ApCoCoA-1:SAT.ConvertToXOR2009-10-12T12:37:51Z<p>Philipp jovanovic: </p>
<hr />
<div><command><br />
<title>SAT.ConvertToXOR</title><br />
<short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to XOR-CNF. Writes the XOR-CNF to the file "sat_xor.cnf".<br />
<br />
<em>Note:</em> XOR-CNF files are only applicable with CryptoMiniSat!<br />
</short_description><br />
<syntax><br />
SAT.ConvertToXOR(SPE:LIST, QStrategy:INT)<br />
</syntax><br />
<description><br />
This function starts an alternative conversion algorithm.<br />
<br />
<itemize><br />
<item>@param <em>SPE</em>: A List containing the polynomial equations of the system.</item> <br />
<item>@param <em>QStrategy</em>: Strategy for quadratic substitution. 0 - Standard; 1 - Linear Partner; 2 - Adv. Lin. Partner;</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToXOR(SPE,0);<br />
SAT.LaunchCryptoMiniSat("sat_xor.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
<br />
<example><br />
-- cubic system:<br />
Use ZZ/(2)[x[1..3]];<br />
F1:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1;<br />
F2:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2];<br />
F3:=x[1]x[2] + x[2]x[3] + x[2];<br />
SPE:=[F1,F2,F3];<br />
SAT.ConvertToXOR(SPE,0);<br />
SAT.LaunchCryptoMiniSat("sat_xor.cnf");<br />
SAT.GetResult();<br />
--Result: [0,0,1] Test with: Eval(SPE,[0,0,1]);<br />
</example><br />
<br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.ConvertToXOR</key><br />
<key>sat.ConvertToXOR</key><br />
<key>ConvertToXOR</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.ConvertToCNF&diff=10157ApCoCoA-1:SAT.ConvertToCNF2009-10-12T12:37:14Z<p>Philipp jovanovic: </p>
<hr />
<div><command><br />
<title>SAT.ConvertToCNF</title><br />
<short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to CNF. Writes the CNF to the file "sat.cnf"</short_description><br />
<syntax><br />
SAT.ConvertToCNF(SPE:LIST, CuttingNumber:INT, QStrategy:INT)<br />
</syntax><br />
<description><br />
This function starts the conversion algorithm.<br />
<br />
<itemize><br />
<item>@param <em>SPE</em>: A List containing the polynomial equations of the system.</item> <br />
<item>@param <em>CuttingNumber</em>: Max. support-length of the linear polynomials when their corresponding CNF is written to the file. Could be 3 - 6. </item><br />
<item>@param <em>QStrategy</em>: Strategy for quadratic substitution. 0 - Standard; 1 - Linear Partner; 2 - Adv. Lin. Partner;</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.LaunchMiniSat("sat.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
<br />
<example><br />
-- cubic system:<br />
Use ZZ/(2)[x[1..3]];<br />
F1:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1;<br />
F2:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2];<br />
F3:=x[1]x[2] + x[2]x[3] + x[2];<br />
SPE:=[F1,F2,F3];<br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.LaunchMiniSat("sat.cnf");<br />
SAT.GetResult();<br />
--Result: [0,0,1] Test with: Eval(SPE,[0,0,1]);<br />
</example><br />
<br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.ConvertToCNF</key><br />
<key>sat.ConvertToCNF</key><br />
<key>ConvertToCNF</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.GetResult&diff=10156ApCoCoA-1:SAT.GetResult2009-10-12T12:36:26Z<p>Philipp jovanovic: New page: <command> <title>SAT.GetResult</title> <short_description>Looks up the configuration of the indeterminates in the file "output" produced by a SAT-Solver.</short_description> <synta...</p>
<hr />
<div><command><br />
<title>SAT.GetResult</title><br />
<short_description>Looks up the configuration of the indeterminates in the file "output" produced by a SAT-Solver.</short_description><br />
<syntax><br />
SAT.GetResult():LIST<br />
</syntax><br />
<description><br />
<itemize><br />
<item>@return: List with the configuration of the indeterminates, that solves the polynomial system.</item><br />
</itemize><br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.GetResult</key><br />
<key>sat.GetResult</key><br />
<key>GetResult</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.LaunchCryptoMiniSat&diff=10155ApCoCoA-1:SAT.LaunchCryptoMiniSat2009-10-12T12:32:38Z<p>Philipp jovanovic: New page: <command> <title>SAT.LaunchCryptoMiniSat</title> <short_description>{{ApCoCoAServer}} Launches CryptoMiniSat via the ApCoCoAServer on a given input file. The result is written to ...</p>
<hr />
<div><command><br />
<title>SAT.LaunchCryptoMiniSat</title><br />
<short_description>{{ApCoCoAServer}}<br />
<br />
Launches CryptoMiniSat via the ApCoCoAServer on a given input file. The result is written to the file output.<br />
</short_description><br />
<syntax><br />
SAT.LaunchCryptoMiniSat(File:STRING)<br />
</syntax><br />
<description><br />
<itemize><br />
<item>@param <em>File</em>: The input file</item><br />
</itemize><br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.LaunchCryptoMiniSat</key><br />
<key>sat.LaunchCryptoMiniSat</key><br />
<key>LaunchCryptoMiniSat</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.LaunchMiniSat&diff=10154ApCoCoA-1:SAT.LaunchMiniSat2009-10-12T12:31:05Z<p>Philipp jovanovic: New page: <command> <title>SAT.LaunchMiniSat</title> <short_description>{{ApCoCoAServer}} Launches MiniSat via the ApCoCoAServer on a given input file. The result is written to the file out...</p>
<hr />
<div><command><br />
<title>SAT.LaunchMiniSat</title><br />
<short_description>{{ApCoCoAServer}}<br />
<br />
Launches MiniSat via the ApCoCoAServer on a given input file. The result is written to the file output.<br />
</short_description><br />
<syntax><br />
SAT.LaunchMiniSat(File:STRING)<br />
</syntax><br />
<description><br />
<itemize><br />
<item>@param <em>File</em>: The input file</item><br />
</itemize><br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.LaunchMiniSat</key><br />
<key>sat.LaunchMiniSat</key><br />
<key>LaunchMiniSat</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.FixBits&diff=10153ApCoCoA-1:SAT.FixBits2009-10-12T12:20:01Z<p>Philipp jovanovic: New page: <command> <title>SAT.FixBits</title> <short_description>Allows to fix chosen bits in advance within a SAT input file. The new input file is sat_fixed.cnf. </short_description> <syn...</p>
<hr />
<div><command><br />
<title>SAT.FixBits</title><br />
<short_description>Allows to fix chosen bits in advance within a SAT input file. The new input file is sat_fixed.cnf.<br />
</short_description><br />
<syntax><br />
SAT.FixBits(BitList:LIST, File:STRING)<br />
</syntax><br />
<description><br />
<itemize><br />
<item>@param <em>BitList</em>: The indeterminates that should get fixed<br />
<br />
Format: [[IndetIndex_1,Value_1],[IndetIndex_2,Value_2],...]<br />
</item> <br />
<item>@param <em>File</em>: File in the SAT directory of the apcocoa folder</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.FixBits([[1,0],[2,1]],"sat.cnf"); -- fixes x[1]=0 and x[2]=1<br />
SAT.LaunchMiniSat("sat_fixed.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.FixBits</key><br />
<key>sat.FixBits</key><br />
<key>FixBits</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.ConvertToXOR&diff=10152ApCoCoA-1:SAT.ConvertToXOR2009-10-12T12:14:26Z<p>Philipp jovanovic: </p>
<hr />
<div><command><br />
<title>SAT.ConvertToXOR</title><br />
<short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to XOR-CNF. Writes the XOR-CNF to the file sat_xor.cnf.<br />
<br />
<em>Note:</em> XOR-CNF files are only applicable with CryptoMiniSat!<br />
</short_description><br />
<syntax><br />
SAT.ConvertToXOR(SPE:LIST, QStrategy:INT)<br />
</syntax><br />
<description><br />
This function starts an alternative conversion algorithm.<br />
<br />
<itemize><br />
<item>@param <em>SPE</em>: A List containing the polynomial equations of the system.</item> <br />
<item>@param <em>QStrategy</em>: Strategy for quadratic substitution. 0 - Standard; 1 - Linear Partner; 2 - Adv. Lin. Partner;</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToXOR(SPE,0);<br />
SAT.LaunchCryptoMiniSat("sat_xor.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
<br />
<example><br />
-- cubic system:<br />
Use ZZ/(2)[x[1..3]];<br />
F1:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1;<br />
F2:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2];<br />
F3:=x[1]x[2] + x[2]x[3] + x[2];<br />
SPE:=[F1,F2,F3];<br />
SAT.ConvertToXOR(SPE,0);<br />
SAT.LaunchCryptoMiniSat("sat_xor.cnf");<br />
SAT.GetResult();<br />
--Result: [0,0,1] Test with: Eval(SPE,[0,0,1]);<br />
</example><br />
<br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.ConvertToXOR</key><br />
<key>sat.ConvertToXOR</key><br />
<key>ConvertToXOR</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_sat&diff=10151Category:ApCoCoA-1:Package sat2009-10-12T12:10:49Z<p>Philipp jovanovic: </p>
<hr />
<div>The basic idea behind this package is to make SAT-Solver, like (Crypto-)MiniSat, usable in/with ApCoCoA.<br />
<br />
This package allows to solve polynomial systems over GF(2) by first converting the system to CNF-SAT in DIMACS format and then using a SAT Solver to solve the resulting conjunctive normal form.<br />
<br />
{{ApCoCoAServer}}<br />
<br />
<em>Important</em>: The MiniSat executable must be in the ApCoCoA directory/sat/bin and you must have the permissions to read and write in this directory.<br />
<br />
For further informations see the following links:<br />
<br />
MiniSat [http://www.minisat.se]<br />
<br />
CryptoMiniSat [http://planete.inrialpes.fr/~soos/CryptoMiniSat/index.html]<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_sat&diff=10150Category:ApCoCoA-1:Package sat2009-10-12T12:10:28Z<p>Philipp jovanovic: </p>
<hr />
<div>The basic idea behind this package is to make SAT-Solver, like (Crypto-)MiniSat, usable in/with ApCoCoA.<br />
<br />
This package allows to solve polynomial systems over GF(2) by first converting the system to CNF-SAT in DIMACS format and then using a SAT Solver to solve the resulting conjunctive normal form.<br />
<br />
{{ApCoCoAServer}}<br />
<br />
<em>Important</em>: The MiniSat executable must be in the ApCoCoA directory/sat/bin and you must have the permissions to read and write in this directory.<br />
<br />
For further informations see the following links: <br />
MiniSat [http://www.minisat.se]<br />
<br />
CryptoMiniSat [http://planete.inrialpes.fr/~soos/CryptoMiniSat/index.html]<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.ConvertToCNF&diff=10149ApCoCoA-1:SAT.ConvertToCNF2009-10-12T12:08:39Z<p>Philipp jovanovic: </p>
<hr />
<div><command><br />
<title>SAT.ConvertToCNF</title><br />
<short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to CNF. Writes the CNF to the file sat.cnf</short_description><br />
<syntax><br />
SAT.ConvertToCNF(SPE:LIST, CuttingNumber:INT, QStrategy:INT)<br />
</syntax><br />
<description><br />
This function starts the conversion algorithm.<br />
<br />
<itemize><br />
<item>@param <em>SPE</em>: A List containing the polynomial equations of the system.</item> <br />
<item>@param <em>CuttingNumber</em>: Max. support-length of the linear polynomials when their corresponding CNF is written to the file. Could be 3 - 6. </item><br />
<item>@param <em>QStrategy</em>: Strategy for quadratic substitution. 0 - Standard; 1 - Linear Partner; 2 - Adv. Lin. Partner;</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.LaunchMiniSat("sat.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
<br />
<example><br />
-- cubic system:<br />
Use ZZ/(2)[x[1..3]];<br />
F1:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1;<br />
F2:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2];<br />
F3:=x[1]x[2] + x[2]x[3] + x[2];<br />
SPE:=[F1,F2,F3];<br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.LaunchMiniSat("sat.cnf");<br />
SAT.GetResult();<br />
--Result: [0,0,1] Test with: Eval(SPE,[0,0,1]);<br />
</example><br />
<br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.ConvertToCNF</key><br />
<key>sat.ConvertToCNF</key><br />
<key>ConvertToCNF</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.ConvertToXOR&diff=10148ApCoCoA-1:SAT.ConvertToXOR2009-10-12T12:06:49Z<p>Philipp jovanovic: New page: <command> <title>SAT.ConvertToXOR</title> <short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to XOR-CNF. Writes the XOR-CNF to th...</p>
<hr />
<div><command><br />
<title>SAT.ConvertToXOR</title><br />
<short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to XOR-CNF. Writes the XOR-CNF to the file sat_xor.cnf.<br />
<br />
<em>Note:</em> XOR-CNF files are only applicable with CryptoMiniSat!<br />
</short_description><br />
<syntax><br />
SAT.ConvertToXOR(SPE:LIST, QStrategy:INT)<br />
</syntax><br />
<description><br />
This function starts the conversion algorithm.<br />
<br />
<itemize><br />
<item>@param <em>SPE</em>: A List containing the polynomial equations of the system.</item> <br />
<item>@param <em>QStrategy</em>: Strategy for quadratic substitution. 0 - Standard; 1 - Linear Partner; 2 - Adv. Lin. Partner;</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToXOR(SPE,0);<br />
SAT.LaunchCryptoMiniSat("sat_xor.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
<br />
<example><br />
-- cubic system:<br />
Use ZZ/(2)[x[1..3]];<br />
F1:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1;<br />
F2:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2];<br />
F3:=x[1]x[2] + x[2]x[3] + x[2];<br />
SPE:=[F1,F2,F3];<br />
SAT.ConvertToXOR(SPE,0);<br />
SAT.LaunchCryptoMiniSat("sat_xor.cnf");<br />
SAT.GetResult();<br />
--Result: [0,0,1] Test with: Eval(SPE,[0,0,1]);<br />
</example><br />
<br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.ConvertToXOR</key><br />
<key>sat.ConvertToXOR</key><br />
<key>ConvertToXOR</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:SAT.ConvertToCNF&diff=10147ApCoCoA-1:SAT.ConvertToCNF2009-10-12T12:00:18Z<p>Philipp jovanovic: New page: <command> <title>SAT.ConvertToCNF</title> <short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to CNF.</short_description> <syntax>...</p>
<hr />
<div><command><br />
<title>SAT.ConvertToCNF</title><br />
<short_description>Converts a given quadratic (cubic) system of polynomial equations (SPE) over GF(2) to CNF.</short_description><br />
<syntax><br />
SAT.ConvertToCNF(SPE:LIST, CuttingNumber:INT, QStrategy:INT)<br />
</syntax><br />
<description><br />
This function starts the conversion algorithm.<br />
<br />
<itemize><br />
<item>@param <em>SPE</em>: A List containing the polynomial equations of the system.</item> <br />
<item>@param <em>CuttingNumber</em>: Max. support-length of the linear polynomials when their corresponding CNF is written to the file. Could be 3 - 6. </item><br />
<item>@param <em>QStrategy</em>: Strategy for quadratic substitution. 0 - Standard; 1 - Linear Partner; 2 - Adv. Lin. Partner;</item><br />
</itemize><br />
<br />
<example><br />
-- quadratic system:<br />
Use R::=ZZ/(2)[x[1..3]];<br />
F1:= x[1]x[2] + x[1]x[3] + x[2]x[3] + x[3];<br />
F2:= x[2] + 1;<br />
F3:= x[1]x[2] + x[3];<br />
SPE:=[F1,F2,F3]; <br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.LaunchMiniSat("sat.cnf");<br />
SAT.GetResult();<br />
--Result: [0,1,0] Test with: Eval(SPE,[0,1,0]);<br />
</example><br />
<br />
<example><br />
-- cubic system:<br />
Use ZZ/(2)[x[1..3]];<br />
F1:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[3] +1;<br />
F2:=x[1]x[2]x[3] + x[1]x[2] + x[2]x[3] + x[1] + x[2];<br />
F3:=x[1]x[2] + x[2]x[3] + x[2];<br />
SPE:=[F1,F2,F3];<br />
SAT.ConvertToCNF(SPE,4,0);<br />
SAT.LaunchMiniSat("sat.cnf");<br />
SAT.GetResult();<br />
--Result: [0,0,1] Test with: Eval(SPE,[0,0,1]);<br />
</example><br />
<br />
</description><br />
<br />
<types><br />
<type>polynomial</type><br />
<type>poly_system</type><br />
</types><br />
<br />
<key>SAT.ConvertToCNF</key><br />
<key>sat.ConvertToCNF</key><br />
<key>ConvertToCNF</key><br />
<wiki-category>Package_sat</wiki-category><br />
</command></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=Category:ApCoCoA-1:Package_sat&diff=10146Category:ApCoCoA-1:Package sat2009-10-12T11:46:40Z<p>Philipp jovanovic: New page: The basic idea behind this package is to make SAT-Solver, like (Crypto-)MiniSat, usable in/with ApCoCoA. This package allows to solve polynomial systems over GF(2) by first converting the...</p>
<hr />
<div>The basic idea behind this package is to make SAT-Solver, like (Crypto-)MiniSat, usable in/with ApCoCoA.<br />
<br />
This package allows to solve polynomial systems over GF(2) by first converting the system to CNF-SAT in DIMACS format and then using a SAT Solver to solve the resulting conjunctive normal form.<br />
<br />
{{ApCoCoAServer}}<br />
<br />
<em>Important</em>: The MiniSat executable must be in the ApCoCoA directory/sat/bin and you must have the permissions to read and write in this directory.<br />
<br />
For further informations about MiniSat visit [http://www.minisat.se]<br />
<br />
For further informations about CryptoMiniSat visit [http://planete.inrialpes.fr/~soos/CryptoMiniSat/index.html]<br />
<br />
[[Category:ApCoCoA_Manual]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10052ApCoCoALib:CompilationInstructions2009-08-07T07:42:07Z<p>Philipp jovanovic: /* LinBox */</p>
<hr />
<div>This page describes how to compile the most recent version of ApCoCoALib which you can check out from our [[ApCoCoA:SourceCodeManagement|subversion repository]]. To compile the versions which you can find under [[ApCoCoA:Downloads|Downloads]] please follow also these instructions but with respect to the respective build specifications.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4], [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
<br />
==New: Building ApCoCoA with CMake==<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
$> svn co svn://apcocoa.org/ ApCoCoA<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Go to the ApCoCoA directory and do the following (note again that CMake 2.6 is required).<br />
Making the directory <code>build</code> may seem strange at first, however, it has the advantage that all generated code resides only within this directory and the original <code>src</code>-directory is not polluted.<br />
<br />
$> cd ApCoCoA<br />
$> mkdir build<br />
$> cd build<br />
$> ccmake ..<br />
<br />
<code>ccmake</code> starts an curses dialog that allows you to configure the necessary project settings. See also the [[cmake documentation]]<br />
<br />
<br />
# Type <code>c</code>. Starting <code>ccmake</code> the first time, this will probably raise some errors which is ok when your libraries are not in standard locations.<br />
# Edit the respective lines (type <code>Enter</code> to edit). In particular, you should provide the paths to Boost and the CoCoA directory (see below). In case you must also supply compiler flags such as <code>-m64</code>, type t to toggle between the initial "sparse" item selection and the full variable selection.<br />
# Type <code>c</code>. If errors occur, go to step 2. If no errors occur, type <code>e</code>.<br />
# Type <code>g</code>.<br />
<br />
Finally,<br />
<br />
$> make<br />
<br />
The tests will have to be started explicitly (the option <code>ENABLE_TESTING</code> must be set to <code>ON</code>)<br />
<br />
$> make install<br />
$> make tests <br />
<br />
We conclude with the description of the most common flags to be set with <code>ccmake</code><br />
<br />
* <code>APCOCOA_USE_*</code> Setting one or more of these to <code>ON</code> will (after <code>c</code>) turn on more flags to be set.<br />
* <code>COCOA_ROOT</code> Must be set to the CoCoA directory which contains the folders <code>lib</code> and <code>include</code>.<br />
* <code>BOOST_ROOT</code> must be set to the directory containing the boost <code>lib</code> and <code>include</code> directories.<br />
* <code>Boost_USE_STATIC_LIBS</code> must be set to <code>ON</code>.<br />
* <code>GMP_LIBRARY</code>, <code>GMP_LIBRARY_DIR</code> must be set to the static GMP libraries.<br />
* <code>CMAKE_CXX_FLAGS</code> Add here <code>-m64</code> and the like.<br />
* <code>CMAKE_EXE_LINKER_FLAGS</code> Add here additional linker flags like <code>-pthread</code> or (on Mac) <code>-bind_at_load -framework accelerate</code>.<br />
* <code>ENABLE_TESTING</code> If set to <code>OFF</code> the tests in <code>src/Tests</code> will not be compiled.<br />
<br />
Advanced usage of CMake is collected on the page [[ApCoCoALib:Working_with_CMake|Working with CMake]]<br />
<br />
==Old: Building ApCoCoA== <br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''', '''m4''' and '''libtool''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===ATLAS===<br />
cd atlas-dir<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure -A 6 -V 1 -b 32 --prefix=(install-dir)<br />
make<br />
make check<br />
make install<br />
<br />
===IML===<br />
./configure --prefix=(install-dir) --host=i386-pc-cygwin --with-gmp-include= --with-gmp-lib= --with-atlas-include= --with-atlas-lib=<br />
make<br />
make check<br />
make install<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs. Check if libtool is installed on your system. The configure script makes some entries to libtool that are needed later for the configure script of linbox.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' Apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10016ApCoCoALib:CompilationInstructions2009-08-04T14:59:00Z<p>Philipp jovanovic: /* LinBox */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4], [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''', '''m4''' and '''libtool''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===ATLAS===<br />
cd atlas-dir<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure -A 6 -V 1 -b 32 --prefix=(install-dir)<br />
make<br />
make check<br />
make install<br />
<br />
===IML===<br />
./configure --prefix=(install-dir) --host=i386-pc-cygwin --with-gmp-include= --with-gmp-lib= --with-atlas-include= --with-atlas-lib=<br />
make<br />
make check<br />
make install<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs. Check if libtool is installed on your system. The configure script makes some entries to libtool that are needed later for the configure script of linbox.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' Apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
Sometimes the configure-scripts ignores the locations from the --with flags. If this is the case it sometimes helps to copy the libs / header from the missing libraries to /usr/local/lib and /usr/local/include.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10015ApCoCoALib:CompilationInstructions2009-08-04T14:31:55Z<p>Philipp jovanovic: /* LinBox */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4], [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''', '''m4''' and '''libtool''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===ATLAS===<br />
cd atlas-dir<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure -A 6 -V 1 -b 32 --prefix=(install-dir)<br />
make<br />
make check<br />
make install<br />
<br />
===IML===<br />
./configure --prefix=(install-dir) --host=i386-pc-cygwin --with-gmp-include= --with-gmp-lib= --with-atlas-include= --with-atlas-lib=<br />
make<br />
make check<br />
make install<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs. Check if libtool is installed on your system. The configure script makes some entries to libtool that are needed later for the configure script of linbox.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' Apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10012ApCoCoALib:CompilationInstructions2009-08-04T13:28:43Z<p>Philipp jovanovic: /* Windows */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4], [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''', '''m4''' and '''libtool''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===ATLAS===<br />
cd atlas-dir<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure -A 6 -V 1 -b 32 --prefix=(install-dir)<br />
make<br />
make check<br />
make install<br />
<br />
===IML===<br />
./configure --prefix=(install-dir) --host=i386-pc-cygwin --with-gmp-include= --with-gmp-lib= --with-atlas-include= --with-atlas-lib=<br />
make<br />
make check<br />
make install<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
'''Note:''' Check if libtool is installed. Might lead to problems if it's not found.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs. Check if libtool is installed on your system. The configure script makes some entries to libtool that are needed later for the configure script of linbox.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10011ApCoCoALib:CompilationInstructions2009-08-04T13:22:59Z<p>Philipp jovanovic: /* Requirements */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4], [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS, [http://www.gnu.org/software/libtool/ libtool] || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===ATLAS===<br />
cd atlas-dir<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure -A 6 -V 1 -b 32 --prefix=(install-dir)<br />
make<br />
make check<br />
make install<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs. Check if libtool is installed on your system. The configure script makes some entries to libtool that are needed later for the configure script of linbox.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10008ApCoCoALib:CompilationInstructions2009-08-03T14:35:50Z<p>Philipp jovanovic: /* GMP */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===ATLAS===<br />
cd atlas-dir<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure -A 6 -V 1 -b 32 --prefix=(install-dir)<br />
make<br />
make check<br />
make install<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs. Check if libtool is installed on your system. The configure script makes some entries to libtool that are needed later for the configure script of linbox.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10006ApCoCoALib:CompilationInstructions2009-08-03T12:49:39Z<p>Philipp jovanovic: /* Windows */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===ATLAS===<br />
cd atlas-dir<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure -A 6 -V 1 -b 32 --prefix=(install-dir)<br />
make<br />
make check<br />
make install<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10005ApCoCoALib:CompilationInstructions2009-08-03T12:03:52Z<p>Philipp jovanovic: /* ATLAS */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 32 (or -b 64 for 64 Bit support)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10004ApCoCoALib:CompilationInstructions2009-08-03T11:48:59Z<p>Philipp jovanovic: /* Linux */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 64 (Explicit 64 Bit support. Do not set this flag on 32 Bit machines)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10003ApCoCoALib:CompilationInstructions2009-08-03T11:48:22Z<p>Philipp jovanovic: /* Linux */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 64 (Explicit 64 Bit support. Do not set this flag on 32 Bit machines)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Distribution package. Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
<br />
===Givaro===<br />
Distribution package. Build from source.<br />
./configure --prefix=(install-dir) --with-gmp=(gmp-dir)<br />
make<br />
make check<br />
make install<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10002ApCoCoALib:CompilationInstructions2009-08-03T11:15:42Z<p>Philipp jovanovic: /* CoCoALib */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure --with-libgmp=(path-to-libgmp.a)<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 64 (Explicit 64 Bit support. Do not set this flag on 32 Bit machines)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10001ApCoCoALib:CompilationInstructions2009-08-03T11:03:16Z<p>Philipp jovanovic: /* GMP */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx --host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 64 (Explicit 64 Bit support. Do not set this flag on 32 Bit machines)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=10000ApCoCoALib:CompilationInstructions2009-08-03T11:02:35Z<p>Philipp jovanovic: /* GMP */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
'''Note:''' Check if the programs '''bison''', '''flex''' and '''m4''' are installed in cygwin.<br />
<br />
./configure --enable-cxx ----host=i386-pc-cygwin --prefix=(install-dir)<br />
make<br />
make check (important!!!)<br />
make install<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 64 (Explicit 64 Bit support. Do not set this flag on 32 Bit machines)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=9999ApCoCoALib:CompilationInstructions2009-08-03T08:59:16Z<p>Philipp jovanovic: /* Requirements */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || 3.2.1 || - || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
./configure<br />
make<br />
<br />
===GMP===<br />
Distribution package, build from source.<br />
<br />
./configure --enable-cxx --prefix=(install-dir)<br />
make<br />
make check '''(important!!!)'''<br />
make install<br />
<br />
'''Note:''' --enable-cxx gives you C++ support. This is important for some of the optional libs.<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure --prefix=(install-dir) -b 64 (Explicit 64 Bit support. Do not set this flag on 32 Bit machines)<br />
make<br />
make check<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
Build from source.<br />
<br />
./configure --prefix=(install-dir) --with-blas=(atlas-dir) --with-givaro=... --with-gmp=...<br />
make<br />
make check<br />
make install<br />
<br />
'''Note:''' For 64-Bit apply the [http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983 Patch] from the Forum, see 2nd Post. This fixes the multiple definiton errors.<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=9976ApCoCoALib:CompilationInstructions2009-07-28T13:36:49Z<p>Philipp jovanovic: /* Requirements */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || ? || ? || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || 3.8.3 || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure<br />
make<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
build from source<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=9975ApCoCoALib:CompilationInstructions2009-07-28T13:09:46Z<p>Philipp jovanovic: /* Requirements */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || ? || ? || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 (unstable) || 3.8.3 (stable) || ? || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure<br />
make<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
build from source<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=9974ApCoCoALib:CompilationInstructions2009-07-28T13:06:30Z<p>Philipp jovanovic: /* Requirements */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || ? || ? || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 || 3.8.3 || ? || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure<br />
make<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
build from source<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=9973ApCoCoALib:CompilationInstructions2009-07-28T12:39:53Z<p>Philipp jovanovic: /* Requirements */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || [ftp://ftp.gmplib.org/pub/ 4.3.1] || [ftp://ftp.gmplib.org/pub/ 4.2.4] || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || ? || ? || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 || ? || ? || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure<br />
make<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
build from source<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoALib:CompilationInstructions&diff=9972ApCoCoALib:CompilationInstructions2009-07-28T12:33:39Z<p>Philipp jovanovic: /* Requirements */</p>
<hr />
<div>This page describes how to compile the ApCoCoALib as of 0.99.08.<br />
Please note, the former page [[HowTo:Compile_ApCoCoALib_on_Windows]] is outdated, just follow the instructions below.<br />
<br />
=Requirements=<br />
You need at least the following libraries:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html CoCoALib] || 0.99.30 || 0.99.28 || - || GMP || -<br />
|-<br />
| [http://gmplib.org/ GMP] || 4.3.1 || 4.2.4 || 4.1.4 || [http://www.gnu.org/software/m4/ M4] || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || System, Filesystem & Thread needed for ApCoCoA-Server<br />
|-<br />
|}<br />
<br />
<br />
Optional:<br />
<br />
{| class="wikitable" style="background: #E0E0E0; border: 1px solid rgb(153, 153, 153); text-align: center; border=1; cellpadding=0; border-collapse:collapse;"<br />
|- <br />
! width="10%" | Library !! width="15%" | Current !! width="15%" | Recommended !! width ="15%" | Minimum !! width="20%" | Dependencies !! width="25%" | Notes<br />
|- <br />
| [http://www.netlib.org/blas/ BLAS] || ? || ? || ? || none || for ABM & numerical functions<br />
|-<br />
| [http://www.netlib.org/lapack/ Lapack] || 3.2.1 || ? || ? || BLAS || for ABM & numerical functions<br />
|-<br />
| [http://www.linalg.org/ LinBox] || 1.1.6 || 1.1.6 || 1.1.6 || BLAS, Givaro, Lapack, GMP || -<br />
|-<br />
| [http://www.boost.org/ Boost] || 1.39 || 1.39 || 1.35 || none || Thread & Program Options needed for Border Basis Framework<br />
|-<br />
| [http://www.cs.uwaterloo.ca/~z4chen/iml.html IML] || 1.0.2 || 1.0.2 || 1.0.2 || GMP, ATLAS || -<br />
|-<br />
| [http://www-lmc.imag.fr/CASYS/LOGICIELS/givaro/ Givaro] || 3.2 || 3.2 || 3.2 || none || -<br />
|-<br />
| [http://math-atlas.sourceforge.net/ ATLAS] || 3.9.11 || ? || ? || none || -<br />
|-<br />
|}<br />
<br />
=The Config File=<br />
<br />
ApCoCoALib lets you choose which of the optional features you want to compile in a very flexible way. Usually you store all build related configuration parameters in a file called <tt>lib.config</tt> and pass its location to the configure script via the <tt>--with-libconfig=</tt> parameter. The <tt>lib.config</tt> file looks as follows.<br />
<br />
######################<br />
# Mandatory settings #<br />
######################<br />
<br />
# Path to your Boost library include directory, e.g.<br />
#BOOSTFLAGS=-I"/home/skaspar/lib/boost_1_38_0/include/boost-1_38"<br />
BOOSTFLAGS= # Mandatory, cannot be left empty<br />
<br />
# Linker flags of your Boost thread libraries plus linker flags of<br />
# additional libraries needed by Boost, e.g.<br />
#BOOSTLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BOOSTLIBS= # Mandatory, cannot be left empty<br />
<br />
#####################<br />
# Optional features #<br />
#####################<br />
<br />
# Uncomment the following flag if you want to use the<br />
# Border Basis Framework<br />
#BBFFLAGS=-DUSEBBFramework<br />
BBFFLAGS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Linker flags of your Boost program_options and thread<br />
# libraries plus linker flags of additional libraries needed<br />
# by Boost, e.g.<br />
#BBFLIBS="/home/skaspar/lib/boost_1_38_0/lib/libboost_program_options-gcc43-mt.a" \<br />
# "/home/skaspar/lib/boost_1_38_0/lib/libboost_thread-gcc43-mt.a" \<br />
# -lpthread<br />
BBFLIBS= # Can be left empty if you do not want to use<br />
# the Border Basis Framework<br />
<br />
# Uncomment the following flag if you want to use<br />
# IML-driven computations <br />
#IMLFLAGS=-DUSEIML<br />
<br />
# Path to your IML include directory, e.g.<br />
#IMLFLAGS:=$(IMLFLAGS) -I"/home/skaspar/lib/iml-1.0.2/include"<br />
<br />
IMLFLAGS:=$(IMLFLAGS) # Can be left empty if you do not<br />
# want to use IML-driven<br />
# computations<br />
<br />
# Linker flags of your IML library plus linker flags of<br />
# additional libraries needed by IML, e.g.<br />
#IMLLIBS="/home/skaspar/lib/iml-1.0.2/lib/libiml.a" \<br />
# -lcblas \<br />
# -latlas \<br />
# "/usr/lib/libgmp.a"<br />
IMLLIBS= # Can be left empty if you do not want to use<br />
# IML driven computations<br />
<br />
# Uncomment the following flag if you want to use LinBox-<br />
# driven computations<br />
#LINBOXFLAGS=-DUSELinBox<br />
<br />
# Path to your LinBox include directory plus path to<br />
# additional include directories needed by LinBox, e.g.<br />
#LINBOXFLAGS:=$(LINBOXFLAGS) \<br />
# -I"/home/skaspar/lib/linbox-1.1.6/include" \<br />
# -I"/home/skaspar/lib/givaro-3.2.13rc1/include"<br />
LINBOXFLAGS:=$(LINBOXFLAGS) # Can be left empty if you<br />
# do not want to use LinBox-<br />
# driven computations<br />
<br />
# Linker flags of your LinBox library plus linker flags<br />
# of additional libraries needed by LinBox, e.g. <br />
#LINBOXLIBS=/home/skaspar/lib/linbox-1.1.6/lib/liblinbox.a \<br />
# -lgmpxx \<br />
# /home/skaspar/lib/givaro-3.2.13rc1/lib/libgivaro.a<br />
LINBOXLIBS= # Can be left empty if you do not<br />
# want to use LinBox-driven<br />
# computations<br />
<br />
# Uncomment the following flag if you do not want<br />
# to use the BLAS and Lapack libraries<br />
NUMFLAGS=-DUSENoLapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries and you are using<br />
# Linux or Cygwin<br />
#NUMFLAGS=-DUSEF77Lapack<br />
<br />
# Uncomment the following flag if you want to use<br />
# the BLAS and Lapack libraries provided by the<br />
# Accelerate Framework on MacOSX<br />
#NUMFLAGS=-DUSEAccFW<br />
<br />
# Linker flags of your BLAS and Lapack libraries<br />
# plus linker flags of additional libraries needed<br />
# by BLAS and/or Lapack.<br />
#<br />
# Example flags on a Linux or cygwin system<br />
#NUMLIBS=-llapack -lblas -latlas<br />
# <br />
# Example flags on a MacOSX system using the<br />
# the Accelerate Framework<br />
#NUMLIBS=-bind_at_load -framework accelerate<br />
NUMLIBS= # Can be left empty if you do<br />
# not want to use the BLAS and<br />
# Lapack libraries<br />
<br />
=Step by Step build instructions=<br />
Get a copy of the sources for CoCoALib from http://cocoa.dima.unige.it/cocoalib/changelog-0.99.html and ApCoCoALib from the [[ApCoCoA:SourceCodeManagement|subversion repository]].<br />
<br />
Build the CoCoALib. You should consult the CoCoALib documentation in case of problems.<br />
<br />
Build the ApCoCoALib: Unpack the tarball in the same directory as CoCoALib-0.99. This is the default location that ApCoCoALib will look for. You can change it but at the moment this requires editing of the COCOA_DIR_NAME in the file configuration/autoconf.mk. We will offer the location of CoCoALib as a config option in the libconfig file in a later release. <br />
<br />
Again, please note that <br />
* the CoCoALib directory must be named as ''CoCoALib-0.99''<br />
* the CoCoALib and ApCoCoALib directory must reside in the same directory.<br />
<br />
Now run configure:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure<br />
ERROR: Specified config file is not a readable file: ""<br />
Please specify a config file for the external numerical libraries via --with-libconfig<br />
<br />
You get an error because ApCoCoALib needs to be told where to find several external libraries and options. One option is to set CONFIG_LIB="lib.config" in the configure script and create the file called lib.config with the following text:<br />
<br />
# we don't want to compile in any numerical libraries<br />
NUMFLAGS=-DUSENoLapack <br />
<br />
With this config file you deactivate all numerical methods provided by ApCoCoALib. Chances are you do not want to do this. But since building the numerical libraries can be a little complicated we provide precompiled libraries and config examples at http://apcocoa.org/hg/NumLibs/file/ FIXME: Add more details and tarballs.<br />
<br />
In case you have Mac Os X as your operating system, it is very easy to include the numerical Libraries. Per default, you have an installed Accelerate Framework, which includes BLAS and Lapack, which are the numerical libraries we currently use. To activate the accelerate framework, your lib.config should include the lines:<br />
<br />
NUMFLAGS=-DUSEAccFW<br />
<br />
# linker options:<br />
NUMLIBS=-bind_at_load -framework accelerate<br />
<br />
<br />
With a working set of libraries we rerun configure and get:<br />
<br />
[mabshoff@dhcp75 ApCoCoALib-0.99]$ ./configure --with-libconfig=../NumLibs/lib.config.USEF77Lapack<br />
The C++ compiler is g++ 4.1.1 20070105 (Red Hat 4.1.1-51)<br />
The C++ optimized compilation flags are "-Wall -pedantic -fPIC -O2"<br />
Using GMP library version 4.2.1 found in "/usr/local/gmp-4.2.1-static/lib/libgmp.a".<br />
and GMP header file found in "/usr/local/gmp-4.2.1-static/include/gmp.h" <br />
Configuration process complete: info saved in configuration/autoconf.mk<br />
-----------------------------------------------------------------------<br />
<br />
Everything is fine now. Just enter<br />
<br />
make<br />
<br />
and the ApCoCoAServer as well as the ApCoCoALib should be build.<br />
<br />
In case of problems please complain in the forum.<br />
<br />
=Building External Dependencies=<br />
<br />
==Windows==<br />
<br />
===Compilers===<br />
MSVC 2003, MSVC 2005, Intel C++, Cygwin<br />
<br />
===CoCoALib===<br />
Build from source, prebuild packages for MSVC 2005, MSVC 2003, Cygwin<br />
<br />
===GMP===<br />
Brian Gladman's build for MSVC, from source for Cygwin/MinGW.<br />
<br />
===BLAS/Lapack===<br />
Cygwin ships with BLAS and Lapack from netlib.org compiled as a dynamic library. These are regularly tested and do work well. Alterntively you can compile ATLAS, but there are occasional linker issues. <br />
<br />
If you use the Microsoft's compilers you can use the Intel MKL, GotoBLAS or ATLAS 3.8.0. It is also possible to build netlib.org's BLAS and Lapack using a Fortran compiler from Intel.<br />
<br />
===LinBox===<br />
Build from source, Cygwin only at the moment. It is highly recommened that you build LinBox as a static library, there have been linking issues with a dynamic LinBox in the past. You might also need to tweak LinBox's m4 BLAS detection macros when using netlib.org's BLAS and Lapack.<br />
<br />
==Linux==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
Distribution package, build from source: ATLAS, netlib.org, GotoBLAS, IntelMKL<br />
<br />
===ATLAS===<br />
Build from source. Install instructions:<br />
<br />
tar -xvzf atlas3.xx.tar.gz<br />
cd ATLAS<br />
mkdir ATLAS_build<br />
cd ATLAS_build<br />
../configure<br />
make<br />
make install<br />
<br />
<b>Important:</b> For compiling ATLAS you need an extra build-directory, that must be within the directory where you extracted your files to. Call the configure-script from within the build-directory, as noted above. For further informations see ''atlas_install.pdf'' in ATLAS/doc. Please also see the .pdf if you have some kind of special architecture like 64bit.<br><br />
<br />
<b>Note for Laptop-Users:</b> You have to set you CPU power scheme to "performance", in order to have maximum speed for the tests, that are performed during the ATLAS compiling routine. If you have a DualCore remember to do this for '''both''' cores! <br><br />
To change the power scheme you can use tools like ''cpufrequtils'', normally found within the repository of your package manager.<br />
<br />
===LinBox===<br />
build from source<br />
<br />
==MacOSX==<br />
The following steps were taken on an Apple MacBook (Intel Core 2 Duo), OS X 10.4.<br />
<br />
===Compilers===<br />
Xcode 2.4.1 recommened, for current releases we are using xcode 2.5.<br />
<br />
===CoCoALib===<br />
Build from source.<br />
<br />
===Boost===<br />
This might not be the best way to supply the '-m64' argument, but it works.<br />
<br />
./configure [--prefix=<path>]<br />
./tools/jam/src/bin.macosxx86/bjam -d+2 --user-config=user-config.jam architecture=x86 address-model=64 cxxflags=-m64<br />
./tools/jam/src/bin.macosxx86/bjam --user-config=user-config.jam --prefix=<> --exec-prefix=<> --libdir=<> --includedir=<> architecture=x86 address-model=64 cxxflags=-m64 install<br />
<br />
===GMP===<br />
build from source, can be tricky, need the right patch and working xcode. Try the following:<br />
<br />
./configure [--prefix=<>] --enable-cxx<br />
make<br />
make check<br />
make install<br />
<br />
===BLAS/Lapack===<br />
AccelerateFrameWork recommended (installed per default). Also possible:<br />
build from sources: ATLAS, netlib.org<br />
installer: IntelMKL<br />
<br />
===LinBox===<br />
build from source<br />
<br />
===Givaro===<br />
<br />
./configure [--prefix=<>] --with-gmp=</path/to/dir> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
In file <code>givaro-config.h</code> the flag <code>__GIVARO_GMP_NO_CXX</code> must not be set. Otherwise we got problems with wrong includes compiling ApCoCoA.<br />
<br />
===Linbox===<br />
Apply the patch given in http://www.apcocoa.org/forum/viewtopic.php?f=20&t=983<br />
<br />
./configure --prefix=<> --with-gmp=<> --with-givaro=<> CXXFLAGS=-m64<br />
make<br />
make install<br />
<br />
===IML===<br />
Now, that was quite involved. If anyone knows a better way to get IML compiled, please let us know.<br />
<br />
./configure -prefix=<> --with-gmp-lib=<> --with-gmp-include=<> --with-atlas-include=<> --with-atlas-lib=<> CFLAGS=-m64<br />
<br />
(Yes, its CFLAGS and _not_ CXXFLAGS)<br />
After configuring, do the following:<br />
<br />
cp librepl.a repl<br />
cd repl/.libs<br />
ln -s ../librepl.a librepl.a<br />
echo "!<arch>" > repl/.libs/librepl.a<br />
<br />
On a mac, this seems to be necessary since <code>libtool</code> does apparently not work properly (any help on this is welcome) and we have to fool <code>ar</code> (this approach is just mimicked from a working Linux compilation).<br />
<br />
make<br />
make check<br />
chmod 755 config/install-sh<br />
<br />
(Do not ask...)<br />
<br />
make install<br />
<br />
===ATLAS===<br />
<br />
(Used gFortran, downloaded from http://r.research.att.com/tools)<br />
<br />
../configure --prefix=<><br />
make<br />
make install<br />
<br />
==Solaris/UNIX==<br />
<br />
===Compilers===<br />
g++ 3.3 up to 4.2, SunPro compiler difficult to use due to problem with gmpxx.h<br />
<br />
===CoCoALib===<br />
Build from source<br />
<br />
===GMP===<br />
Distribution package, build from source<br />
<br />
===BLAS/Lapack===<br />
recommneded: SunPerfLib<br />
build from sources: ATLAS, netlib.org<br />
<br />
===LinBox===<br />
build from source<br />
<br />
=ToDo=<br />
<br />
* configure no longer errors out, but write a warning<br />
* make links to targz'ed libraries available<br />
<br />
[[Category:ApCoCoALib|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9942ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-15T11:20:10Z<p>Philipp jovanovic: /* Installing the Plugin */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|800px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|800px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now, a name is optional for your new update site.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|800px]]<br />
* Then check Apcocoa GUI and the feature appropiate to your platform (e.g. Linux 32-Bit). Click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|800px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|800px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|800px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|800px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:07_apcocoa_project.png|thumb|none|800px]]<br />
* In the Project Wizard, select <code>ApCoCoA Project</code> in the <code>Other</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|800px]]<br />
* If you are not already in the ''ApCoCoA Perspective'', Eclipse asks you now if you want to switch to it. Accept this.<br />
* In the Navigator on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:08_eclipse_navigator.png|thumb|none|800px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the extension <code>.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file e.g. named <code>interactive.aco</code> and click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|800px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|800px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.coc</code> or <code>.cpkg</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|800px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|800px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|800px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|800px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=File:04_review_dialog.png&diff=9941File:04 review dialog.png2009-07-15T11:18:26Z<p>Philipp jovanovic: uploaded a new version of "Image:04 review dialog.png"</p>
<hr />
<div></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=File:03_install_dialog.png&diff=9940File:03 install dialog.png2009-07-15T11:17:44Z<p>Philipp jovanovic: uploaded a new version of "Image:03 install dialog.png"</p>
<hr />
<div></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9890ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:36:33Z<p>Philipp jovanovic: /* Installing the Plugin */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now, a name is optional for your new update site.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:07_apcocoa_project.png|thumb|none|150px]]<br />
* In the Project Wizard, select <code>ApCoCoA Project</code> in the <code>Other</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* If you are not already in the ''ApCoCoA Perspective'', Eclipse asks you now if you want to switch to it. Accept this.<br />
* In the Navigator on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:08_eclipse_navigator.png|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the extension <code>.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file e.g. named <code>interactive.aco</code> and click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.coc</code> or <code>.cpkg</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9889ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:30:36Z<p>Philipp jovanovic: /* Create and use an (interactive) Editor Window */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:07_apcocoa_project.png|thumb|none|150px]]<br />
* In the Project Wizard, select <code>ApCoCoA Project</code> in the <code>Other</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* If you are not already in the ''ApCoCoA Perspective'', Eclipse asks you now if you want to switch to it. Accept this.<br />
* In the Navigator on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:08_eclipse_navigator.png|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the extension <code>.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file e.g. named <code>interactive.aco</code> and click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.coc</code> or <code>.cpkg</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9888ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:27:33Z<p>Philipp jovanovic: /* Create and use an (interactive) Editor Window */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:07_apcocoa_project.png|thumb|none|150px]]<br />
* In the Project Wizard, select <code>ApCoCoA Project</code> in the <code>Other</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* If you are not already in the ''ApCoCoA Perspective'', Eclipse asks you now if you want to switch to it. Accept this.<br />
* In the Navigator on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:08_eclipse_navigator.png|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the extension <code>.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file e.g. named <code>interactive.aco</code> and click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.aco</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9886ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:20:04Z<p>Philipp jovanovic: /* Create a new Project */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:07_apcocoa_project.png|thumb|none|150px]]<br />
* In the Project Wizard, select <code>ApCoCoA Project</code> in the <code>Other</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* If you are not already in the ''ApCoCoA Perspective'', Eclipse asks you now if you want to switch to it. Accept this.<br />
* In the Navigator on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:08_eclipse_navigator.png|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the name <code>interactive.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file named <code>interactive.aco</code>, click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.aco</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=File:08_eclipse_navigator.png&diff=9885File:08 eclipse navigator.png2009-07-13T12:18:46Z<p>Philipp jovanovic: </p>
<hr />
<div></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9884ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:15:12Z<p>Philipp jovanovic: /* Create a new Project */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:07_apcocoa_project.png|thumb|none|150px]]<br />
* In the Project Wizard, select <code>ApCoCoA Project</code> in the <code>Other</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* If you are not already in the ''ApCoCoA Perspective'', Eclipse asks you now if you want to switch to it. Accept this.<br />
* In the Project Explorer on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:Project_Explorer.jpg|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the name <code>interactive.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file named <code>interactive.aco</code>, click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.aco</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9883ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:12:20Z<p>Philipp jovanovic: /* Create a new Project */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:07_apcocoa_project.png|thumb|none|150px]]<br />
* In the Project Wizard, select <code>ApCoCoA Project</code> in the <code>Other</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* In the Project Explorer on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:Project_Explorer.jpg|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the name <code>interactive.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file named <code>interactive.aco</code>, click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.aco</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=File:07_apcocoa_project.png&diff=9881File:07 apcocoa project.png2009-07-13T12:10:23Z<p>Philipp jovanovic: </p>
<hr />
<div></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9880ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:08:03Z<p>Philipp jovanovic: /* Configure Eclipse */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:06_setting_apcocoa_paths.png|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:New_Project_Wizard.jpg|thumb|none|150px]]<br />
* In the Project Wizard, select <code>Project</code> in the <code>General</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* In the Project Explorer on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:Project_Explorer.jpg|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the name <code>interactive.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file named <code>interactive.aco</code>, click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.aco</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=File:06_setting_apcocoa_paths.png&diff=9879File:06 setting apcocoa paths.png2009-07-13T12:06:34Z<p>Philipp jovanovic: </p>
<hr />
<div></div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9878ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:04:16Z<p>Philipp jovanovic: /* Configure Eclipse */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click <code>OK</code> [[Image:ApCoCoA_Preferences.jpg|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:New_Project_Wizard.jpg|thumb|none|150px]]<br />
* In the Project Wizard, select <code>Project</code> in the <code>General</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* In the Project Explorer on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:Project_Explorer.jpg|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the name <code>interactive.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file named <code>interactive.aco</code>, click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.aco</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovichttp://apcocoa.uni-passau.de/wiki/index.php?title=ApCoCoA-1:HowTo:Install_and_Work_with_the_Eclipse_GUI&diff=9876ApCoCoA-1:HowTo:Install and Work with the Eclipse GUI2009-07-13T12:01:38Z<p>Philipp jovanovic: /* Installing the Plugin */</p>
<hr />
<div>==Introduction==<br />
<br />
This HowTo shows you how to get started with the new Eclipse Graphical User Interface (GUI) for (Ap)CoCoA.<br />
<br />
Currently, the new GUI is still in an alpha state, which means there might be annoying bugs or the look and feel will change in the near future with new releases.<br />
<br />
If this doesn't frighten you, you are more than welcome to<br />
<br />
* follow the steps below and install the new GUI<br />
* find and [http://www.apcocoa.org/bugtracker/ report any bugs]<br />
* [http://www.apcocoa.org/bugtracker/ request any feature you miss]<br />
* even contribute by developing new features yourself.<br />
<br />
==Prerequisites==<br />
<br />
* A current [http://www.java.com/ Java runtime environment] (Java 5 JRE recommended)<br />
* [http://www.eclipse.org/downloads/ Eclipse] If you are new to Eclipse, the variety of different packages to choose from may be confusing. However, for using ApCoCoA it does not matter which package you choose and we therefore recommend to choose the smallest one (which currently is the ''Eclipse IDE for C/C++ Developers'')<br />
* [http://www.apcocoa.org/wiki?title=ApCoCoA:Downloads ApCoCoA]<br />
<br />
<br />
<br />
==Installation==<br />
===Installing and Running Eclipse===<br />
After you have downloaded one of the [http://www.eclipse.org/downloads/ Eclipse packages] (e.g. the ''Eclipse IDE for C/C++ Developers''), unpack the package, go to the newly created folder <code>eclipse</code> and start the eclipse executable. That's all. <br />
You will next be asked to provide a ''workspace directory''. This is where all your projects and (ApCoCoA) files will be stored. If unsure, just take the suggested directory.<br />
When you start Eclipse for the first time, you are presented with the welcome screen, which you can just close.<br />
[[Image:01_welcome.png|thumb|none|150px]]<br />
If you have downloaded the ''Eclipse IDE for C/C++ Developers'', Eclipse is in the ''C/C++ perspective'' (a perspective defines the arrangement of the different visual elements such as the editor, navigators,...) which is the starting point for this tutorial.<br />
[[Image:02_start_eclipse.png|thumb|none|150px]]<br />
<br />
===Installing the Plugin===<br />
One of the really nice things in Eclipse is the ease of installing and updating plugins, i.e. extensions of the Eclipse platform that add new features and functionality to Eclipse, just as the GUI plugin does. To install the ApCoCoA GUI plugin, follow these steps:<br />
* In the menu bar, click <code>Help > Install New Software...</code><br />
* Next, enter at ''Work with:'' the URL <code>http://www.apcocoa.org/updatesite/</code> and click ''Add...''<br />
* Just click ''Ok'' on the dialog that opens now.<br />
* Now you should see the following picture on your screen. [[Image:03_install_dialog.png|thumb|none|150px]]<br />
* Note: Maybe you have to uncheck ''Group items by category'' to see the Apcocoa GUI package.<br />
* Then check Apcocoa GUI and click <code>Next></code>. <br />
* Eclipse then looks up the plugins that have to be installed and presents you with a review and confirm page. Click <code>Next></code>.[[Image:04_review_dialog.png|thumb|none|150px]]<br />
* Accept the license agreement and click <code>Finish</code>.[[Image:05_accept_license.png|thumb|none|150px]]<br />
* Next you will be asked to restart the Eclipse platform which is recommended.<br />
* Finally, you should see some new additions in the menu and tool bars.<br/><br/>[[Image:New_Additions.jpg]]<br />
<br />
<br />
You are now ready to set up and use ApCoCoA with Eclipse.<br />
<br />
==First Steps==<br />
===Configure Eclipse===<br />
<br />
In the current alpha release, neither ApCoCoA executables are not packed with the Eclipse plugin yet. <br />
The plugin does also not check for installed ApCoCoA executables. Therefore, the paths have to be configured manually as follows.<br />
<br />
* Go to <code>Window > Preferences > ApCoCoA Preferences</code><br />
* Set paths to the ApCoCoA command line executable and ApCoCoA Server or BBF Server and click OK,<br/<br/> [[Image:ApCoCoA_Preferences.jpg|thumb|none|150px]]<br />
* Verify the settings by starting ApCoCoA, clicking on the ''(Re)start ApCoCoA Process'' button [[Image:ApCoCoA_Restart_Button.jpg]]. In the console view you can see now the ApCoCoA greeting message.<br/>[[Image:Greeting_Message.jpg|thumb|none|150px]]<br />
<br />
===Create a new Project===<br />
<br />
All work done within Eclipse is organized into projects. To create a new project<br />
* Go to <code>File > New > Project ...</code><br/>[[Image:New_Project_Wizard.jpg|thumb|none|150px]]<br />
* In the Project Wizard, select <code>Project</code> in the <code>General</code> category and click <code>Next</code>.<br />
* Name the project ''GUI Tutorial'' and click <code>Finish</code>. [[Image:New_Project_Name.jpg|thumb|none|150px]]<br />
* In the Project Explorer on the left side you can now see the newly created project, moreover, Eclipse created a new folder in the workspace directory.<br/>[[Image:Project_Explorer.jpg|thumb|none|150px]]<br />
<br />
===Create and use an (interactive) Editor Window===<br />
<br />
To enter (Ap)CoCoA commands and programs, you need an editor window. Within the (Ap)CoCoA QT-GUI, there are two kinds of editor windows or, more specific, editor tabs: a) the interactive default editor tab, where you enter commands but usually do not edit programs (since the window is cleared after sending its content to (Ap)CoCoA); and (b) the "persistent" editor tabs, where you edit your programs. The interactive behavior is mimicked in Eclipse if you create a special "file" with the name <code>interactive.aco</code>:<br />
<br />
* Right-click on the ''GUI Tutorial'' project and select <code>New > File</code>.<br />
* Create a new file named <code>interactive.aco</code>, click <code>Finish</code>. [[Image:New_File_Interactive.jpg|thumb|none|150px]]<br />
* Type a sample command in the new editor window and send it to ApCoCoA, typing <code>Ctrl+Enter</code>. [[Image:Hello_World.jpg|thumb|none|150px]]<br />
* The editor windows content is then added to the history and the editor is cleared. As in the CoCoA QT-GUI, you can navigate through the histroy with <code>Alt+Left</code> and <code>Alt+Right</code>.<br />
* Note that the content of interactive editors is not saved to disk!<br />
Tip: If you are uncomfortable with the key bindings, you can simply change them in the General Preferences (<code>Window > Preferences > General > Keys</code>).<br />
<br />
To create a "normal" editor window, create a file with the extension <code>.aco</code>. Files with this extension are associated to ApCoCoA editors with all their features (syntax coloring, sending content to the ApCoCoA process via <code>Enter+Enter</code>,...).<br />
<br />
===Getting Help===<br />
To access the ApCoCoA Help go to <code>Help > Help Contents</code>. On the left side you find the ApCoCoA Handbook.<br/>[[Image:ApCoCoA_Help.jpg|thumb|none|150px]]<br />
<br />
==Further Topics==<br />
<br />
===Working with the ApCoCoA / BBF Server===<br />
To start the ApCoCoA Server, click on the button ''Start ApCoCoA Server'' [[Image:Start_ApCoCoA_Server.jpg]].<br />
<br />
Since there is initially only one console view that would be shared by both the server and the cocoa process it is more convenient to <br />
* pin the ApCoCoA console<br/>[[Image:Console_Pin.jpg|thumb|none|150px]]<br />
* open a second console view<br/>[[Image:Open_Console_View.jpg|thumb|none|150px]]<br />
* rearrange the two console views (see below).<br />
<br />
===Adjust the Appearance===<br />
In Eclipse, it is possible to rearrange the visual components in (almost) any way you like via drag & drop.<br/><br />
[[Image:GUI_Rearrangement.jpg|thumb|none|150px]]<br />
<br />
[[Category:HowTo|{{PAGENAME}}]]</div>Philipp jovanovic