在OS X上构建valgrind [英] Building valgrind on OS X

查看:966
本文介绍了在OS X上构建valgrind的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在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:error:请使用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苹果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



苹果LLVM
版本8.1.0(clang-802.0.42)目标:x86_64-apple-darwin16.7.0
线程模型:posix InstalledDir:
/ Library / Developer / CommandLineTools / usr / bin

我不知道如何检查icc> = 13.0



这里有什么不对?

解决方案

使用a安装通常更容易包管理器,例如



但是如果需要,您也可以在命令行中使用它。


I was trying to install valgrind on macOS Sierra (version 10.12.6). While running ./configure.sh, this error showed up:

checking for a supported version of gcc... Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 no (applellvm-8.1.0) configure: error: please use gcc >= 3.0 or clang >= 2.9 or icc >= 13.0

So, I checked my gcc and clang version. The responses are as follows:

Ankits-MacBook-Air:valgrind ankitshubham$ gcc --version

Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 8.1.0 (clang-802.0.42) Target: x86_64-apple-darwin16.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Ankits-MacBook-Air:valgrind ankitshubham$ clang --version

Apple LLVM version 8.1.0 (clang-802.0.42) Target: x86_64-apple-darwin16.7.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin

I don't know how to check if icc>=13.0

What is wrong here?

解决方案

With any popular cross-platform package like this it's usually easier to just install with a package manager such as Homebrew. Then you just brew install valgrind and you're done.

Note also that clang and the Apple developer tools already have similar useful debugging tools, particularly clang's address sanitizer and the malloc debug stuff - this is easily accessible from within Xcode's project settings:

but you can also use it from the command line if needed.

这篇关于在OS X上构建valgrind的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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