level 1
llx62599
楼主
setenv.c: In function '__unsetenv':
setenv.c:279:6: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=dangling-else]
if (ep != NULL)
^
cc1: all warnings being treated as errors
make[2]: *** [/export/home/lianglixin/Simpson_Setup_Linux_4.2.1/Simpson/glibc-2.23/build/stdlib/setenv.o] Error 1
make[2]: Leaving directory `/export/home/lianglixin/Simpson_Setup_Linux_4.2.1/Simpson/glibc-2.23/stdlib'
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory `/export/home/lianglixin/Simpson_Setup_Linux_4.2.1/Simpson/glibc-2.23'
make: *** [all] Error 2
我是个新手,搜索到了一些解决办法,但是
1.在setenv.c 文件里没有找到‘__unsetenv’函数的定义;
2.说要注释掉Makefile里含“-Werror”的语句,但这里的Makefile是gcc的还是glibc的,不太懂。它们的Makefile里面好像也没找到含“-Werror”的语句。
希望有人详细指点一下,非常感谢!
对了,gcc版本是8.1.0
2018年05月13日 12点05分
1
setenv.c:279:6: error: suggest explicit braces to avoid ambiguous 'else' [-Werror=dangling-else]
if (ep != NULL)
^
cc1: all warnings being treated as errors
make[2]: *** [/export/home/lianglixin/Simpson_Setup_Linux_4.2.1/Simpson/glibc-2.23/build/stdlib/setenv.o] Error 1
make[2]: Leaving directory `/export/home/lianglixin/Simpson_Setup_Linux_4.2.1/Simpson/glibc-2.23/stdlib'
make[1]: *** [stdlib/subdir_lib] Error 2
make[1]: Leaving directory `/export/home/lianglixin/Simpson_Setup_Linux_4.2.1/Simpson/glibc-2.23'
make: *** [all] Error 2
我是个新手,搜索到了一些解决办法,但是
1.在setenv.c 文件里没有找到‘__unsetenv’函数的定义;
2.说要注释掉Makefile里含“-Werror”的语句,但这里的Makefile是gcc的还是glibc的,不太懂。它们的Makefile里面好像也没找到含“-Werror”的语句。
希望有人详细指点一下,非常感谢!
对了,gcc版本是8.1.0