Pytorch Build Error

Vetti420: <p>Hi, I setup new Conda env and followed git to build from source, I got this error, It also instead all the requirements.txt without error.</p>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:366:129: error:<br>
‘_Float64x’ was not declared in this scope; did you mean<br>
‘_Float16’?</p>
<pre><code>366 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
    |                                                                                                                                 ^
    |                                                                                                                                 _Float16
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:366:144: error: expected<br>
primary-expression before ‘int’</p>
<pre><code>366 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
    |                                                                                                                                                ^
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:366:157: error: expected<br>
primary-expression before ‘unsigned’</p>
<pre><code>366 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
    |                                                                                                                                                             ^
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:366:173: error: expression<br>
list treated as compound expression in initializer [-fpermissive]</p>
<pre><code>366 | __MATHDECL (__uintmax_t, ufromfpx,, (_Mdouble_ __x, int __round,
    |                                                                                                                                                                             ^
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:370:29: error:<br>
‘_Float64x’ was not declared in this scope; did you mean<br>
‘_Float16’?</p>
<pre><code>370 | __MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
    |                             ^~~~~~~~~
    |                             _Float16
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:370:41: error: ‘__cx’<br>
was not declared in this scope</p>
<pre><code>370 | __MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
    |                                         ^~~~
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:370:47: error: expected<br>
primary-expression before ‘const’</p>
<pre><code>370 | __MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
    |                                               ^~~~~
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:370:68: error: expression<br>
list treated as compound expression in initializer [-fpermissive]</p>
<pre><code>370 | __MATHDECL_1 (int, canonicalize,, (_Mdouble_ *__cx, const _Mdouble_ *__x));
    |                                                                    ^
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:377:8: error:<br>
‘_Float64x’ does not name a type; did you mean ‘_Float16’?</p>
<pre><code>377 | __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
    |        ^~~~~~~~~
    |        _Float16
</code></pre>
<p>/usr/include/x86_64-linux-gnu/bits/mathcalls.h:377:104: error:<br>
‘_Float64x’ does not name a type; did you mean ‘_Float16’?</p>
<pre><code>377 | __MATHCALLX (fmaxmag,, (_Mdouble_ __x, _Mdouble_ __y), (__const__));
</code></pre>

devut: <p>Were you able to solve this? I’m facing the same error.</p>

Hamza_Javaid: <p>Can you check your gcc version and check its compatibility with Conda.<br>
Upgrade your gcc as well</p>
<pre><code class="lang-auto">sudo apt-get install build-essential gcc g++
</code></pre>
<p>Then set the appropriate compiler flags before rebuilding</p>