Welcome to mirror list, hosted at ThFree Co, Russian Federation.

md__build.html - github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 63f3fa4a94e0870c23624280acfd794bcc53f729 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LLFIO: Build instructions</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LLFIO
   &#160;<span id="projectnumber">v2.00 late beta</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('md__build.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="PageDoc"><div class="header">
  <div class="headertitle">
<div class="title">Build instructions </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>These compilers and OSs are regularly tested:</p>
<ul>
<li><a href="https://gcc.gnu.org/">GCC</a> 7.5 (Linux 4.x x64)</li>
<li><a href="https://clang.llvm.org/">Clang</a> 7 (Linux 4.x x64)</li>
<li>Xcode 11.6 (macOS 10.15 x64)</li>
<li>Visual Studio 2017 (Windows 10 x64).</li>
</ul>
<p>Other compilers, architectures and OSs may work, but are not tested regularly. You will need a working <a href="https://en.cppreference.com/w/cpp/experimental/fs">Filesystem TS</a> implementation in your STL, and at least C++ 14.</p>
<p>LLFIO has your choice of header-only, static library, and shared library build modes. Note that on Microsoft Windows, the default header only configuration is unsafe to use outside of toy projects. You will get warnings of the form:</p>
<div class="fragment"><div class="line">warning : LLFIO_HEADERS_ONLY=1, LLFIO_EXPERIMENTAL_STATUS_CODE=0 and NTKERNEL_ERROR_CATEGORY_INLINE=1 on Windows, this can produce unreliable binaries where semantic comparisons of error codes randomly fail!</div>
</div><!-- fragment --><p>... and ...</p>
<div class="fragment"><div class="line">Defining custom error code category ntkernel_category() via header only form is unreliable! Semantic comparisons will break! Define NTKERNEL_ERROR_CATEGORY_INLINE to 0 and only ever link in ntkernel_category() from a prebuilt shared library to avoid this problem.</div>
</div><!-- fragment --><p>The cause is that <code>&lt;system_error&gt;</code> has a design flaw not rectified until (<a href="https://wg21.link/P1196">probably</a>) C++ 20 where custom error code categories are unsafe when shared libraries are in use.</p>
<p>You have one of three choices here: (i) Use <a href="https://wg21.link/P1028">experimental SG14 <code>status_code</code></a> which doesn't have this problem (define <code>LLFIO_EXPERIMENTAL_STATUS_CODE=1</code>) (ii) Use the NT kernel error category as a shared library (<a href="https://github.com/ned14/ntkernel-error-category">see its documentation</a>) (iii) Don't use header only LLFIO on Windows (see below).</p>
<h1><a class="anchor" id="autotoc_md21"></a>
Install from the vcpkg package manager</h1>
<p>This is particularly easy, and works on Mac OS, Linux and Microsoft Windows:</p>
<div class="fragment"><div class="line">vcpkg install llfio</div>
</div><!-- fragment --><p>LLFIO appears at <code>&lt;llfio/llfio.hpp&gt;</code>.</p>
<h1><a class="anchor" id="autotoc_md22"></a>
Prebuilt binaries</h1>
<p>It is faster to build programs using LLFIO if you don't use a header only build. In this situation, define <code>LLFIO_HEADERS_ONLY=0</code>, and choose one of <code>LLFIO_DYN_LINK</code> or <code>LLFIO_STATIC_LINK</code> depending on whether you are using the prebuilt shared or static libraries respectively.</p>
<p>You can find prebuilt binaries for Mac OS, Ubuntu and Microsoft Windows at <a href="https://github.com/ned14/llfio/releases">https://github.com/ned14/llfio/releases</a>. Choose a release, and under the Assets you will find the prebuilt binaries packages which include headers.</p>
<h1><a class="anchor" id="autotoc_md23"></a>
Get a copy of the source</h1>
<p>Clone from the GitHub repository:</p>
<div class="fragment"><div class="line">git config --system core.longpaths true</div>
<div class="line">git clone --recursive https://github.com/ned14/llfio.git</div>
<div class="line">cd llfio</div>
</div><!-- fragment --><p>The first command is relevant so deeply nested paths on Windows will work when cloning the repository and submodules. It may require elevated privileges, but you can also use <code>git config --global core.longpaths true</code> instead.</p>
<h2><a class="anchor" id="autotoc_md24"></a>
If you already cloned before reading this</h2>
<p>If you had already cloned <em>this</em> repository, but didn't use the <code>--recursive</code> switch, you can simply run the following command from inside the work tree:</p>
<div class="fragment"><div class="line">git submodule update --init --recursive</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md25"></a>
Build static libraries from source</h1>
<p>You will need <a href="https://cmake.org/">CMake</a> installed, v3.5 or better. It is important to do an out-of-tree build, because the build will otherwise fail.</p>
<p>If you want C++ Coroutines support, you will need a C++ Coroutines supporting compiler. It should get automatically discovered and detected, however note that on Linux you currently need a very recent clang combined with a very recent libc++ as no recent GCC implements C++ Coroutines yet. For Debian/Ubuntu, <code>apt install libc++-dev-9 libc++abi-dev-9</code> might do it.</p>
<p>To build and test on POSIX (<code>make</code>, <code>ninja</code> etc):</p>
<div class="fragment"><div class="line">mkdir build</div>
<div class="line">cd build</div>
<div class="line">cmake ..</div>
<div class="line">cmake --build .</div>
<div class="line">ctest -R llfio_sl</div>
</div><!-- fragment --><p>To build and test on Windows or Mac OS (Visual Studio, XCode etc):</p>
<div class="fragment"><div class="line">mkdir build</div>
<div class="line">cd build</div>
<div class="line">cmake .. -G&lt;your generator here&gt;</div>
<div class="line">cmake --build . --config Release</div>
<div class="line">ctest -C Release -R llfio_sl</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md26"></a>
Build shared libraries from source</h1>
<p>You will need <a href="https://cmake.org/">CMake</a> installed, v3.5 or better. It is important to do an out-of-tree build, because the build will otherwise fail.</p>
<p>To build and test on POSIX (<code>make</code>, <code>ninja</code> etc):</p>
<div class="fragment"><div class="line">mkdir build</div>
<div class="line">cd build</div>
<div class="line">cmake ..</div>
<div class="line">cmake --build . -- _dl</div>
<div class="line">ctest -R llfio_dl</div>
</div><!-- fragment --><p>To build and test on Windows or Mac OS (Visual Studio, XCode etc):</p>
<div class="fragment"><div class="line">mkdir build</div>
<div class="line">cd build</div>
<div class="line">cmake .. -G&lt;your generator here&gt;</div>
<div class="line">cmake --build . --config Release --target _dl</div>
<div class="line">ctest -C Release -R llfio_dl</div>
</div><!-- fragment --><h1><a class="anchor" id="autotoc_md27"></a>
Installing libraries from source</h1>
<div class="fragment"><div class="line">mkdir build</div>
<div class="line">cd build</div>
<div class="line">cmake ..</div>
<div class="line">cmake --build . -- _dl _sl _hl</div>
<div class="line">cmake --build . --target install</div>
</div><!-- fragment --> </div></div><!-- contents -->
</div><!-- PageDoc -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>