Debian Codegraph @

doc/Compiling.html

raw symbols SCIP
1 <!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html;
5 charset=windows-1252">
6 <meta http-equiv="content-type" content="text/html;
7 charset=windows-1252">
8 <meta name="GENERATOR" content="Mozilla/4.73 [en] (WinNT; I)
9 [Netscape]">
10 <title>Argyll Compiling</title>
11 </head>
12 <body>
13 <h2> <u>Compiling the Source Code</u></h2>
14 If you have downloaded the source code package, then you will need
15 to read the following instructions in order to compile and then run
16 any of the tools. If you have downloaded one of the platform
17 specific executable package, then the executables don't need to be
18 compiled, and the following instructions are not relevant.<br>
19 <h5 style="text-decoration: underline;">Check your development
20 environment:</h5>
21 Check you have one of the supported development environments <a
22 href="ArgyllDoc.html">listed</a>, and that your shell is
23 configured to have access to the development tools.<br>
24 <br>
25 On Linux, check that the appropriate development packages are
26 installed:<br>
27 <br>
28 &nbsp;&nbsp;&nbsp; jam: Program construction tool, similar to make
29 [If available - downloadable from the ArgyllCMS website]<br>
30 &nbsp;&nbsp;&nbsp; gcc C compiler<br>
31 &nbsp;&nbsp;&nbsp; Development files for libX11<br>
32 &nbsp;&nbsp;&nbsp; Development files for libXdmcp<br>
33 &nbsp;&nbsp;&nbsp; X.Org X11 libXext development package<br>
34 &nbsp;&nbsp;&nbsp; X.Org X11 libXxf86vm development package<br>
35 &nbsp;&nbsp;&nbsp; X.Org X11 libXinerama development package<br>
36 &nbsp;&nbsp;&nbsp; X.Org X11 libXrandr development package<br>
37 &nbsp;&nbsp;&nbsp; X.Org X11 libXScrnSaver A.K.A. libxss-dev
38 development package<br>
39 <h5><span style="text-decoration: underline;">Setup JAM:</span><br>
40 </h5>
41 Argyll makes use of a build system called <a
42 href="http://www.perforce.com/jam/jam.html">Jam/MR</a>. Jam is
43 cross platform, highly customizable and flexible. It uses a concise,
44 scalable and platform neutral configuration files, and is fast.<br>
45 <p>If you do not already have Jam 2.5 on your system or if it is not
46 available as an installable package, you will need to install it.
47 [It may be available as an RPM for Linux systems.] Jam/MR is
48 available from <a href="ftp://ftp.perforce.com/jam/">&lt;ftp://ftp.perforce.com/jam&gt;</a>
49 You'll want to bootstrap it up using its Makefile - see the <span
50 style="font-weight: bold;">README</span> file that comes with
51 Jam for more information. You may want to apply the patch <span
52 style="font-weight: bold;">jam.patch</span> included in Argyll
53 to <span style="font-weight: bold;">jam.c</span> so that it uses
54 the environment variable <span style="font-weight: bold;">JAMBASE</span>,
55 and then setting this environment variable to point to the Argyll
56 Jambase. The patch also fixes a non-critical bug that affects
57 building using MingW. Note that building jam results in an
58 executable <span style="font-weight: bold;">jam0</span> that you
59 will want to rename and install in an appropriate place on your
60 system. A <span style="font-weight: bold;">pre-patched</span>
61 source archive of Jam is available as a&nbsp; <a
62 href="http://www.argyllcms.com/ajam-2.5.2-1.3.4.zip">.zip here
63 for MSWin</a>, or as a <a
64 href="http://www.argyllcms.com/ajam-2.5.2-1.3.3.tgz">.tgz for OS
65 X and Linux</a>.<br>
66 </p>
67 <p>An alternative to the original Jam may be <a
68 href="http://freetype.sourceforge.net/jam/index.html">ftjam</a>,
69 which is appears to be backwards compatible with the original
70 Jam/MR.</p>
71 <p>The <span style="font-weight: bold;">Jambase</span> I am using
72 for Argyll is different to the default Jambase provided with Jam
73 and compiled into it,&nbsp; and you need to arrange to use this
74 when you compile Argyll. You can tell Jam to use an alternate
75 Jambase using the <span style="font-weight: bold;">-f</span>
76 option, or by setting the environment variable <span
77 style="font-weight: bold;">JAMBASE</span> to point to the Argyll
78 Jambase if you applied the Argyll patch to jam. Another method
79 would be to create a shell alias of jam that invokes jam using the
80 -f flag, or to create a script that provides the -f option to
81 point to the Argyll Jambase. Argyll will not build properly if you
82 use the wrong Jambase. </p>
83 If you are running on Mac OSX, then even though OSX comes with a
84 version of Jam/MR in the development system, you will need to
85 download, build and install a normal version of Jam/MR Version 2.5
86 or later from perforce, to be able to build Argyll. This is due to
87 Apple changing their version of Jam sufficiently to make it
88 incompatible with normal Jamfiles :-(.<br>
89 <p>On OSX what I did was to name the "normal" Jam ajam, and then
90 setup a jam shell script to invoke it something like this: "ajam
91 -f~/src/argyll/Jambase $*", and to make sure that my script is
92 ahead of Apples jam in my $PATH.&nbsp; The makeall.ksh script or
93 Makefile will run Jam with the -f flag.<br>
94 </p>
95 <p>Also on Linux and OSX you may have to make sure that certain
96 environment variables such as <b>HOSTTYPE</b> are exported, so
97 that other programs can see them.<br>
98 </p>
99 <p>On newer Linux systems that make use of versions of the <b>ar</b>
100 utility that default to so called "deterministic builds" you
101 should set the <b>JAM_NEW_GNU_AR_OPTIONS</b> environment <br>
102 variable so that the ar U option is set:<br>
103 </p>
104 <p>&nbsp;&nbsp;&nbsp; export <b>JAM_NEW_GNU_AR_OPTIONS=true<br>
105 <br>
106 </b>&nbsp;Not doing this will cause libraries to be re-built all
107 the time.<br>
108 </p>
109 <p>You may also have to set the appropriate environment variable to
110 tell the Jambase which compiler you are using.<br>
111 </p>
112 <h5><span style="text-decoration: underline;">Then compile Argyll:</span><br>
113 </h5>
114 <p>Once you've got a working Jam, you simply have to unzip the
115 argyll.zip file, and it will create a top level directory <span
116 style="font-weight: bold;">Argyll_VX.X.X</span>, where X.X.X is
117 the version number, and you can then cd into this directory and
118 run <span style="font-weight: bold;">jam</span>. <span
119 style="color: rgb(102, 0, 204);"></span><span style="color:
120 rgb(102, 0, 204);"></span>For a faster build on a multiprocessor
121 system you may like to use the -j option&nbsp; to do a parallel
122 build, e.g. <span style="font-weight: bold;">jam -j3</span>. To
123 install the executables in the bin directory and the sample files
124 into the <span style="font-weight: bold;">ref</span> directory,
125 run <span style="font-weight: bold;">jam install</span>. To
126 remove everything that has been built, run <span
127 style="font-weight: bold;">jam clean</span>. On Linux/OS X you
128 could also just try running make, and the makefile will invoke
129 jam, or the makeall.ksh shell script file or the makeall.bat file
130 can be used to invoke jam.<br>
131 </p>
132 <p>Something to watch on the Intel versions of OS X 10.4, is that
133 your shell environment variable $MACHTYPE may be incorrect. On
134 Intel 10.4 it should be i386-apple-darwin8.0, but there are bugs
135 in Apples distribution.<br>
136 </p>
137 <p>You may have to check that your shell environment variable $<span
138 style="font-weight: bold;">HOSTTYPE</span> has been exported, so
139 that Jam can know if it's 64 bit or not,<br>
140 and look for libraries in the right place. You can fix this
141 permanently in your shell .initialization file (ie. ~/.profile,
142 ~/.bashrc etc.).<br>
143 </p>
144 <p>To build a particular sub directory only, cd to the directory and
145 simply run <span style="font-weight: bold;">jam</span>, although
146 be aware that the local Jamfile compile time options may be
147 different to those in the top level Jamfile used when compiling
148 from the top.<br>
149 </p>
150 <p><span style="font-weight: bold;">NOTE</span> that "jam install"
151 doesn't install the resulting binaries in the "usual places", it
152 installs them in the <span style="font-weight: bold;">Argyll_VX.X.X/</span><span
153 style="font-weight: bold;">bin</span> directory, and it's then
154 up to you whether you want copy them to somewhere like C:\Program
155 Files\argyll, /usr/bin, /usr/local/bin etc., or simply leave them
156 there. </p>
157 <h5><span style="text-decoration: underline;">Compile environment on
158 MSWindows:</span></h5>
159 <p>Setting up a compile environment on MSWindows can be challenging.
160 The simplest approach is probably to install MingW, since it
161 provides both the compiler and the SDK in one package.<br>
162 <br>
163 I've successfully compiled using Microsoft VC++ 6.0, but I think I
164 remember tweaking some of the header files by borrowing from a
165 latter SDK to be able to incorporate the&nbsp; necessary function
166 calls to access display and color profiles on Win2K and latter, so
167 this may not work "out of the box".</p>
168 <p>I've also successfully compiled using Microsoft VC++ 8.0, VC++
169 9.0 and VC++ 10.0 Express (the free Microsoft compiler) plus the
170 Microsoft Platform SDK February 2008. To get this to work though,
171 I had to create my own batch file to setup the SDK environment
172 variables <span style="font-weight: bold;">MSSdk</span> etc.,
173 because the batch files provided with the SDK got confused by the
174 presence of VC++6, and didn't notice that VC++8, 9 or 10 was
175 configured.</p>
176 <p>Note that for some hard to fathom reason VC++ 9.0 refused to
177 install on my Win2K development machine, so I had to install it on
178 a WinXP machine and then copy the installation back to Win2K, and
179 manually complete the installation. There seems to be no reason
180 for this limitation, since the VC++9&nbsp; compiler/linker etc.
181 seems quite happy to run on Win2K.</p>
182 <p>I have succeeded in cross compiling for Win64 using
183 x86_64-w64-mingw32-gcc, but currently the Jambase isn't setup for
184 cross compilation and I used a hack to build the native
185 executables with a native compiler before invoking the usual Jam
186 compilation in the cross environment.<br>
187 &nbsp; </p>
188 </body>
189 </html>