加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

shell – make []:*** []错误1

发布时间:2020-12-15 21:09:58 所属栏目:安全 来源:网络整理
导读:我试图在 gcc上编译一个文件,我的’make’命令似乎抛出一个错误. Rishabhs-MacBook-Pro:binutils-2.20.1 Rishabh$makemake[3]: Nothing to be done for `all'.make[2]: Nothing to be done for `all'.Making info in docmake chewmake[4]: `chew' is up to d
我试图在 gcc上编译一个文件,我的’make’命令似乎抛出一个错误.

Rishabhs-MacBook-Pro:binutils-2.20.1 Rishabh$make
make[3]: Nothing to be done for `all'.
make[2]: Nothing to be done for `all'.
Making info in doc
make chew
make[4]: `chew' is up to date.
./chew -f ./doc.str  <./../opncls.c >opncls.tmp
/bin/sh ./../../move-if-change opncls.tmp opncls.texi
Making info in po
...
...
make[4]: Nothing to be done for `all'.
gcc -DHAVE_CONFIG_H -I.  -I. -I. -I../bfd -I./../bfd -I./../include -        DLOCALEDIR=""/usr/local/share/locale"" -Dbin_dummy_emulation=bin_vanilla_emulation  -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Werror -g -O2 -MT strings.o -MD -MP -MF .deps/strings.Tpo -c -o strings.o strings.c
cc1: warnings being treated as errors
strings.c: In function ‘strings_file’:
strings.c:419: warning: ‘stat64’ is deprecated (declared at /usr/include/sys/stat.h:466)
make[4]: *** [strings.o] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-binutils] Error 2
make: *** [all] Error 2

我认为问题可能在于gcc,但我似乎无法解决这个问题.任何帮助,将不胜感激.

解决方法

您在gcc命令行上有-Werror标志.正如输出所说:

cc1: warnings being treated as errors

所以要么改变你的makefile不要包含这个,要么修复了在string.c中不推荐使用stat64的警告!

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读