Hi, I'm trying to cross-compile a program to run on arm versatile juno r2 development platform. The system where I'm compilling is:Linux lfpm1993-virtual-machine 4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/LinuxThe host where the application will be run is:Linux localhost 4.9.51 #1 SMP PREEMPT Tue Feb 13 06:21:18 UTC 2018 aarch64To compile I executed this command:./configure --host=aarch64-linux-gnu --prefix=/data/data/papi --with-ffsll --with-walltimer=cycle --with-tls=__thread --with-virtualtimer=perfctr --with-perf-events --with-arch=aarch64 --with-CPU=armFollowed up, by running:sudo makesudo make installAfter the instalattion, the binary files were place here, /data/data/papi, as expected.Typing ls shows:bin include lib shareI then executed:adb connect 146.193.56.204adb push /data/data/papi /data/data/papiadb shellcd data/data/papi/bin/Typing ls shows:1|juno:/data/data/papi/bin # lspapi_avail papi_decode papi_native_avail papi_clockres papi_error_codes papi_version papi_command_line papi_event_chooser papi_xml_event_info papi_component_avail papi_mem_info papi_cost papi_multiplex_costAnd this part is where I can't make it work, if I try to execute for example, papi_avail:./papi_availThis is the output message:/system/bin/sh: ./papi_avail: No such file or directoryTrying with sh:1|juno:/data/data/papi/bin # sh ./papi_avail ./papi_avail[2]: syntax error: 'ďż˝1' unexpected./papi_avail[1]: ELF��2@@Hďż˝@8: not foundSo, my question is what i did wrong and how can I solve it?Thanks, for your help:Luís Martins
Thanks Steven Miao for your reply it helped me more than you could've imagined, it made me found the anwer and get it working!
Steven Miao said:It seems you are running android on arm versatile juno r2, and the aarch64-linux-gnu is linaro toolchian?
Yes, it is! This are the toolchains I have currently installed:
Steven Miao said:Quick solution is to compile a static version of papi. Most of tests and benchmark tools will use this solution to run on android system.
The configure options I had avaiable were:This is the configuration commands I executed and the resulting logs:
lfpm1993@lfpm1993-virtual-machine:~/Desktop/papi/src$ ./configure --host=aarch64-linux-gnu --prefix=/data/data/papi --with-static-lib=yes --with-shared-lib=no --with-static-tools --with-arch=aarch64 --with-CPU=arm --with-ffsll --with-walltimer=cycle --with-tls=__thread --with-virtualtimer=perfctr --with-perf-events checking for architecture... aarch64 checking for OS... linux checking for OS version... 4.13.0-43-generic checking for perf_event workaround level... autodetect checking for if MIC should be used... no checking for aarch64-linux-gnu-xlc... no checking for aarch64-linux-gnu-icc... no checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether aarch64-linux-gnu-gcc accepts -g... yes checking for aarch64-linux-gnu-gcc option to accept ISO C89... none needed checking for aarch64-linux-gnu-xlf... no checking for aarch64-linux-gnu-ifort... no checking for aarch64-linux-gnu-gfortran... no checking for aarch64-linux-gnu-f95... no checking for aarch64-linux-gnu-f90... no checking for aarch64-linux-gnu-f77... no checking for xlf... no checking for ifort... no checking for gfortran... no checking for f95... no checking for f90... no checking for f77... no checking whether we are using the GNU Fortran 77 compiler... no checking whether accepts -g... no checking for mpicc... no checking for gawk... gawk checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E checking whether ln -s works... yes checking whether make sets $(MAKE)... yes checking for aarch64-linux-gnu-ranlib... aarch64-linux-gnu-ranlib checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking minix/config.h usability... no checking minix/config.h presence... no checking for minix/config.h... no checking whether it is safe to define __EXTENSIONS__... yes checking for ANSI C header files... (cached) yes checking for inline... inline checking whether time.h and sys/time.h may both be included... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking c_asm.h usability... no checking c_asm.h presence... no checking for c_asm.h... no checking intrinsics.h usability... no checking intrinsics.h presence... no checking for intrinsics.h... no checking mach/mach_time.h usability... no checking mach/mach_time.h presence... no checking for mach/mach_time.h... no checking sched.h usability... yes checking sched.h presence... yes checking for sched.h... yes checking for gethrtime... no checking for read_real_time... no checking for time_base_to_time... no checking for clock_gettime... yes checking for mach_absolute_time... no checking for sched_getcpu... yes checking for dlopen and dlerror symbols in base system... not found checking for dlopen and dlerror symbols in -ldl... found checking for native compiler for header generation... gcc checking for debug build... checking for -Wno-override-init... 1 checking for CPU type... arm forcing use of pthread mutexes... checking for ffsll... yes checking for working gettid... no checking for working syscall(SYS_gettid)... yes checking for which real time clock to use... cycle checking for high performance thread local storage... __thread checking for which virtual timer to use... perfctr checking for static user preset events... no checking for static PAPI preset events... yes checking for whether to build static library... yes checking for whether to build shared library... no checking for static compile of tests and utilities... yes checking for linking with papi shared library of tests and utilities... no checking platform... linux-pe checking for components to build... perf_event perf_event_uncore checking for PAPI event CSV filename to use... papi_events.csv configure: Compiling genpapifdef with gcc because cross compiling configure: Generating fpapi.h configure: Generating f77papi.h configure: Generating f90papi.h configure: Rules.pfm4_pe will be included in the generated Makefile configure: creating ./config.status config.status: creating Makefile config.status: creating papi.pc config.status: creating components/Makefile_comp_tests.target config.status: creating testlib/Makefile.target config.status: creating utils/Makefile.target config.status: creating ctests/Makefile.target config.status: creating ftests/Makefile.target config.status: creating validation_tests/Makefile.target config.status: creating config.h lfpm1993@lfpm1993-virtual-machine:~/Desktop/papi/src$ sudo make make -C libpfm4 ARCH="aarch64" CC="aarch64-linux-gnu-gcc -Wno-override-init" lib make[1]: Entering directory '/home/lfpm1993/Desktop/papi/src/libpfm4' make -C lib make[2]: Entering directory '/home/lfpm1993/Desktop/papi/src/libpfm4/lib' aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_common.c aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event_pmu.c aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event.c aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event_raw.c aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_arm_perf_event.c aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_arm.c aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_arm_armv8.c rm -f libpfm.a ar cq libpfm.a pfmlib_common.o pfmlib_perf_event_pmu.o pfmlib_perf_event.o pfmlib_perf_event_raw.o pfmlib_arm_perf_event.o pfmlib_arm.o pfmlib_arm_armv8.o aarch64-linux-gnu-gcc -Wno-override-init -fPIC -DPIC -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_common.c -o pfmlib_common.lo aarch64-linux-gnu-gcc -Wno-override-init -fPIC -DPIC -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event_pmu.c -o pfmlib_perf_event_pmu.lo aarch64-linux-gnu-gcc -Wno-override-init -fPIC -DPIC -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event.c -o pfmlib_perf_event.lo aarch64-linux-gnu-gcc -Wno-override-init -fPIC -DPIC -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_perf_event_raw.c -o pfmlib_perf_event_raw.lo aarch64-linux-gnu-gcc -Wno-override-init -fPIC -DPIC -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_arm_perf_event.c -o pfmlib_arm_perf_event.lo aarch64-linux-gnu-gcc -Wno-override-init -fPIC -DPIC -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_arm.c -o pfmlib_arm.lo aarch64-linux-gnu-gcc -Wno-override-init -fPIC -DPIC -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -c pfmlib_arm_armv8.c -o pfmlib_arm_armv8.lo aarch64-linux-gnu-gcc -Wno-override-init -g -Wall -Werror -Wextra -Wno-unused-parameter -I. -I/home/lfpm1993/Desktop/papi/src/libpfm4/lib/../include -DCONFIG_PFMLIB_DEBUG -DCONFIG_PFMLIB_OS_LINUX -D_REENTRANT -I. -fvisibility=hidden -DCONFIG_PFMLIB_ARCH_ARM64 -I. -shared -Wl,-soname -Wl,libpfm.so.4 -o libpfm.so.4.9.0 pfmlib_common.lo pfmlib_perf_event_pmu.lo pfmlib_perf_event.lo pfmlib_perf_event_raw.lo pfmlib_arm_perf_event.lo pfmlib_arm.lo pfmlib_arm_armv8.lo ln -sf libpfm.so.4.9.0 libpfm.so.4 ln -sf libpfm.so.4.9.0 libpfm.so make[2]: Leaving directory '/home/lfpm1993/Desktop/papi/src/libpfm4/lib' make[1]: Leaving directory '/home/lfpm1993/Desktop/papi/src/libpfm4' make make[1]: Entering directory '/home/lfpm1993/Desktop/papi/src' Host architecture : Linux with perf_event kernel support and libpfm4 Host CPU component : perf_event Installation DESTDIR: Installation PREFIX : /data/data/papi Installation EPREFIX: /data/data/papi Installation INCDIR : /data/data/papi/include Installation LIBDIR : /data/data/papi/lib Installation BINDIR : /data/data/papi/bin Installation MANDIR : /data/data/papi/share/man Installation DOCDIR : /data/data/papi/share/doc/papi Installation DATADIR: /data/data/papi/share/papi ar xv libpfm4/lib/libpfm.a x - pfmlib_common.o x - pfmlib_perf_event_pmu.o x - pfmlib_perf_event.o x - pfmlib_perf_event_raw.o x - pfmlib_arm_perf_event.o x - pfmlib_arm.o x - pfmlib_arm_armv8.o sh papi_events_table.sh papi_events.csv > papi_events_table.h aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_libpfm4_events.c -o papi_libpfm4_events.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi.c -o papi.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_internal.c -o papi_internal.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_hl.c -o papi_hl.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c extras.c -o extras.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c sw_multiplex.c -o sw_multiplex.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_fwrappers.c -o papi_fwrappers.o aarch64-linux-gnu-gcc -E -DFORTRANUNDERSCORE papi_fwrappers.c > papi_fwrappers_.c aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_fwrappers_.c -o papi_fwrappers_.o aarch64-linux-gnu-gcc -E -DFORTRANDOUBLEUNDERSCORE papi_fwrappers.c > papi_fwrappers__.c aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_fwrappers__.c -o papi_fwrappers__.o aarch64-linux-gnu-gcc -E -DFORTRANCAPS papi_fwrappers.c > upper_PAPI_FWRAPPERS.c aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c upper_PAPI_FWRAPPERS.c -o upper_PAPI_FWRAPPERS.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c threads.c -o threads.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c cpus.c -o cpus.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c linux-memory.c -o linux-memory.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c linux-timer.c -o linux-timer.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c linux-common.c -o linux-common.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_preset.c -o papi_preset.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_vector.c -o papi_vector.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c papi_memory.c -o papi_memory.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c components/perf_event/perf_event.c -o perf_event.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -c components/perf_event/pe_libpfm4_events.c -o pe_libpfm4_events.o aarch64-linux-gnu-gcc -DPAPI_NO_MEMORY_MANAGEMENT -DSTATIC_PAPI_EVENTS_TABLE -DUSE_PERFEVENT_RDPMC=1 -DPEINCLUDE=\"libpfm4/include/perfmon/perf_event.h\" -D_REENTRANT -D_GNU_SOURCE -DUSE_COMPILER_TLS -Ilibpfm4/include -fvisibility=hidden -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -DOSLOCK=\"linux-lock.h\" -DOSCONTEXT=\"linux-context.h\" -O2 -Icomponents/perf_event/ -c components/perf_event_uncore/perf_event_uncore.c -o perf_event_uncore.o rm -f libpapi.a ar rv libpapi.a pfmlib_common.o pfmlib_perf_event_pmu.o pfmlib_perf_event.o pfmlib_perf_event_raw.o pfmlib_arm_perf_event.o pfmlib_arm.o pfmlib_arm_armv8.o papi_libpfm4_events.o papi.o papi_internal.o papi_hl.o extras.o sw_multiplex.o papi_fwrappers.o papi_fwrappers_.o papi_fwrappers__.o upper_PAPI_FWRAPPERS.o threads.o cpus.o linux-memory.o linux-timer.o linux-common.o papi_preset.o papi_vector.o papi_memory.o perf_event.o pe_libpfm4_events.o perf_event_uncore.o ar: creating libpapi.a a - pfmlib_common.o a - pfmlib_perf_event_pmu.o a - pfmlib_perf_event.o a - pfmlib_perf_event_raw.o a - pfmlib_arm_perf_event.o a - pfmlib_arm.o a - pfmlib_arm_armv8.o a - papi_libpfm4_events.o a - papi.o a - papi_internal.o a - papi_hl.o a - extras.o a - sw_multiplex.o a - papi_fwrappers.o a - papi_fwrappers_.o a - papi_fwrappers__.o a - upper_PAPI_FWRAPPERS.o a - threads.o a - cpus.o a - linux-memory.o a - linux-timer.o a - linux-common.o a - papi_preset.o a - papi_vector.o a - papi_memory.o a - perf_event.o a - pe_libpfm4_events.o a - perf_event_uncore.o cd testlib; make make[2]: Entering directory '/home/lfpm1993/Desktop/papi/src/testlib' aarch64-linux-gnu-gcc -I. -I.. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -O1 -c test_utils.c ar rv libtestlib.a test_utils.o ar: creating libtestlib.a a - test_utils.o aarch64-linux-gnu-gcc -I. -I.. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -O1 -O0 -c do_loops.c aarch64-linux-gnu-gcc -I. -I.. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -O1 -c clockcore.c make[2]: Leaving directory '/home/lfpm1993/Desktop/papi/src/testlib' cd utils && make make[2]: Entering directory '/home/lfpm1993/Desktop/papi/src/utils' aarch64-linux-gnu-gcc -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -O2 -I../testlib -I.. -I. -c papi_avail.c aarch64-linux-gnu-gcc -I../testlib -I.. -I. -g -Wextra -DUSE_PTHREAD_MUTEXES -Wall -O2 -c print_header.c aarch64-linux-gnu-gcc -ldl -static -o papi_avail papi_avail.o print_header.o ../libpapi.a ../libpapi.a(papi.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_internal.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_hl.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_hl.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(extras.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(extras.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(extras.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(extras.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(sw_multiplex.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(sw_multiplex.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(threads.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(threads.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(threads.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(threads.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(threads.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(threads.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(threads.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(threads.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(threads.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(threads.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(threads.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(threads.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(cpus.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(cpus.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(cpus.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(cpus.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(linux-common.o): In function `_linux_init_locks': /home/lfpm1993/Desktop/papi/src/linux-common.c:44: undefined reference to `pthread_mutex_init' ../libpapi.a(papi_memory.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_memory.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(pe_libpfm4_events.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/./threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(pe_libpfm4_events.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/./threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(pe_libpfm4_events.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/./threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(pe_libpfm4_events.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/./threads.h:81: undefined reference to `pthread_mutex_unlock' /home/lfpm1993/Desktop/papi/src/./threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(pe_libpfm4_events.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/./threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(pe_libpfm4_events.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/./threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_libpfm4_events.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_libpfm4_events.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' ../libpapi.a(papi_libpfm4_events.o): In function `_papi_hwi_lock': /home/lfpm1993/Desktop/papi/src/threads.h:67: undefined reference to `pthread_mutex_lock' ../libpapi.a(papi_libpfm4_events.o): In function `_papi_hwi_unlock': /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' /home/lfpm1993/Desktop/papi/src/threads.h:81: undefined reference to `pthread_mutex_unlock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info.part.6': (.text+0x15e0): undefined reference to `pthread_mutex_lock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info.part.6': (.text+0x1600): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases': (.text+0x1674): undefined reference to `pthread_mutex_lock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_bases': (.text+0x1694): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases': (.text+0x175c): undefined reference to `pthread_mutex_lock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__register_frame_info_table_bases': (.text+0x177c): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases': (.text+0x1818): undefined reference to `pthread_mutex_lock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `__deregister_frame_info_bases': (.text+0x18c4): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE': (.text+0x1990): undefined reference to `pthread_mutex_lock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE': (.text+0x19e0): undefined reference to `pthread_mutex_unlock' /usr/lib/gcc-cross/aarch64-linux-gnu/5/libgcc_eh.a(unwind-dw2-fde-dip.o): In function `_Unwind_Find_FDE': (.text+0x1ac8): undefined reference to `pthread_mutex_unlock' collect2: error: ld returned 1 exit status Makefile:19: recipe for target 'papi_avail' failed make[2]: *** [papi_avail] Error 1 make[2]: Leaving directory '/home/lfpm1993/Desktop/papi/src/utils' Makefile.inc:234: recipe for target 'utils' failed make[1]: *** [utils] Error 2 make[1]: Leaving directory '/home/lfpm1993/Desktop/papi/src' Rules.pfm4_pe:42: recipe for target 'libpfm4/lib/libpfm.a' failed make: *** [libpfm4/lib/libpfm.a] Error 2
I will expand a little bit further the anwer. I asked PAPI support and Vince was kind enough to give me his input on this, I will copy/paste his reply:
> It mostly just looks like "-lpthread" should be in the LFLAGS for the > utils and it's not there for some reason. > > I will see if I can figure out what's going on. It looks like it's not related to cross-compile, but rather you can make this happen natively if you build statically and also have --with-pthread-mutexes set (which is the default for ARM). Adding -lpthread to the end of (or after) $(PAPILIB) fixes this but have no idea the proper way to get configure to do this for us.
Hi Luís,
I guess if you chose to build static PAPI lib and tools, it will use pthread_lock and link to pthread lib, if you use default dynamic lib, it will use PAPI_lock() and will not link to pthread lib.