【问题标题】:__uint128 does not name a type__uint128 没有命名类型
【发布时间】:2022-01-21 09:58:00
【问题描述】:

我正在尝试在 aarch64-linux-gnu 上编译 cmake-3.21.4。我收到以下错误

e/root/cmake-3.21.4/Utilities  -c /home/root/cmake-3.21.4/Source/cmUVHandlePtr.cxx -o cmUVHandlePtr.o
In file included from /usr/include/bits/sigcontext.h:30,
                 from /usr/include/signal.h:301,
                 from /usr/include/sys/param.h:28,
                 from /home/root/cmake-3.21.4/Utilities/cmlibuv/include/uv/unix.h:41,
                 from /home/root/cmake-3.21.4/Utilities/cmlibuv/include/uv.h:70,
                 from /home/root/cmake-3.21.4/Utilities/cm3p/uv.h:10,
                 from /home/root/cmake-3.21.4/Source/cmUVHandlePtr.h:11,
                 from /home/root/cmake-3.21.4/Source/cmUVHandlePtr.cxx:4:
/usr/include/c++/11.2.0/bits/std_abs.h:84:29: error: '__uint128' does not name a type; did you mean '__int128'?
   84 |   inline _GLIBCXX_CONSTEXPR __GLIBCXX_TYPE_INT_N_0
      |                             ^~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11.2.0/chrono:41,
                 from /usr/include/c++/11.2.0/mutex:39,
                 from /home/root/cmake-3.21.4/Source/cmUVHandlePtr.cxx:8:
/usr/include/c++/11.2.0/limits:1635:11: error: '__uint128' was not declared in this scope; did you mean '__int128'?
 1635 |   __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0,
      |           ^~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11.2.0/limits:1635:3: error: template argument 1 is invalid
 1635 |   __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0,
      |   ^~~~~~~
/usr/include/c++/11.2.0/limits:1635:3: error: template argument 1 is invalid
 1635 |   __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0,
      |   ^~~~~~~

我已经通过 cmake 源搜索 __uint128 没有结果。这可能是我的 c++ 包含或 gcc 的问题。我该怎么办?

【问题讨论】:

    标签: cmake compiler-errors


    【解决方案1】:

    我遇到了几乎相同的问题,我的解决方案是将此代码粘贴到给出错误的文件中:

        typedef unsigned __int128 __uint128;
    

    这段代码只是声明了__uint128

    【讨论】:

      猜你喜欢
      • 2023-04-07
      • 2021-02-03
      • 2017-04-01
      • 2015-06-09
      • 2016-04-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多