Open jchidley opened 4 years ago
Hi,
I have the same issue with Archlinux to compile the package from source:
https://aur.archlinux.org/packages/nextpnr-git
I narrowed down the issue to the following line of CMakeLists.txt:
find_package(PythonLibs 3.5 REQUIRED)
When I call cmake with additional option:
-DPYTHON_INCLUDE_DIRS=/usr/include/python3.8
I can observe that, before the call to find_package(PythonLibs 3.5 REQUIRED)
, I have:
PYTHON_INCLUDE_DIRS=/usr/include/python3.8
and after the call I have:
PYTHON_INCLUDE_DIRS=/usr/include/python3.7m
This is a wrong result. I don't know where this comes from, but at least I can manually patch the CMakeLists.txt to override PYTHON_INCLUDE_DIRS
and compile successfullly.
EDIT
Also need to override PYTHON_LIBRARIES for link:
PYTHON_LIBRARIES=/usr/lib/libpython3.8.so
So it seems it's just an issue of find_package
getting a wrong version from somewhere.
I did this yesterday on Arch Linux. It is tricky. You need the all of the following AUR packages: https://aur.archlinux.org/packages/icestorm-git/ https://aur.archlinux.org/packages/trellis-git/ https://aur.archlinux.org/packages/nextpnr-git/ https://aur.archlinux.org/packages/yosys-git/
For some reason not all the prerequisites install correctly (or perhaps they always need to be installed explicitly?) so you might want to check that. Ensure that every one is up-to-date by doing a git pull in each.
I hit this too, it seems to be related to https://gitlab.alpinelinux.org/alpine/aports/-/issues/11233 — which I don't understand the status of. It seemed the consensus was:
Yes, please put [the files not found] on usr/lib/cmake [instead of usr/share/cmake]
and the issue was closed a year ago, but looking at the alpine v3.14 package (as well as the edge
package) everything is still in "/usr/share/cmake/" instead.
I was able to workaround via:
cd nextpnr; Eigen3_DIR=/usr/share/cmake/Modules cmake -DARCH=ice40 -DCMAKE_INSTALL_PREFIX=/usr/local . && make -j$(nproc) && make install
i.e. specifically I added Eigen3_DIR=/usr/share/cmake/Modules
environment variable ahead of the cmake
call so it can find it in the wrong location. [Still having problems building on alpine but I'll file a separate issue for that.]
I am trying to run nextpnr on Alpine Linux. I believe that I have the right packages installed but I am left with the following errors when I run
cmake -DARCH=ice40 .
:From looking at CMakeLists.txt I believe that my problems are caused because Alpine Linux is different from the 'supported' distributions. See below for the relevant lines (149-194) for boost::python:
I haven't checked Eigen3 but I assume that it will be the same problem. I am continuing to investigate the issue and see if I can find a fix.