Search code examples
c++instrumentation

PIN tool unknown ABI error


I installed the latest version of PIN from here. And I modified the created a file to trace calls to gets() using a copy of malloctrace.cpp. However, while compiling, I get an error:

In file included from ./include/pin/pin.H:41:0, from

tools/ManualExamples/inputtrace.cpp:32:

./include/pin/compiler_version_check2.H:83:3: error: #error "Unknown

target architecture" # error "Unknown target architecture" ^

./include/pin/compiler_version_check2.H:98:2: error: #error "internal

error pin compiler configuration not available " #error "internal

error pin compiler configuration not available " ^

./include/pin/compiler_version_check2.H:102:2: error: #error The C++

ABI of your compiler does not match the ABI of the pin kit. #error

The C++ ABI of your compiler does not match the ABI of the pin kit.

^ ./include/pin/compiler_version_check2.H:122:2: error: #error Kit has

unknown compiler ABI #error Kit has unknown compiler ABI ^ In file

included from ./include/pin/level_base.PLH:66:0,

from ./include/pin/pin.H:43,

from tools/ManualExamples/inputtrace.cpp:32:

./include/pin/foundation.PLH:25:28: fatal error: types_marker.TLH: No

such file or directory #include "types_marker.TLH"

^

compilation terminated.

I did make sure that the version of PIN I installed was the latest. But the problem persists. Can someone help me in this regard?

Update: I am using a linux machine x86-64 and the compiler is gcc version 4.8.4


Solution

  • Adding this as an answer since, I do not have the required reputation to make a comment.

    Unless you tell us the exact parameters you used for running make, I am afraid a clear and direct answer to your question will not be possible.

    This might be a total stab in the dark. But, I ran into a similar problem recently, like you have specified above. I am using an x86_64 Linux system and I was trying to cross-compile my PinTool for ia-32 architecture.

    If you do not have 32-bit shared libraries in your system, or if you get the TARGET parameter in make wrong, it would result in

    Unknown target architecture
    

    For me running the below command, made it build successfully. Use the following to build for ia32 architecture.

    make TARGET=ia32