DynamoRIO / dynamorio

Dynamic Instrumentation Tool Platform
Other
2.62k stars 555 forks source link

Building for linux-arm-gnueabi (instead of gnueabihf) #3365

Open etaleo opened 5 years ago

etaleo commented 5 years ago

Hey there!

I am trying to build DynamoRIO for ARM using gnueabi.

I've tried following the steps described here: https://github.com/DynamoRIO/dynamorio/wiki/How-To-Build#cross-compiling-for-arm-on-linux

$ git clone https://github.com/DynamoRIO/dynamorio.git
$ mkdir build_arm
$ cd build_arm
$ cmake -DCMAKE_TOOLCHAIN_FILE=../dynamorio/make/toolchain-arm32.cmake ../dynamorio
$ make -j

This results in a drrun binary that uses gnueabihf.

I have then tried using -DCMAKE_FIND_ROOT_PATH=/usr/arm-linux-gnueabi in the cmake command which resulted in the same binary.

I have also tried using -DTARGET_ABI=linux-gnueabi which resulted in the following error during make:

Scanning dependencies of target drrun
Scanning dependencies of target drinject
[ 64%] Building C object tools/CMakeFiles/drrun.dir/drdeploy.c.o
[ 64%] Building C object tools/CMakeFiles/drinject.dir/drdeploy.c.o
[ 64%] Linking C executable ../bin32/drinject
[ 64%] Linking C executable ../bin32/drrun
CMake Error at /home/david/dynamorio/core/CMake_readelf.cmake:101 (message):
  *** Error: /home/david/build_arm/lib32/release/libdynamorio.so has
  undefined symbol: GLOBAL DEFAULT UND __aeabi_dcmple

core/CMakeFiles/dynamorio.dir/build.make:2379: recipe for target 'lib32/release/libdynamorio.so' failed
make[2]: *** [lib32/release/libdynamorio.so] Error 1
make[2]: *** Deleting file 'lib32/release/libdynamorio.so'
CMakeFiles/Makefile2:353: recipe for target 'core/CMakeFiles/dynamorio.dir/all' failed
make[1]: *** [core/CMakeFiles/dynamorio.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 64%] Built target drinject
[ 64%] Built target drrun
[ 65%] Linking CXX executable ../bin32/histogram_launcher
[ 65%] Built target histogram_launcher
[ 65%] Built target dynamorio_static
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

Additional info:

I am not sure what causes this error and how to troubleshoot this further.

Any help is appreciated - thank you!

Marius31-dev commented 2 years ago

Any news or updates about that? I am running in the same issue. I really appreciate each comment on it. KR, Marius

derekbruening commented 2 years ago

There was a users list thread on this -- but it looks like the original author deleted it or something?!? https://groups.google.com/g/dynamorio-users/c/a53053ea-7701-49e9-9ec3-7e42a5741f7bn@googlegroups.com?utm_medium=email&utm_source=footer

Repeating from there:

aeabi_dcmple is in third_party/libgcc/arm/ieee754-df.S. Is there some extra leading underscore difference or sthg?