UCLA-VAST / tapa

TAPA is a dataflow HLS framework that features fast compilation, expressive programming model and generates high-frequency FPGA accelerators.
https://tapa.rtfd.io
MIT License
144 stars 27 forks source link

Cannot find tapa-clang after installing from source #150

Closed jake-ke closed 4 months ago

jake-ke commented 4 months ago

I installed the latest TAPA from source. make test passed. When I run cd apps/vadd && source run_tapa.sh, I got the following error:

Traceback (most recent call last):
  File "/home/jakeke/.local/bin/tapac", line 33, in <module>
    sys.exit(load_entry_point('tapa', 'console_scripts', 'tapac')())
  File "/home/jakeke/tapa/backend/python/tapa/tapac.py", line 522, in main
    tapa.tapa.entry_point(  # pylint: disable=no-value-for-parameter
  File "/usr/lib/python3/dist-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3/dist-packages/click/core.py", line 1690, in invoke
    rv.append(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3/dist-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3/dist-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/jakeke/tapa/backend/python/tapa/steps/analyze.py", line 53, in analyze
    tapa_clang = find_clang_binary('tapa-clang', tapa_clang)
  File "/home/jakeke/tapa/backend/python/tapa/steps/analyze.py", line 100, in find_clang_binary
    raise click.BadParameter('Cannot find the binary file',
click.exceptions.BadParameter: Cannot find the binary file

It seems to be looking for tapa-clang in /usr/local/bin. From the past TAPA installation, I don't think we used to have that. What am I missing during the installation?

Blaok commented 4 months ago

tapa-clang is required even if you are running tapac from CLI since 898fbf52d8b511407e212e031c5f8b2affe3be7c. Assuming you were following https://tapa.readthedocs.io/en/release/installation.html#build-and-installation, one more line is needed:

sudo ln -sf "${PWD}"/backend/tapa-clang /usr/local/bin/

The documentation needs to be updated.