【问题标题】:When I "make" valgrind, I got error当我“制作” valgrind 时,我得到了错误
【发布时间】:2012-06-12 05:18:16
【问题描述】:
Andy@Macbook-Pro~/test/valgrind-3.6.1$ make
make  all-recursive
Making all in include
make[2]: Nothing to be done for `all'.
Making all in VEX
make  all-am
gcc -DHAVE_CONFIG_H -I. -I..  -I.. -I../include -I../VEX/pub -DVGA_amd64=1 -DVGO_darwin=1 -DVGP_amd64_darwin=1 -Ipriv   -arch x86_64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-format-zero-length -fno-strict-aliasing -mmacosx-version-min=10.5 -fno-stack-protector -Wbad-function-cast -Wcast-qual -Wcast-align -fstrict-aliasing -Wno-long-long  -Wno-pointer-sign -fno-stack-protector -MT libvex_amd64_darwin_a-main_globals.o -MD -MP -MF .deps/libvex_amd64_darwin_a-main_globals.Tpo -c -o libvex_amd64_darwin_a-main_globals.o `test -f 'priv/main_globals.c' || echo './'`priv/main_globals.c
cc1: error: unrecognized command line option ‘-arch’
make[3]: *** [libvex_amd64_darwin_a-main_globals.o] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

这是我执行“./configure”后消息的结尾部分

   Maximum build arch: amd64
     Primary build arch: amd64
   Secondary build arch: x86
               Build OS: darwin
   Primary build target: AMD64_DARWIN
 Secondary build target: X86_DARWIN
     Default supp files: exp-ptrcheck.supp xfree-3.supp xfree-4.supp darwin10-drd.supp darwin10.supp 

需要帮助。 谢谢

【问题讨论】:

  • 你有哪个版本的gcc?这个问题中描述的问题也可能适用于您:stackoverflow.com/questions/4391192/…
  • 听起来像是内存错误。您可以尝试使用 valgrind 来找到它。 (好吧,不,它没有,但我无法抗拒)!

标签: c valgrind


【解决方案1】:

您需要valgrind 3.7.0 才能在 Mac OS X Lion (10.7.x) 上构建,而 UR 报告说它也将在 Snow Leopard (10.6.x) 上构建。众所周知,valgrind 3.6.1 不是在 Mac OS X Lion 上构建的。

有一个基于 Snow Leopard 的早期版本,但已经很久了,我不记得确切的版本号了。 news 页面表明,在 2010 年 7 月,最初支持 Mac OS X Snow Leopard。我相信那是在valgrind 3.6.0。我仍然安装了 3.6.0,但我应该删除它,因为它不适用于 Lion。我无法让 3.6.1 工作,但这可能是 Lion 的一个问题(在 3.7.0 发布之前,我一直很苦恼)。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-07-23
    • 2018-11-30
    • 1970-01-01
    • 2017-04-08
    • 1970-01-01
    • 1970-01-01
    • 2021-02-05
    • 2015-02-04
    相关资源
    最近更新 更多