hello_world example error with clean FPGA developer AMI (AL2)

0

Issue:
Seeing hello_world example failing while following instructions on the aws-fpga Repo.

Failure signature:
INFO: [ConfigUtil 60-1032]
emulation configuration file emconfig.json is created in ./_x.sw_emu.xilinx_aws-vu9p-f1_shell-v04261818_201920_2 directory
cp -rf ./_x.sw_emu.xilinx_aws-vu9p-f1_shell-v04261818_201920_2/emconfig.json .
XCL_EMULATION_MODE=sw_emu ./hello_world ./build_dir.sw_emu.xilinx_aws-vu9p-f1_shell-v04261818_201920_2/vadd.xclbin
/home/ec2-user/src/project_data/aws-fpga/Vitis/examples/xilinx_2020.2/common/includes/xcl2/xcl2.cpp:50 Error calling err = cl::Platform::get(&platforms), error code is: -1001
make[1]: *** [run] Error 1
make[1]: Leaving directory `/home/ec2-user/src/project_data/aws-fpga/Vitis/examples/xilinx_2020.2/hello_world'
make: *** [check] Error 2

Reproduce:

  1. Launch EC2 instance with FPGA developer AMI (Amazon Linux 2) with Vitis 2020.2.
  2. Install XRT libraries following instructions here (https://github.com/aws/aws-fpga/blob/master/Vitis/docs/XRT_installation_instructions.md )
  3. Source setup script and try to compile SW_Emulation following instructions here (https://github.com/aws/aws-fpga/blob/master/Vitis/README.md )
  4. $ cd $VITIS_DIR/examples/xilinx/hello_world // no error
    $ make clean // Seeing "basename: missing operand"
    $ make check TARGET=sw_emu DEVICE=$AWS_PLATFORM all // Seeing failure signature above

Greatly appreciate any input on why I'm seeing this failure. This is supposed to be a simple example? Please let me know if I have missed anything from the getting started guide. Thanks!

Owenoool

질문됨 3년 전466회 조회
5개 답변
0
수락된 답변

The problem is that we have Vitis bundled libstdc++ in the LD_LIBRARY_PATH which is ABI incompatible with the update g++ on AL2. The fix is to use a libstdc++ that is ABI compatible with the system you are compiling on.

By default g++ should look at /lib64 if you do not set an LD_LIBRARY_PATH. However, since it finds libstdc++ in the Vitis paths, it doesn't look for it there and fails.

So your workaround should work without issue as it adds the library to the '/opt/xilinx/xrt/lib' path specified in LD_LIBRARY_PATH. We're also fixing the code not not include Vitis to LD_LIBRARY_PATH - and that should lead g++ to automatically find the library in /lib64. We'll release the fix soon.

-Deep

답변함 3년 전
profile picture
전문가
검토됨 7달 전
0

Hi owenool,

We're looking at this issue with Xilinx and will provide an update on it by tomorrow.

-Deep

답변함 3년 전
0

Hi Owenool,

It seems like there is some sort of an incompatibility between stdc++ symbols provided by Xilinx tools versus the ones on the AL2 AMI.
I'm looking into this further, but for now could you run this and re-run your executable:

sudo cp /lib64/libstdc++.so.6 /opt/xilinx/xrt/lib/

Let me know if this doesn't work for you for now.

Thanks,

Deep

답변함 3년 전
0

Thank you Deep for the temporary fix! It is working for me now. Are there any pitfalls with this method?

Owenoool

답변함 3년 전
0

Thank you Deep for the temporary fix! It is working for me now. Are there any pitfalls with this method?

Owenoool

답변함 3년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠