package/sysrepo: fix build on riscv32
PATCH 1/1 package/sysrepo: fix build on riscv32
Fixes:
https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.log
Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92
---
Tested with Buildroot gitlab CI:
https://gitlab.com/v_cz/buildroot/-/pipelines/2331736795
...-sr_cond_futex-only-if-SYS_futex-sys.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch
package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch new file +33 -0
@@ -0,0 +1,33 @@ +From 6917e00fb6c99a97dacdae7040e5c4c53752b10f Mon Sep 17 00:00:00 2001 +From: Vincent Cruz <[email protected]> +Date: Tue, 17 Feb 2026 14:14:06 +0100 +Subject: [PATCH 1/1] cmake UPDATE use sr_cond_futex only if SYS_futex syscall + is available + +Some architectures (for ex. riscv32) may not support SYS_futex system +call, even though linux/futex.h include file is present. + +Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92 + +Signed-off-by: Vincent Cruz <[email protected]> +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b36de44..e1b39c8c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -163,7 +163,8 @@ set(NACM_SRMON_DATA_PERM "600" CACHE STRING "NACM modules ietf-netconf-acm and s + # sr_cond implementation + if(NOT SR_COND_IMPL) + check_include_file("linux/futex.h" HAS_FUTEX) +- if(HAS_FUTEX) ++ check_symbol_exists(SYS_futex "sys/syscall.h" HAS_SYS_FUTEX) ++ if(HAS_FUTEX AND HAS_SYS_FUTEX) + set(SR_COND_IMPL "sr_cond_futex") + else() + set(SR_COND_IMPL "sr_cond_pthread") +-- +2.51.0 +
Signature · 6 lines
2.51.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Vincent,
thanks for taking care of this upstream ; it was a quick acceptance by sysrepo.
@Thomas,
Quoted 2 lines
Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92
It should solve your comments:
https://lists.buildroot.org/pipermail/buildroot/2026-January/795342.html
Best regards,
Vincent
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Vincent, Vincent,
Quoted 7 lines · Vincent Jardin
@Thomas,
Quoted 2 lines
Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92
It should solve your comments:
https://lists.buildroot.org/pipermail/buildroot/2026-January/795342.html
Absolutely! Could you send an updated Buildroot patch, which integrates this upstream sysrepo patch?
Thanks for the work on this topic!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Thomas,
Quoted 2 lines · ----- On Feb 24, 2026, at 3:23 PM, Thomas Petazzoni…
Absolutely! Could you send an updated Buildroot patch, which integrates this upstream sysrepo patch?
Do you mean dropping the patch file and making the package use the devel branch?
Regards,
Vincent Cruz
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 4 lines · Vincent Cruz
Quoted 2 lines
Absolutely! Could you send an updated Buildroot patch, which integrates this upstream sysrepo patch?
Do you mean dropping the patch file and making the package use the devel branch?
No, backport the patch to whatever stable version the Buildroot package is using, and add the patch into package/<pkg>/. Don't forget the Upstream: tag in the patch, pointing to the upstream commit.
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 5 lines · ----- On Feb 27, 2026, at 2:11 PM, Thomas Petazzoni…
Quoted 1 line
Do you mean dropping the patch file and making the package use the devel branch?
No, backport the patch to whatever stable version the Buildroot package is using, and add the patch into package/<pkg>/. Don't forget the Upstream: tag in the patch, pointing to the upstream commit.
Ok. This is what I did in this patch. I added a patch file with the fix and the Upstream tag.
Regards,
Vincent Cruz
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 7 lines · Vincent Cruz
Fixes:
https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.logUpstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92
Signed-off-by Vincent Jardin <[email protected]>Signed-off-by Vincent Cruz <[email protected]>
Thanks for the patch, applied to master!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas Perale via buildroot
AppliedIn reply of:
Quoted 7 lines
Fixes:
https://autobuild.buildroot.net/results/b0f/b0f30feeddad1a8d51ac87af8b7c56fd9a9b5ff6/build-end.logUpstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92
Signed-off-by Vincent Jardin <[email protected]>Signed-off-by Vincent Cruz <[email protected]>
Applied to 2026.02.x. Thanks
Quoted 54 lines
---
Tested with Buildroot gitlab CI:
https://gitlab.com/v_cz/buildroot/-/pipelines/2331736795...-sr_cond_futex-only-if-SYS_futex-sys.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 package/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patchpackage/sysrepo/0001-cmake-UPDATE-use-sr_cond_futex-only-if-SYS_futex-sys.patch new file +33
-0@@ -0,0 +1,33 @@ +From 6917e00fb6c99a97dacdae7040e5c4c53752b10f Mon Sep 17 00:00:00 2001 +From: Vincent Cruz <[email protected]> +Date: Tue, 17 Feb 2026 14:14:06 +0100 +Subject: [PATCH 1/1] cmake UPDATE use sr_cond_futex only if SYS_futex syscall + is available + +Some architectures (for ex. riscv32) may not support SYS_futex system +call, even though linux/futex.h include file is present. + +Upstream: https://github.com/sysrepo/sysrepo/commit/a0661b7e6a7b2f784fe3222048066c31187c6f92 + +Signed-off-by: Vincent Cruz <[email protected]> +--- + CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 9b36de44..e1b39c8c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -163,7 +163,8 @@ set(NACM_SRMON_DATA_PERM "600" CACHE STRING "NACM modules ietf-netconf-acm and s + # sr_cond implementation + if(NOT SR_COND_IMPL) + check_include_file("linux/futex.h" HAS_FUTEX) +- if(HAS_FUTEX) ++ check_symbol_exists(SYS_futex "sys/syscall.h" HAS_SYS_FUTEX) ++ if(HAS_FUTEX AND HAS_SYS_FUTEX) + set(SR_COND_IMPL "sr_cond_futex") + else() + set(SR_COND_IMPL "sr_cond_pthread") +-- +2.51.0 +Signature · 6 lines
2.51.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot