Package Details: nextpnr-git 0.6.r100.g8e84006e-1

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.61
First Submitted: 2018-08-02 17:35 (UTC)
Last Updated: 2023-09-17 13:05 (UTC)

Dependencies (12)

Required by (1)

Sources (1)

Latest Comments

1 2 3 4 Next › Last »

xiretza commented on 2023-09-17 13:05 (UTC)

Thanks, I've fixed the dependency specification for prjtrellis-db. After that I got spurious GCC segfaults while building, but I don't think there's much the package can do about those anyway - here it is for posterity anyway:

In file included from /build/nextpnr-git/src/nextpnr/common/kernel/basectx.h:34,
                 from /build/nextpnr-git/src/nextpnr/common/kernel/arch_api.h:26,
                 from /build/nextpnr-git/src/nextpnr/common/kernel/base_arch.h:27,
                 from /build/nextpnr-git/src/nextpnr/common/kernel/nextpnr.h:23,
                 from /build/nextpnr-git/src/nextpnr/common/kernel/design_utils.h:21,
                 from /build/nextpnr-git/src/nextpnr/common/kernel/design_utils.cc:21:
/build/nextpnr-git/src/nextpnr/common/kernel/nextpnr_types.h:217:93: internal compiler error: Segmentation fault
  217 |     CellInfo(Context *ctx, IdString name, IdString type) : ctx(ctx), name(name), type(type){};
      |                                                                                             ^
0x1ad33c8 internal_error(char const*, ...)
    ???:0
0x95979b ggc_set_mark(void const*)
    ???:0
0x8b7c67 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b8313 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b9896 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0xba0c73 gt_ggc_mx_vec_tree_va_gc_(void*)
    ???:0
0x8b9a47 gt_ggc_mx_lang_type(void*)
    ???:0
0x8b8045 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b9441 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b8034 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b9417 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b7f94 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b7e2d gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b8305 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b97b4 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0xba0c73 gt_ggc_mx_vec_tree_va_gc_(void*)
    ???:0
0x8b9a47 gt_ggc_mx_lang_type(void*)
    ???:0
0x8b8045 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b9441 gt_ggc_mx_lang_tree_node(void*)
    ???:0
0x8b8034 gt_ggc_mx_lang_tree_node(void*)
    ???:0
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.archlinux.org/> for instructions.
make[2]: *** [CMakeFiles/nextpnr-nexus-test.dir/build.make:146: CMakeFiles/nextpnr-nexus-test.dir/common/kernel/design_utils.cc.o] Error 1

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 \