惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
U
Unit 42
GbyAI
GbyAI
M
MIT News - Artificial intelligence
美团技术团队
罗磊的独立博客
雷峰网
雷峰网
量子位
博客园 - 【当耐特】
Last Week in AI
Last Week in AI
D
Docker
小众软件
小众软件
S
SegmentFault 最新的问题
Blog — PlanetScale
Blog — PlanetScale
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
WordPress大学
WordPress大学
V
V2EX
博客园_首页
腾讯CDC
The Cloudflare Blog
A
About on SuperTechFans
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC

AUR Newest Packages

AUR (en) - linuxqq-clipsync-git AUR (en) - libtslitex-git AUR (en) - libtslitex-git AUR (en) - carton-appimage AUR (en) - veila-git AUR (en) - veila-bin AUR (en) - vigil-baseline AUR (en) - byedroid AUR (en) - neovim-base16-git AUR (en) - pirata AUR (en) - rpi-imager-git-non-root AUR (en) - python-fastapi-sso AUR (en) - tmux-ai-titles AUR (en) - zeed-bin AUR (en) - bclone-bin AUR (en) - dwl-git-azerty AUR (en) - auggie-bin AUR (en) - libspatialaudio-git AUR (en) - libspatialaudio AUR (en) - miniupnpd-iptables-legacy AUR (en) - miniupnpd-nft AUR (en) - jeeves-bin AUR (en) - opennow AUR (en) - rotki AUR (en) - kapi-bin AUR (en) - classfi-bin AUR (en) - classfi-git AUR (en) - classfi AUR (en) - giff-git AUR (en) - budget-tracker-bin
AUR (en) - p4lang-bmv2
2026-06-05 · via AUR Newest Packages

@insmtr Thank you very much for the detailed report and for providing the patch and necessary steps! I just changed the build steps for bmv2 as you suggested and pushed the changes. I wish they would just create a new release of bmv2, then we wouldn't need so many patches...

Thank you for maintaining this package! However, this package does not build components related to simple_switch_grpc. For this reason, I have created some patches and hope you can merge them!

First, I maintain a p4lang-pi package that provides P4Runtime links for bmv2. p4lang-bmv2 can directly depend on it.

Second, the main build program of version 1.15.0 does not include simple_switch_grpc, so I created an integrate-simple_switch_grpc.patch with the following content:

diff --git a/configure.ac b/configure.ac
index 670e65218..49017f009 100755
--- a/configure.ac
+++ b/configure.ac
@@ -305,6 +305,10 @@ AC_CONFIG_FILES([Makefile
                 pdfixed/include/Makefile
                 PI/Makefile])

+AS_IF([test "$want_pi" = yes], [
+  AC_CONFIG_SUBDIRS([targets/simple_switch_grpc])
+])
+
 # Generate other files
 AC_CONFIG_FILES([tests/utils.cpp
                  src/bm_sim/version.cpp
diff --git a/targets/Makefile.am b/targets/Makefile.am
index 9cf910630..45ead49ad 100644
--- a/targets/Makefile.am
+++ b/targets/Makefile.am
@@ -1,5 +1,11 @@
+MAYBE_SECONDARY_TARGETS =
+
 if COND_THRIFT
-MAYBE_SECONDARY_TARGETS = simple_router l2_switch
+MAYBE_SECONDARY_TARGETS += simple_router l2_switch
+endif
+
+if COND_PI
+MAYBE_SECONDARY_TARGETS += simple_switch_grpc
 endif

-SUBDIRS = $(MAYBE_SECONDARY_TARGETS) simple_switch psa_switch
+SUBDIRS = simple_switch psa_switch $(MAYBE_SECONDARY_TARGETS)

For details, please see Commit a9de3d9 .

Finally, I changed the configure command in the build instructions to ./configure --prefix=/usr --with-pi. For details, please refer to the simple_switch_grpc target build documentation .

Finally, the changes to the PKGBUILD are as follows:

diff --git a/PKGBUILD b/PKGBUILD
index 77a2938..b05aba8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -12,6 +12,7 @@ depends=(
     'libevent'
     'libpcap'
     'nanomsg'
+    'p4lang-pi'
     'python'
     'python-thrift'
     'thrift'
@@ -20,15 +21,17 @@ makedepends=('boost')
 source=("$pkgname-$pkgver::$url/archive/refs/tags/$pkgver.tar.gz"
         "$pkgname-fix-ipaddr-import.patch::https://github.com/p4lang/behavioral-model/commit/7a8843ffb87bab9eb0a44c993ae39a9fefca10cf.patch"
         "$pkgname-add-cstdint-include.patch::https://github.com/p4lang/behavioral-model/commit/c0ff3aba77a78ed08dfcb8634f0875fa172e18ab.patch"
-        "remove-boost-system.patch")
+        "remove-boost-system.patch"
+        "integrate-simple_switch_grpc.patch")
 sha512sums=('b92f761338a8f60cfc3578d62848f2201b4f1d55a562680a0a9fe9e63cb764eb00f252f59b48020871fa65fe3d0468fab888affa5cfef00a7578d940dd7fc08b'
             '9102f8a0d98fd9a7b2693f2b71f0677c33cbdf4260e031012febcb6cb8a2a645b3a6a1d274974067854100903b9ebb5bca8a1eef1bc01e99120df2969c764b3f'
             '3f1dc85e9e761fd26ef25efdfb6b0cf13dcad59487ba25b22ec46c6d494531fb937d73567f6d4484e5f7117b732c4414eeb6f63183e728914c83c7223dd2dbd5'
-            '8e6aa7c7f0a3aced64b2fb66c2ca48ecc063c007070970f150d80613226063363e39e557dfe0eac31127f2bca251a88fc9578d8c06e61edbc783a642db9b4012')
+            '8e6aa7c7f0a3aced64b2fb66c2ca48ecc063c007070970f150d80613226063363e39e557dfe0eac31127f2bca251a88fc9578d8c06e61edbc783a642db9b4012'
+            '2e97b22cf55927f4c4e8e91670cc38b33b172b9b08e031ed2e5027cca7bc5f185326a1eaf893b435cc8335027766d98b329ae504e17d589eaafb8ddb3ee98093')

 prepare() {
     cd "behavioral-model-$pkgver"
-    for patch_file in "../$pkgname-fix-ipaddr-import.patch" "../$pkgname-add-cstdint-include.patch" "../remove-boost-system.patch"; do
+    for patch_file in "../$pkgname-fix-ipaddr-import.patch" "../$pkgname-add-cstdint-include.patch" "../remove-boost-system.patch" "../integrate-simple_switch_grpc.patch"; do
         patch -Np1 -i "$patch_file"
     done
 }
@@ -36,8 +39,8 @@ prepare() {
 build() {
     cd "behavioral-model-$pkgver"
     ./autogen.sh
-    ./configure --prefix=/usr
-    make
+    ./configure --prefix=/usr --with-pi
+    make -j$(nproc)
 }

 check() {

Thank you again for maintaining this package. I hope you can improve it after seeing this message. I am extremely grateful.