Skip to content

Problem with init.tcl when building an OpenCL example for hardware emulation on EC2 instance

0

Hello,

I am trying to build the hello_world opencl example by following the guide here: Quick Start Guide to Accelerating your C/C++ application on AWS EC2 F2 (FPGA) Instances with Vitis and running this command: make build TARGET=hw_emu PLATFORM=$SHELL_EMU_VERSION

By looking at what's printed on the terminal, ANY command using v++ causes the error below (even something basic like v++ --version), but it doesn't abort, it just continues executing: `application-specific initialization failed: Can't find a usable init.tcl in the following directories: /tmp/pabuild/tcl8.6.13/lib/tcl8.6 /usr/lib/tcl8.6 /lib/tcl8.6 /usr/library /library /tcl8.6.13/library /tcl8.6.13/library

This probably means that Tcl wasn't installed properly.`

A similar post here: FPGA F2 development issue They get the same error running a different command.

According to the guide at the end, after a successful hardware simulation run I should be able to find 4 files that contain important information, but I can't find them meaning it probably wasn't successful.

Note: I am not running on an F2 instance because I requested a quota increase and still waiting for a response, so I am running an m4.2xlarge ( which is recommended by the FPGA Developer AMI ) for the hardware emulation.

I appreciate the help, thank you.

asked a year ago177 views
2 Answers
0

The issue you're experiencing with the init.tcl file is a common problem when setting up the FPGA development environment on AWS EC2 instances. This error suggests that there might be an issue with the Tcl (Tool Command Language) installation or configuration in your development environment.

To address this problem, you can try the following steps:

  1. Ensure that you have properly sourced the setup script for the FPGA development environment. Typically, this is done by running:

    source ~/aws-fpga/vitis_setup.sh

    This script should set up the necessary environment variables and paths.

  2. Verify that Tcl is installed on your system by running:

    which tclsh

    If it's not found, you may need to install Tcl.

  3. If Tcl is installed but not found, you might need to update your PATH environment variable to include the directory where Tcl is installed.

  4. Consider manually setting the TCL_LIBRARY environment variable to point to the correct Tcl library location. You can do this by adding the following line to your ~/.bashrc file (replace the path with the actual location of your Tcl library):

    export TCL_LIBRARY=/usr/share/tcl8.6

    After adding this line, source your ~/.bashrc file or restart your terminal.

  5. Ensure that you are using the latest version of the AWS FPGA Developer AMI, as it may include fixes for such issues.

If these steps don't resolve the issue, you may need to reinstall the Xilinx tools or seek support from AWS FPGA development forums or AWS support.

Regarding your note about not running on an F2 instance, while it's possible to perform hardware emulation on non-F2 instances, it's important to note that for full hardware builds and certain optimizations, an F2 instance is recommended. The m4.2xlarge instance you're using should be sufficient for hardware emulation, but you might encounter some limitations or performance differences compared to running on an F2 instance.

Once you receive your quota increase and can access F2 instances, you may want to retry your build process on an F2 instance to ensure you're working in the environment most closely matching the final deployment target.
Sources
FPGA F2 development issue | AWS re:Post
Possible XRT installation bug in latest AWS Vitis f2 flow | AWS re:Post

answered a year ago
0

Hi @Souhail,

Please refer to this post on the same topic. Thanks.

AWS
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.