简体   繁体   English

为手臂编译oprofile时出错

[英]Error compiling oprofile for arm

I am cross compiling oprofile for arm. 我正在交叉编译oprofile。

$ export CC=arm-linux-gnueabi-gcc
$ export CXX=arm-linux-gnueabi-g++
$ export CXXCPP='arm-linux-gnueabi-g++ -E'
$ export CPP='arm-linux-gnueabi-gcc -E'

I get the following error (see the last line) 我收到以下错误(请参阅最后一行)

checking for ld... /usr/arm-linux-gnueabi/bin/ld
checking /usr/include/linux/perf_event.h usability... yes
checking /usr/include/linux/perf_event.h presence... yes
checking for /usr/include/linux/perf_event.h... yes
checking kernel supports perf_events... yes
checking whether PERF_RECORD_MISC_GUEST_KERNEL is defined in perf_event.h... yes
checking whether precise_ip is defined in perf_event.h... yes
checking whether malloc attribute is understood... no
checking whether __builtin_expect is understood... yes
checking for sched_setaffinity... yes
checking for perfmonctl... no
checking for poptGetContext in -lpopt... no

configure: error: popt library not found

If I do not set my CXX, CPP to cross-compiler binaries then the configure step completes just fine, without errors. 如果我未将CXX,CPP设置为交叉编译器二进制文件,则配置步骤将正常完成,而不会出现错误。

How can I fix this? 我怎样才能解决这个问题?

oprofile package has the following dependencies oprofile软件包具有以下依赖性

1) popt 1)Popt

2) binutils 2)binutils

The popt and binutils package provides libraries which are used by oprofile. popt和binutils软件包提供oprofile使用的库。 So compile popt and binutils first. 因此,首先编译popt和binutils。 You can also refer the below link 您也可以参考以下链接

http://bylnote.blogspot.in/2014/04/cross-compile-oprofile-for-arm-linux.html http://bylnote.blogspot.in/2014/04/cross-compile-oprofile-for-arm-linux.html

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM