I am cross compiling oprofile for arm.
$ 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.
How can I fix this?