Build for Raspi with aarch64

49 views
Skip to first unread message

Ganesh Markandan

unread,
Jul 19, 2021, 4:39:28 AM7/19/21
to benchmark-discuss
Hi,

I would like to use this tool for aarch64 for linux (to be used in RasPi). I am currently using aarch64-linux-gnu-g++-8 compiler.

I do the following inside build.
mkdir build
cmake -E chdir "build" cmake -DCMAKE_BUILD_TYPE=Release ../ -D CMAKE_CXX_COMPILER=aarch64-linux-gnu-g++-8 -DHAVE_POSIX_REGEX=0
cmake --build "build" --config Release .

The build is successfull. however when I try to run the sample program. I get the below issue.

/home/gmarkandan/neon/./benchmark/build/src/libbenchmark.a(benchmark_runner.cc.o): In function benchmark::internal::BenchmarkRunner::DoNIterations()': benchmark_runner.cc:(.text+0x11e8): undefined reference to pthread_create'
benchmark_runner.cc:(.text+0x11f8): undefined reference to `pthread_create' .

So I update my CMakeLists.Txt with (my application)

target_link_libraries(${PROJECT_NAME} benchmark Threads::Threads).

Now the application build is successful but the binary file throws an std::system error while executed

Running ./NeonOptimizations
Run on (2 X 2592 MHz CPU s)
CPU Caches:
L1 Data 32 KiB (x2)
L1 Instruction 32 KiB (x2)
L2 Unified 256 KiB (x2)
L3 Unified 9216 KiB (x2)
Load Average: 0.51, 0.24, 0.19
terminate called after throwing an instance of 'std::system_error'
what(): Unknown error 6243640

Do you have a suggestion on how to resolve this?

dom...@google.com

unread,
Aug 3, 2021, 11:17:13 AM8/3/21
to benchmark-discuss
i remember seeing this before. i think it suggests the pthread you're linking in is not built for aarch64. ie, it's incompatible.
Reply all
Reply to author
Forward
0 new messages