在参考这篇文章安装glicb 2.25时,走到make步骤时报错:

 ./../include/libc-symbols.h:413:26: error: '__EI___errno_location' specifies less restrictive attributes than its target '__errno_location': 'const', 'nothrow' [-Werror=missing-attributes]
|   413 |   extern __typeof (name) __EI_##name \
|       |                          ^~~~~
| ./../include/libc-symbols.h:417:29: note: in expansion of macro '__hidden_ver1'
|   417 | #  define hidden_def(name)  __hidden_ver1(__GI_##name, name, name);
|       |                             ^~~~~~~~~~~~~
| ./../include/libc-symbols.h:468:32: note: in expansion of macro 'hidden_def'
|   468 | # define libc_hidden_def(name) hidden_def (name)
|       |                                ^~~~~~~~~~
| errno-loc.c:28:1: note: in expansion of macro 'libc_hidden_def'
|    28 | libc_hidden_def (__errno_location)
|       | ^~~~~~~~~~~~~~~
| errno-loc.c:24:1: note: '__EI___errno_location' target declared here
|    24 | __errno_location (void)
|       | ^~~~~~~~~~~~~~~~

当前我的gcc版本为9.1.0,查到说需要降为8.2.0,试了下不行

搜了下只有这个管用:

  1. 再次输入configure,只是在最后加上--disable-werror
../configure  --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-werror

  1. 然后重新运行make即可
09-22 11:10