shell - 使[] : *** [ ] Error 1

标签 shell gcc makefile

我正在尝试在 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 不包含此内容,要么修复 strings.c 中的 stat64 is deprecated 警告!

关于shell - 使[] : *** [ ] Error 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21062244/

相关文章:

c - 如何在 Linux 中找到 C 编程语言的头文件?

c++ - 用于 linux 的最小 c++ make 文件

javascript - 自定义目标/运行任意代码

linux - "Argument list too long"显示所有列表元素

linux - 在 mv 命令中嵌入 bash 命令

shell - 如何在任何时候恢复 ftp 下载? (shell 脚本,wget 选项)?

makefile - $ +在makefile中

linux - 将 .XLS 转换为 CSV

c++ - glibcxx STL 在其 std::valarray::sum() 的实现中是否不正确?

c++ - 构造函数不能采用非常量引用