在我的Mac上运行make gdb 7.6时出错 [英] Error while running make on gdb 7.6 on my mac

查看:164
本文介绍了在我的Mac上运行make gdb 7.6时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我碰到了我运行make for gdb的以下错误。
这是在使用i7内部处理器运行OS X 10.8.5的我的Mac上运行configure之后。

gcc版本



  $ gcc -v 
配置:--prefix = / Applications / Xcode.app /目录/ Developer / usr --withgxx-include-dir = / usr / include / c ++ / 4.2.1
Apple LLVM 5.0版(clang-500.2。 76)(基于LLVM 3.3svn
目标:x86_64-apple-darwin12.5.0
线程模型:posix



错误:



  /Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis .c:12078:18:错误:向字符串添加'char'不会附加到字符串[-Werror,-Wstring-plus-int] 
oappend(%st+ intel_syntax);
~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12078:18:注意:使用数组索引来消除这个警告
oappend(%st+ intel_syntax);
^
& []
/Users/sbala/Downloads/gdb-7.6/opcodes /i386-dis.c:12609:23:错误:将'char'添加到字符串不会附加到字符串[-Werror,-Wstring- plus-int]
oappend(%cs:+ intel_syntax);
~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12609: 23:注意:使用数组索引来消除这个警告
oappend(%cs:+ intel_syntax);
^
& []
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12614:23:错误:将'char'添加到字符串不会附加到字符串[-Werror,-Wstring -plus-int]
oappend(%ds:+ intel_syntax);
~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12614: 23:注意:使用数组索引来消除这个警告
oappend(%ds:+ intel_syntax);
^
& []
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12619:23:错误:将'char'添加到字符串不会追加到字符串[-Werror,-Wstring -plus-int]
oappend(%ss:+ intel_syntax);
~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12619: 23:注意:使用数组索引来消除这个警告
oappend(%ss:+ intel_syntax);
^
& []
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12624:23:错误:向字符串添加'char'不会追加到字符串[-Werror,-Wstring -plus-int]
oappend(%es:+ intel_syntax);
~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12624: 23:注意:使用数组索引来消除这个警告
oappend(%es:+ intel_syntax);
^
& []
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12629:23:错误:向字符串添加'char'不会追加到字符串[-Werror,-Wstring -plus-int]
oappend(%fs:+ intel_syntax);
~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12629: 23:注意:使用数组索引来消除这个警告
oappend(%fs:+ intel_syntax);
^
& []
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12634:23:错误:将'char'添加到字符串不会追加到字符串[-Werror,-Wstring -plus-int]
oappend(%gs:+ intel_syntax);
~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12634: 23:注意:使用数组索引来消除这个警告
oappend(%gs:+ intel_syntax);
^
& []
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:13973:19:错误:将'char'添加到字符串不会附加到字符串[-Werror,-Wstring -plus-int]
oappend(%es:+ intel_syntax);
~~~~~~~ ^ ~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:13973: 19:注意:使用数组索引来消除这个警告
oappend(%es:+ intel_syntax);
^
& []
生成8个错误。
make [4]:*** [i386-dis.lo]错误1
make [3]:*** [all-recursive]错误1
make [2]:* ** [all] Error 2
make [1]:*** [all-opcodes] Error 2
make:*** [all] Error 2
>

在OSX上构建gdb-7.6.1时,默认情况下启用了--enable-werror。

  ./configure --disable-werror 
make

对我很好。


I am hitting the following errors which I run make for gdb . This is after running configure on my mac running OS X 10.8.5 with i7 inter processor.

gcc version is

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --withgxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn    
Target: x86_64-apple-darwin12.5.0
Thread model: posix

Error:

/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12078:18: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
  oappend ("%st" + intel_syntax);
           ~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12078:18: note: use array indexing to silence this warning
  oappend ("%st" + intel_syntax);
                 ^
           &     [             ]
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12609:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
      oappend ("%cs:" + intel_syntax);
               ~~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12609:23: note: use array indexing to silence this warning
      oappend ("%cs:" + intel_syntax);
                      ^
               &      [             ]
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12614:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
      oappend ("%ds:" + intel_syntax);
               ~~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12614:23: note: use array indexing to silence this warning
      oappend ("%ds:" + intel_syntax);
                      ^
               &      [             ]
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12619:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
      oappend ("%ss:" + intel_syntax);
               ~~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12619:23: note: use array indexing to silence this warning
      oappend ("%ss:" + intel_syntax);
                      ^
               &      [             ]
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12624:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
      oappend ("%es:" + intel_syntax);
               ~~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12624:23: note: use array indexing to silence this warning
      oappend ("%es:" + intel_syntax);
                      ^
               &      [             ]
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12629:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
      oappend ("%fs:" + intel_syntax);
               ~~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12629:23: note: use array indexing to silence this warning
      oappend ("%fs:" + intel_syntax);
                      ^
               &      [             ]
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12634:23: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
      oappend ("%gs:" + intel_syntax);
               ~~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:12634:23: note: use array indexing to silence this warning
      oappend ("%gs:" + intel_syntax);
                      ^
               &      [             ]
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:13973:19: error: adding 'char' to a string does not append to the string [-Werror,-Wstring-plus-int]
  oappend ("%es:" + intel_syntax);
           ~~~~~~~^~~~~~~~~~~~~~
/Users/sbala/Downloads/gdb-7.6/opcodes/i386-dis.c:13973:19: note: use array indexing to silence this warning
  oappend ("%es:" + intel_syntax);
                  ^
           &      [             ]
8 errors generated.
make[4]: *** [i386-dis.lo] Error 1
make[3]: *** [all-recursive] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-opcodes] Error 2
make: *** [all] Error 2"

Let me know if you need more details.

解决方案

It looks like --enable-werror is enabled by default when building gdb-7.6.1 on OSX.

./configure --disable-werror
make

worked fine for me.

这篇关于在我的Mac上运行make gdb 7.6时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆