YosysHQ / nextpnr

nextpnr portable FPGA place and route tool
ISC License
1.24k stars 236 forks source link

Installation on Ubuntu 22.04 #1288

Closed Ownasaurus closed 4 months ago

Ownasaurus commented 4 months ago

Hello! Thank you for your time in advance. I last used nextpnr-ecp5 about 3 years ago and wanted to update the whole toolchain and resume development.

But I'm having issues with nextpnr! From the root, I'm running cmake . -DARCH=ecp5 -DTRELLIS_INSTALL_PREFIX=/usr/local It detects boost:

-- Found Boost: /usr/include (found version "1.74.0") found components: filesystem program_options iostreams system thread regex chrono date_time atomic 
-- Found Boost: /usr/include (found version "1.74.0") found components: program_options filesystem system

But then when I try to make, I get the following error: ImportError: libboost_thread.so.1.71.0: cannot open shared object file: No such file or directory

Why is it looking for 1.71 if version 1.74 was found earlier? I am sorry if I am simply being a newbie, and I am grateful for any assistance. Thanks again!

EDIT: Here is the whole traceback:

[  4%] Generating chipdb/chipdb-25k.bba
Traceback (most recent call last):
  File "/home/justin/nextpnr/ecp5/trellis_import.py", line 21, in <module>
    import pytrellis
ImportError: libboost_thread.so.1.71.0: cannot open shared object file: No such file or directory
make[2]: *** [ecp5/CMakeFiles/chipdb-ecp5-bbas.dir/build.make:77: ecp5/chipdb/chipdb-25k.bba] Error 1
make[1]: *** [CMakeFiles/Makefile2:255: ecp5/CMakeFiles/chipdb-ecp5-bbas.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
gatecat commented 4 months ago

This is because it's trying to load a version of libtrellis that was built against an older version of boost.

Make sure nextpnr is pointed to the right trellis path, and libtrellis is cleanly built and reinstalled.

Ownasaurus commented 4 months ago

Thank you so much for your reply! I deleted my local git prjtrellis repo, re-cloned, and followed the instructions. nextpnr gave the same error on compiling though :(

So, I deleted my local git nextpnr repo, re-cloned, and followed the instructions. Now it is successfully building!

I wish I knew what I was doing wrong and why it was looking for an old version, but alas, all is well now. Is it possibly because some of the old cmake settings were saved? I'm not very experienced with cmake. If I pulled the latest version, but I had some files left over from 3+ years ago, could that have interfered? Is one expected to do a 'make clean' equivalent with cmake?

Thanks again!

gatecat commented 4 months ago

Yeah, my guess is there was an older install of trellis installed at a different path (say /usr instead of /use/local) that CMake had cached the path to.

Ownasaurus commented 4 months ago

Thanks again!