[英]Makefile misinterprets gcc version for Intel Pin on Fedora 22
我只是在Fedora 22機器上安裝了Intel Pin,然后嘗試使用make
在/source/tools
運行makefile。 但是,當我運行它時,我得到以下兩個錯誤,重復多次:
error: #error This kit requires gcc 3.4 or later
error: #error The C++ ABI of your compiler does not match the ABI of the pin kit.
但是,我的gcc版本是
gcc version 5.1.1 20150618 (Red Hat 5.1.1-4) (GCC)
所以我對正在發生的事情感到困惑。 我該如何解決?
注釋掉source/include/pin/compiler_version_check2.H
中有問題的行對我來說似乎是成功的竅門:
#if !defined(__GXX_ABI_VERSION) || CC_USED_ABI_VERSION != __GXX_ABI_VERSION
#error The C++ ABI of your compiler does not match the ABI of the pin kit.
#endif
和
#if CC_USED_ABI_VERSION != __GXX_ABI_VERSION
#error This kit requires gcc 3.4 or later
#endif
我遇到了同樣的問題。 GCC 5.1引入了不再與gcc-3.4 +兼容的新ABI。 我建議您下載較新版本的pin,該版本可以與較新版本的gcc很好地進行編譯。
另一種解決方案是將宏_GLIBCXX_USE_CXX11_ABI設置為0,以便您的編譯器將使用較舊的ABI。 PIN目錄下有一些Makefile配置,您可以在其中為PIN工具設置CXX標志。
有關適用於gcc的雙重ABI的更多信息: https : //gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html
可以在https://software.intel.com/zh-cn/articles/pintool-downloads上找到PIN的較新版本。 最新版本是2016年3月24日。
這個錯誤:
error: #error The C++ ABI of your compiler does not match the ABI of the pin kit.
可能是完全正確的,但是我猜測另一個錯誤消息做出了一個愚蠢的假設-任何ABI不匹配都是因為您的系統的ABI 早於3.4。 但是,這是雙向的,現在,您的ABI不匹配,因為GCC 5.1當然要新得多。
Fedora雜志的背景知識:Fedora中的GCC 5(什么是ABI,當我們對其進行更改時會發生什么?)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.