Package Details: nextpnr-git 0.3.r37.g8d063d38-2

Git Clone URL: https://aur.archlinux.org/nextpnr-git.git (read-only, click to copy)
Package Base: nextpnr-git
Description: Portable FPGA place and route tool
Upstream URL: https://github.com/YosysHQ/nextpnr
Licenses: custom:ISC
Conflicts: nextpnr
Provides: nextpnr
Submitter: grahamedgecombe
Maintainer: xiretza
Last Packager: xiretza
Votes: 20
Popularity: 0.177325
First Submitted: 2018-08-02 17:35 (UTC)
Last Updated: 2022-06-12 18:47 (UTC)

Latest Comments

Maverick commented on 2022-02-14 16:52 (UTC)

If the build is missing gowin/chipdb/chipdb-GW1N-9C.bba use prjapicula bumped to 0.2a3 rather then 0.2a2 in the AUR as of today. Already flagged as outdated. Please consider adding min version.

xiretza commented on 2021-09-14 16:59 (UTC) (edited on 2022-03-20 18:24 (UTC) by xiretza)

<s>The prjtrellis-git package is severely broken - if you need a VCS version of trellis, use trellis-git.</s>

prjtrellis-git has gone through a deletion and resubmission, and is now the recommended package.

samekh commented on 2021-09-12 14:37 (UTC) (edited on 2021-09-12 14:42 (UTC) by samekh)

Hi,

Great package. There is only a small detail about the prjtrellis dependency, maybe not being necessarily a problem of this package. In the makedepends for the ECP5 architecture, there is a strict dependency on the package prjtrellis which is only found in the community repository. Although prjtrellis-git also exists on AUR, both of them set provides=libtrellis (and unfortunately none of them provides=prjtrellis). Therefore I would suggest to change the makedepend prjtrellis to libtrellis to be able to select between both and not force the repository version on each nextpnr-git update.

See:

diff --git a/PKGBUILD b/PKGBUILD
index d8898ed..2280dd2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -25,7 +25,7 @@ for _arch in ${_ARCHS[@]}; do
       _CONFIG+=('-DICESTORM_INSTALL_PREFIX=/usr')
       ;;
     ecp5)
-      makedepends+=('prjtrellis' 'prjtrellis-db')
+      makedepends+=('libtrellis' 'prjtrellis-db')
       _CONFIG+=('-DTRELLIS_INSTALL_PREFIX=/usr')
       ;;
     nexus)

Regards,

Jan

xiretza commented on 2021-09-08 15:56 (UTC)

optdepends are optional runtime dependencies and are always installed during build, so that solution isn't appropriate - thanks for the reminder though, I finally committed @rpls patch.

marzoul commented on 2021-09-08 15:18 (UTC) (edited on 2021-09-08 15:18 (UTC) by marzoul)

Hi, I would suggest to move the supported architecture in optdepends. And generate the cmake options according to the actually installed corresponding packages. This would remove need to edit PKGBUILD for anyone not needing everything.


 # Maintainer: Graham Edgecombe <gpe@grahamedgecombe.com>
 pkgname=nextpnr-git
-pkgver=r3528.179ae683
+pkgver=r3780.95845b47
 pkgrel=1
 pkgdesc='Portable FPGA place and route tool'
 arch=('i686' 'x86_64')
 url='https://github.com/YosysHQ/nextpnr'
 license=('custom:ISC')
 depends=('boost-libs' 'python' 'qt5-base')
-makedepends=('boost' 'cmake' 'eigen' 'git' 'icestorm' 'prjtrellis'
-             'prjtrellis-db' 'prjoxide' 'prjapicula')
-provides=('nextpnr')
+makedepends=('boost' 'cmake' 'eigen' 'git')
+optdepends=(
+       'icestorm:      For Lattice iCE40 support'
+       'prjtrellis:    For Lattice ECP5 support'
+       'prjtrellis-db: For Lattice ECP5 support'
+       'prjoxide:      For Lattice Nexus support'
+       'prjapicula:    For Gowin support'
+)
+provides=('nextpnr=$pkgver')
 conflicts=('nextpnr')
 source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git')
 sha256sums=('SKIP')
@@ -22,11 +28,26 @@ pkgver() {
 build() {
   cd "$srcdir/nextpnr"

+  local _archlist="generic"
+  if $(pacman -Qi icestorm &> /dev/null) ; then
+    _archlist="$_archlist;ice40"
+  fi
+  if $(pacman -Qi prjtrellis &> /dev/null) && $(pacman -Qi prjtrellis-db &> /dev/null) ; then
+    _archlist="$_archlist;ecp5"
+  fi
+  if $(pacman -Qi prjoxide &> /dev/null) ; then
+    _archlist="$_archlist;nexus"
+  fi
+  if $(pacman -Qi prjapicula &> /dev/null) ; then
+    _archlist="$_archlist;gowin"
+  fi
+  msg "Architectures : $_archlist"
+
   mkdir -p build
   cd build

   cmake \
-    -DARCH=generic\;ice40\;ecp5\;nexus\;gowin \
+    -DARCH="$_archlist" \
     -DICESTORM_INSTALL_PREFIX=/usr \
     -DTRELLIS_INSTALL_PREFIX=/usr \
     -DOXIDE_INSTALL_PREFIX=/usr \

rpls commented on 2021-05-16 21:14 (UTC)

With all the different supported target architectures, the dependencies are getting a bit out of hand. :-) This makes it a bit neater (similar to the emacs-git AUR package) and enables some user customization. But in no way a must-have, just a suggestion.

diff --git a/PKGBUILD b/PKGBUILD
index 572b12c..b52ca84 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,19 +1,42 @@
 # Maintainer: Graham Edgecombe <gpe@grahamedgecombe.com>
+_ARCHS=('generic' 'ice40' 'ecp5' 'nexus' 'gowin')
+
 pkgname=nextpnr-git
-pkgver=r3528.179ae683
+pkgver=r3529.5a41d207
 pkgrel=1
 pkgdesc='Portable FPGA place and route tool'
 arch=('i686' 'x86_64')
 url='https://github.com/YosysHQ/nextpnr'
 license=('custom:ISC')
 depends=('boost-libs' 'python' 'qt5-base')
-makedepends=('boost' 'cmake' 'eigen' 'git' 'icestorm' 'prjtrellis'
-             'prjtrellis-db' 'prjoxide' 'prjapicula')
+makedepends=('boost' 'cmake' 'eigen' 'git')
 provides=('nextpnr')
 conflicts=('nextpnr')
 source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git')
 sha256sums=('SKIP')

+_CONFIG=()
+for _arch in ${_ARCHS[@]}; do
+  case $_arch in
+    ice40)
+      makedepends+=('icestorm')
+      _CONFIG+=('-DICESTORM_INSTALL_PREFIX=/usr')
+      ;;
+    ecp5)
+      makedepends+=('prjtrellis' 'prjtrellis-db')
+      _CONFIG+=('-DTRELLIS_INSTALL_PREFIX=/usr')
+      ;;
+    nexus)
+      makedepends+=('prjoxide')
+      _CONFIG+=('-DOXIDE_INSTALL_PREFIX=/usr')
+      ;;
+    gowin)
+      makedepends+=('prjapicula')
+      _CONFIG+=('-DGOWIN_BBA_EXECUTABLE=/usr/bin/gowin_bba')
+      ;;
+  esac
+done
+
 pkgver() {
   cd "$srcdir/nextpnr"
   printf 'r%s.%s' "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
@@ -26,11 +49,8 @@ build() {
   cd build

   cmake \
-    -DARCH=generic\;ice40\;ecp5\;nexus\;gowin \
-    -DICESTORM_INSTALL_PREFIX=/usr \
-    -DTRELLIS_INSTALL_PREFIX=/usr \
-    -DOXIDE_INSTALL_PREFIX=/usr \
-    -DGOWIN_BBA_EXECUTABLE=/usr/bin/gowin_bba \
+    -DARCH=$(IFS=\;; echo "${_ARCHS[*]}") \
+    "${_CONFIG[@]}" \
     -DBUILD_TESTS=ON \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DCMAKE_INSTALL_PREFIX=/usr \

xiretza commented on 2021-05-16 07:59 (UTC)

@rpls: thanks, added!

rpls commented on 2021-05-15 23:56 (UTC)

Nextpnr now support GowinSemi FPGAs with "Project Apicula". I added a package for the requirements and validated it on a FPGA with the examples provided by prjapicula.

diff --git a/PKGBUILD b/PKGBUILD
index 15571c6..572b12c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ url='https://github.com/YosysHQ/nextpnr'
 license=('custom:ISC')
 depends=('boost-libs' 'python' 'qt5-base')
 makedepends=('boost' 'cmake' 'eigen' 'git' 'icestorm' 'prjtrellis'
-             'prjtrellis-db' 'prjoxide')
+             'prjtrellis-db' 'prjoxide' 'prjapicula')
 provides=('nextpnr')
 conflicts=('nextpnr')
 source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git')
@@ -26,10 +26,11 @@ build() {
   cd build

   cmake \
-    -DARCH=generic\;ice40\;ecp5\;nexus \
+    -DARCH=generic\;ice40\;ecp5\;nexus\;gowin \
     -DICESTORM_INSTALL_PREFIX=/usr \
     -DTRELLIS_INSTALL_PREFIX=/usr \
     -DOXIDE_INSTALL_PREFIX=/usr \
+    -DGOWIN_BBA_EXECUTABLE=/usr/bin/gowin_bba \
     -DBUILD_TESTS=ON \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DCMAKE_INSTALL_PREFIX=/usr \

xiretza commented on 2021-03-12 21:39 (UTC)

@jamonterrell: see my comment below yours, the VCS package guidelines actually tell you how to add the submodules to source=() properly.

jamonterrell commented on 2021-03-12 21:30 (UTC)

This is currently not working due to git submodules not being updated before build (causes -lpthreads error).

Fix below:

diff --git a/PKGBUILD b/PKGBUILD
index f2d607c..a1fe78c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -22,6 +22,8 @@ pkgver() {
 build() {
   cd "$srcdir/nextpnr"

+  git submodule init
+  git submodule update
   mkdir -p build
   cd build

xiretza commented on 2021-03-10 22:45 (UTC)

Since https://github.com/YosysHQ/nextpnr/pull/607, nextpnr now has a submodule for abseil-cpp that has to be added to source and initialized accordingly. Also there's a warning about -DICEBOX_ROOT= being deprecated, see @rpls' comment.

rpls commented on 2021-01-18 20:46 (UTC) (edited on 2021-01-18 20:46 (UTC) by rpls)

nextpnr now supports another FPGA architecture with "Project Oxide". I added a package for the requirements and validated it with the examples provided by prjoxide. Also the icestorm requirement is now referenced as ICESTORM_INSTALL_PREFIX in the CMake script.

diff --git a/PKGBUILD b/PKGBUILD
index f2d607c..4c33916 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,7 +8,7 @@ url='https://github.com/YosysHQ/nextpnr'
 license=('custom:ISC')
 depends=('boost-libs' 'python' 'qt5-base')
 makedepends=('boost' 'cmake' 'eigen' 'git' 'icestorm' 'prjtrellis'
-             'prjtrellis-db')
+             'prjtrellis-db' 'prjoxide')
 provides=('nextpnr')
 conflicts=('nextpnr')
 source=('nextpnr::git+https://github.com/YosysHQ/nextpnr.git')
@@ -26,9 +26,10 @@ build() {
   cd build

   cmake \
-    -DARCH=generic\;ice40\;ecp5 \
-    -DICEBOX_ROOT=/usr/share/icebox \
+    -DARCH=generic\;ice40\;ecp5\;nexus \
+    -DICESTORM_INSTALL_PREFIX=/usr \
     -DTRELLIS_INSTALL_PREFIX=/usr \
+    -DOXIDE_INSTALL_PREFIX=/usr \
     -DBUILD_TESTS=ON \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DCMAKE_INSTALL_PREFIX=/usr \

zoe1337 commented on 2020-12-18 19:30 (UTC)

shouldn't this PKGBUILD depend on prjtrellis instead of trellis?

xiretza commented on 2020-12-08 12:06 (UTC)

nextpnr now no longer builds the GUI by default, could you add a -DBUILD_GUI=ON to the cmake invocation?

ignilux commented on 2020-11-12 14:02 (UTC)

For what it's worth, I had the same build error with a fresh icestorm-git build/install. When I aborted nextpnr-git and installed trellis-git FIRST, then nextpnr-git builds fine.

marzoul commented on 2020-03-21 09:37 (UTC)

Follow-up : python issue is caused by wrong detection of python version from repo. No known solution yet. https://github.com/YosysHQ/nextpnr/issues/411

marzoul commented on 2020-03-19 22:24 (UTC) (edited on 2020-03-19 22:26 (UTC) by marzoul)

Hi, I have a build error. Is there a missing python-related dependency ?

In file included from /home/adrien/Dev/AUR/nextpnr-git/src/nextpnr/gui/pythontab.cc:22:
/home/adrien/Dev/AUR/nextpnr-git/src/nextpnr/common/pybindings.h:24:10: fatal error: Python.h: No such file or directory
   24 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
make[2]: *** [generated/gui/ice40/CMakeFiles/gui_ice40.dir/build.make:210: generated/gui/ice40/CMakeFiles/gui_ice40.dir/pythontab.cc.o] Error 1
make[2]: Leaving directory '/home/adrien/Dev/AUR/nextpnr-git/src/nextpnr/build'
make[1]: *** [CMakeFiles/Makefile2:660: generated/gui/ice40/CMakeFiles/gui_ice40.dir/all] Error 2
make[1]: Leaving directory '/home/adrien/Dev/AUR/nextpnr-git/src/nextpnr/build'
make: *** [Makefile:141: all] Error 2
==> ERROR: A failure occurred in build().

xiretza commented on 2020-02-21 07:11 (UTC)

@guturise: rebuild trellis(-git).

gururise commented on 2020-02-20 22:28 (UTC) (edited on 2020-02-20 22:29 (UTC) by gururise)

getting this build error:

[ 50%] Generating ecp5/chipdbs/chipdb-25k.bba
Traceback (most recent call last):
  File "/home/gene/.cache/yay/nextpnr-git/src/nextpnr/ecp5/trellis_import.py", line 2, in <module>
    import pytrellis
ImportError: libboost_python38.so.1.71.0: cannot open shared object file: No such file or directory
make[2]: *** [CMakeFiles/ecp5_chipdb.dir/build.make:82: ecp5/chipdbs/chipdb-25k.bba] Error 1
make[2]: Leaving directory '/home/gene/.cache/yay/nextpnr-git/src/nextpnr/build'
make[1]: *** [CMakeFiles/Makefile2:330: CMakeFiles/ecp5_chipdb.dir/all] Error 2
make[1]: Leaving directory '/home/gene/.cache/yay/nextpnr-git/src/nextpnr/build'
make: *** [Makefile:141: all] Error 2

xiretza commented on 2020-02-05 14:14 (UTC) (edited on 2020-02-05 14:42 (UTC) by xiretza)

TRELLIS_ROOT was renamed to TRELLIS_INSTALL_PREFIX, requiring a change in line 30 of the PKGBUILD: https://github.com/YosysHQ/nextpnr/commit/2c938e0e8bd67f479dc4635f510c82603581a58d

EDIT: Actually, the meaning changed too, it should now only be /usr: https://github.com/YosysHQ/nextpnr/commit/1b560ae44ce52db24bba7f5ac9bd54c2ba927349

grahamedgecombe commented on 2020-01-15 19:44 (UTC)

To the person who flagged as out of date:

I can't reproduce the build failure.

A common problem is that trellis-git/icestorm-git sometimes need to be updated/rebuilt before building nextpnr-git, so I'd suggest trying that. Otherwise, pasting the exact failure would be helpful.

grahamedgecombe commented on 2019-03-26 21:31 (UTC)

@redfast00: do you have the latest version of icestorm-git?

redfast00 commented on 2019-03-26 17:57 (UTC)

Package seems broken:

 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 blackarch is up to date
:: Starting full system upgrade...
 there is nothing to do

~~ initializing aurman...
~~ calculating solutions...

:: The following 1 package(s) are getting updated:
   aur/nextpnr-git  r1831.6d66404-1  ->  r2004.c67b825-1

?? Do you want to continue? Y/n: 
~~ looking for new pkgbuilds and fetching them...

==> Making package: nextpnr-git r2008.ed4fc88-1 (Tue 26 Mar 2019 06:51:52 PM CET)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Updating nextpnr git repo...
Fetching origin
==> Validating source files with sha256sums...
    nextpnr ... Skipped
==> Extracting sources...
  -> Creating working copy of nextpnr git repo...
Switched to a new branch 'makepkg'
==> Starting pkgver()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.2", minimum required is "3.5") 
-- Boost version: 1.69.0
-- Found the following Boost libraries:
--   filesystem
--   thread
--   program_options
--   iostreams
--   chrono
--   date_time
--   atomic
--   regex
-- Found PythonInterp: /usr/bin/python3 (found version "3.7.2") 
CMake Warning at /usr/share/cmake-3.14/Modules/FindBoost.cmake:1799 (message):
  No header defined for python-py372; skipping header check
Call Stack (most recent call first):
  CMakeLists.txt:139 (find_package)


CMake Warning at /usr/share/cmake-3.14/Modules/FindBoost.cmake:1799 (message):
  No header defined for python-py37; skipping header check
Call Stack (most recent call first):
  CMakeLists.txt:146 (find_package)


CMake Warning at /usr/share/cmake-3.14/Modules/FindBoost.cmake:1799 (message):
  No header defined for python-py3; skipping header check
Call Stack (most recent call first):
  CMakeLists.txt:146 (find_package)


-- Configuring architecture : generic
-- Configuring architecture : ice40
-- Configuring architecture : ecp5
-- Configuring done
-- Generating done
-- Build files have been written to: /home/redfast/.cache/aurman/nextpnr-git/src/nextpnr/build
[  0%] Automatic MOC for target gui_ice40
[  0%] Built target gui_ice40_autogen
[ 11%] Built target gui_ice40
[ 12%] Built target bbasm
make[2]: *** No rule to make target '/usr/share/icebox/chipdb-u4k.txt', needed by '../ice40/chipdbs/chipdb-u4k.bba'.  Stop.
make[1]: *** [CMakeFiles/Makefile2:183: CMakeFiles/ice40_chipdb.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
2019-03-26 18:51:53,625 - wrappers - makepkg - ERROR - makepkg query ['makepkg', '-cf', '--noconfirm'] failed in directory /home/redfast/.cache/aurman/nextpnr-git

andres commented on 2019-03-25 17:11 (UTC)

package eigen is needed to build this.

benallard commented on 2018-08-29 17:24 (UTC)

After updating icestorm-git, the issue is gone.

benallard commented on 2018-08-22 21:27 (UTC)

Looks like it is https://github.com/cliffordwolf/icestorm/issues/125.

benallard commented on 2018-08-22 21:21 (UTC)

The build process does assumes that /usr/share/icebox/timings_hx8k.txt is present. Can we fix that someway ?

[ 47%] Generating ../ice40/chipdbs/chipdb-8k.bba Traceback (most recent call last): File "/home/ben/.cache/yay/nextpnr-git/src/nextpnr/ice40/chipdb.py", line 248, in <module> fast_timings = read_timings(args.fast) File "/home/ben/.cache/yay/nextpnr-git/src/nextpnr/ice40/chipdb.py", line 230, in read_timings with open(filename) as f: FileNotFoundError: [Errno 2] No such file or directory: '/usr/share/icebox/timings_hx8k.txt' make[2]: [CMakeFiles/ice40_chipdb.dir/build.make:113: ../ice40/chipdbs/chipdb-8k.bba] Error 1 make[1]: [CMakeFiles/Makefile2:294: CMakeFiles/ice40_chipdb.dir/all] Error 2 make: *** [Makefile:141: all] Error 2</module>