docs/Writerside/topics/install.md

Thu, 23 Jan 2025 01:15:52 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 23 Jan 2025 01:15:52 +0100
branch
docs/3.1
changeset 1140
88a9ee79c102
permissions
-rw-r--r--

start overhauling the entire web documentation

relates to #451

1140
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 ---
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 title: Build Instructions
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 ---
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 The build processes uses configure and make.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 Make sure that you have `make` and a
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 <tooltip term="supported-compilers">supported compiler</tooltip>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 installed.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 <tabs>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 <tab title="Unix / Linux">
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 <procedure>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13 <step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 Download the latest source archive from <a href="https://sourceforge.net/projects/ucx/files/">Source Forge</a>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 and extract it somewhere on your machine.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 You can also use the command line to do this.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 <code-block lang="sh">
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 wget https://sourceforge.net/projects/ucx/files/ucx-latest.tar.gz
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 tar -xzf ucx-latest.tar.gz
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 cd ucx-latest
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 </code-block>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 </step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 <step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 Configure the build according to your preferences. You can get a list of
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 all available options with <code>./configure --help</code>.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 The recommended configuration for production builds is <code>./configure --release</code>.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 <code-block lang="sh">
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 ./configure --release
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 make
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 make check
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 sudo make install
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 </code-block>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33 <note>The check target is optional and only runs some tests with the built software.</note>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 </step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 </procedure>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 </tab>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 <tab title="Windows">
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 <procedure>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 <step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 Download the latest source archive from <a href="https://sourceforge.net/projects/ucx/files/">Source Forge</a>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 and extract it somewhere on your machine.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 </step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 <step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 Navigate to the folder named <code>msvc</code> in the extracted directory structure.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 </step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 <step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 Open the contained <code>ucx.sln</code> in Visual Studio and build the solution.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 </step>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 </procedure>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 </tab>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 </tabs>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 ## Compile Time Options
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 When compiling UCX, you can tweak several compile time variables via macro definitions.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 ### Features Defines
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 The following macros are not defined by default.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60 The effect when they are defined in described in the table.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 <table>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 <th>Macro</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 <th>Effect</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 <td>CX_NO_SZMUL_BUILTINT</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 <td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 By default, UCX uses a compiler builtin (only available for clang and gcc)
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 to perform multiplications with overflow check.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 When this macro is defined, using the builtin is disabled and UCX will
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 always use an own implementation.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 <tip>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 This macro is defined when you use the <code>--disable-szmul-builtin</code>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 option during configuration, so you do not need to define it manually.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 </tip>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 </td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 </table>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 ### Small Buffer Optimizations
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 <table>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 <th>Macro</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 <th>Description</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 <th>Default</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 <td>CX_ARRAY_SWAP_SBO_SIZE</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 <td>The maximum item size in an array list that uses SBO.</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 <td>128</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 <td>CX_LINKED_LIST_SORT_SBO_SIZE</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 <td>The maximum list size that uses SBO during sort.</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 <td>1024</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 <td>CX_PRINTF_SBO_SIZE</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 <td>The maximum string length functions in printf.h use stack memory for.</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 <td>512</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 <td>CX_STRSTR_SBO_SIZE</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
107 <td>The maximum length of the "needle" in cx_strstr that can use SBO.</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 <td>128</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110 </table>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
111
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
112
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113 ### Other Buffers
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115 <table>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
117 <th>Macro</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118 <th>Description</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
119 <th>Default</th>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
120 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 <td>CX_STRREPLACE_INDEX_BUFFER_SIZE</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 <td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 The number of matches the index buffer can store on the stack.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 If the function finds more matches, more index buffers of the same size are allocated on the heap.
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 </td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 <td>64</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 <td>CX_STREAM_COPY_BUF_SIZE</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 <td>The buffer size on the stack for a stream copy.</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 <td>1024</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 <tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 <td>CX_STREAM_BCOPY_BUF_SIZE</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 <td>The buffer size on the heap for a stream copy.</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 <td>8192</td>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 </tr>
88a9ee79c102 start overhauling the entire web documentation
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 </table>

mercurial