1. 程式人生 > >除錯開發板 ZCU102 (Zynq Ultrascale+ MPSoC ) 遇到 program interpreter 不匹配問題

除錯開發板 ZCU102 (Zynq Ultrascale+ MPSoC ) 遇到 program interpreter 不匹配問題

測試環境:

開發機 --- Ubuntu 5.4.0-6ubuntu1~16.04.10

開發板 --- ZynqMP ZCU102 Rev1.0

問題現象:

自己編譯的環境的 APP 到開發板上執行有如下錯誤 --- 

-sh: ./a.out: No such file or directory

問題原因:

由於 開發板上的lib 使用的 program interpreter  與 我自己編譯的程式使用的 program interpreter  不一致導致

 program interpreter  檢視可通過  readelf -l a.out 命令檢視:

...

[Requesting program interpreter: /lib/ld-linux-aarch64.so.1]

...

開發板用的是 64bit 的解析器 而我的程式用的是 32bit 的解析器,所以程式在我的開發板上不能執行

解決方式:

通過更換編譯器器解決

將原來的  arm-linux-gnueabihf-g++ 

更換為  a arch64-linux-gnu-g++

問題解決