1

有人尝试在 mac os 10.8 上安装 papi(performance API) 5.1.0 版吗?我在 make 命令上遇到以下错误。

zero_attach.c: In function ‘main’:
zero_attach.c:84: error: ‘PTRACE_ATTACH’ undeclared (first use in this function)
zero_attach.c:84: error: (Each undeclared identifier is reported only once
zero_attach.c:84: error: for each function it appears in.)
zero_attach.c:84: warning: passing argument 4 of ‘ptrace’ makes integer from pointer without a cast
zero_attach.c:117: error: ‘PTRACE_CONT’ undeclared (first use in this function)

INSTALL.txt 在 mac os 上什么也没说。只是说它可以安装没有程序所以我只尝试了提到的标准程序。

在 papi -> platform supported 的主页上,它没有说明有关 mac os 的任何内容。

我需要为此安装一些驱动程序吗?任何帮助都会很棒..

4

1 回答 1

2

我刚刚在 OS X v 10.9.1 上安装了最新版本的 PAPI (5.3.0)。按照安装文件中的说明也可以解决问题!

wget http://icl.cs.utk.edu/projects/papi/downloads/papi-5.3.0.tar.gz
tar -xvf papi-5.3.0.tar.gz
cd papi-5.3.0/src
./configure
make

我遇到的唯一问题是未定义的 malloc.h,这很容易通过制作一个虚拟 malloc.h 存根来解决

touch malloc.h

或者复制一个好的 malloc.h 到 src 目录

cp /System/Library/Frameworks/Kernel.framework/Versions/A/Headers/sys/malloc.h .

那么你应该没问题:

make
./run_tests.sh
make install

快乐的表现计数!

ps 我用 gcc-4.7.3 (随自制软件安装)做到了这一点。

于 2013-12-30T06:06:23.953 回答