我试图在macOS Sierra上安装valgrind(版本10.12.6) . 运行./configure.sh时,出现此错误:
检查支持的gcc版本...配置: - prefix = / Library / Developer / CommandLineTools / usr --with-gxx-include-dir = / usr / include / c /4.2.1配置: - -prefix = / Library / Developer / CommandLineTools / usr --with-gxx-include-dir = / usr / include / c /4.2.1 no(applellvm-8.1.0)configure:错误:请使用gcc> = 3.0或clang> = 2.9或icc> = 13.0
所以,我检查了我的gcc和clang版本 . 答复如下:
Ankits-MacBook-Air:valgrind ankitshubham $ gcc --version配置: - prefix = / Library / Developer / CommandLineTools / usr --with-gxx-include-dir = / usr / include / c /4.2.1 Apple LLVM版本8.1.0(clang-802.0.42)目标:x86_64-apple-darwin16.7.0线程模型:posix InstalledDir:/ Library / Developer / CommandLineTools / usr / bin Ankits-MacBook-Air:valgrind ankitshubham $ clang --version Apple LLVM版本8.1.0(clang-802.0.42)目标:x86_64-apple-darwin16.7.0线程模型:posix InstalledDir:/ Library / Developer / CommandLineTools / usr / bin
我不知道如何检查icc> = 13.0
这有什么不对?
3 回答
对于像这样的任何流行的跨平台软件包,通常使用包管理器(如Homebrew)进行安装通常更容易 . 然后你就是
brew install valgrind
而且你已经完成了 .另请注意,clang和Apple开发人员工具已经有类似的有用的调试工具,特别是clang的地址清理程序和malloc调试工具 - 这可以从Xcode的项目设置中轻松访问:
但如果需要,您也可以从命令行使用它 .
您遇到的问题已在当前的开发回购中得到解决 .
如果你想构建valgrind而不是只使用包管理器克隆开发仓库(说明如下) . 我假设您没有寻找特定版本的valgrind,下面的说明将构建截至本文发布之日的版本3.14 .
我假设你刚刚下载了release tarball . 如果您改为克隆repository page上列出的git存储库,它将在Mac 10.12.6上构建得很好
来自valgrind存储库页面 .
上面的步骤在运行MacOS 10.12.6的帖子上的日期工作正常,安装了以下版本的clang .
跟着这些步骤: