Created attachment 266112 [details] new port devel/libcircle (v0.3) Hi, I’d like to add a new port devel/libcircle, a distributed work queue library for MPI clusters. libcircle provides an API for distributing embarrassingly parallel workloads across MPI ranks using a distributed work queue. Applications register callbacks to create and process work items, while the library handles load balancing, termination detection, and optional global reductions. libcircle is commonly used on large HPC filesystems to traverse directory trees and perform file operations in parallel, and it is one of the dependencies for sysutils/mpifileutils, which I’m working on porting to FreeBSD. Port details - Upstream: hpc / GitHub (tag v0.3) - Uses USES=mpi:mpich and the MPI compiler wrapper (MPICC) - Builds and installs the shared library, header, and pkg-config file - Optional DOCS (installs README.md into ${DOCSDIR}) QA - make stage-qa [ok] - make check-plist [ok] - portfmt -D Makefile [ok] - portlint -AC [ok] - portclippy Makefile [ok] - poudriere testport [ok] Maintainer: rikka.goering@outlook.de Patch attached as a git-format patch.
Use tarball from upstream instead of USE_GITHUB=yes: https://github.com/hpc/libcircle/releases/download/v0.3/libcircle-0.3.0.tar.gz MASTER_SITES=https://github.com/hpc/${PORTNAME}/releases/download/v${DISTVERSION:R}/ Maybe USES+=autoreconf is unnecessary.
Created attachment 269528 [details] v1 Please check my patch.
Thanks for the feedback and the corrected v1 patch! I reviewed and tested the patch locally with poudriere testport and all checks passed. I also ran portlint -AC on it and noticed that: since the port installs shared libraries under lib/, USE_LDCONFIG=yes should be added back. Apart from that, the changes look good to me.
(In reply to Generic Rikka from comment #3) USE_LDCONFIG=yes was deleted by accident.
Why --disable-static?
Created attachment 269646 [details] v2 (In reply to Vladimir Druzenko from comment #5) --disable-static was a leftover from the initial debugging and is not needed. Without it, lib/libcircle.a is installed as well. I added it to pkg-plist, and the port packages successfully. Including libcircle.a may be desirable for broader use cases.
There's no need to install a static library if nothing in tree uses it DOCS and MANPAGES should be combined into DOXYGEN https://cgit.freebsd.org/ports/tree/Mk/bsd.options.desc.mk#n80 I'm not too fond of the idea of adding seemingly rather at least dormat project, no consumers and not packaged by many at all. https://repology.org/project/libcircle/versions I'm not fond of forks in general but this seems to carry quite a bit of improvements fwiw, https://github.com/dmikushin/circle
Created attachment 269686 [details] v3 (In reply to Daniel Engberg from comment #7) Thanks for the feedback. I upgraded the patch based on your feedback: - combined MANPAGES and DOCS into a shared DOCS option handled with doxygen - disabled static library installation The main reason for adding libcircle is that it is an upstream dependency of sysutils/mpifileutils, which I am working on as part of improving HPC tooling availability on FreeBSD. I also checked the fork that was mentioned. At first glance it appears more heavily modified, so I am not yet sure whether it can be treated as a drop-in replacement for mpifileutils. I can review that further. The revised port still builds, packages, and passes checks locally.
Created attachment 269688 [details] v4 Updated used MPI implementation to openmpi, to depend on the same MPI implementation as the other dependencies of mpifileutils.
(In reply to Daniel Engberg from comment #7) With DOXYGEN instead of DOCS "PORTDOCS=*" doesn't work.
(In reply to Generic Rikka from comment #9) PORTNAME= libcircle DISTVERSION= 0.3.0 CATEGORIES= devel parallel MASTER_SITES= https://github.com/hpc/${PORTNAME}/releases/download/v${DISTVERSION:R}/ MAINTAINER= rikka.goering@outlook.de COMMENT= Efficient distributed work queue library for MPI clusters WWW= https://hpc.github.io/libcircle/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING USES= libtool localbase mpi:openmpi pathfix pkgconfig USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ENV= CC=${MPICC} \ MPICC=${MPICC} INSTALL_TARGET= install-strip TEST_TARGET= check PORTDOCS= * OPTIONS_DEFINE= DOCS OPTIONS_DEFAULT= SHARED OPTIONS_MULTI= LIBS OPTIONS_MULTI_LIBS= SHARED STATIC OPTIONS_SUB= yes SHARED_DESC= Build shared libraries STATIC_DESC= Build static libraries DOCS_BUILD_DEPENDS= doxygen:devel/doxygen DOCS_CONFIGURE_ENABLE= doxygen SHARED_CONFIGURE_ENABLE= shared STATIC_CONFIGURE_ENABLE= static do-install-DOCS-on: (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} "html latex" ${STAGEDIR}${DOCSDIR}) ${INSTALL_MAN} ${WRKSRC}/doc/man/man3/*.3 ${STAGEDIR}${PREFIX}/share/man/man3 .include <bsd.port.mk> include/libcircle.h %%STATIC%%lib/libcircle.a %%SHARED%%lib/libcircle.so %%SHARED%%lib/libcircle.so.2 %%SHARED%%lib/libcircle.so.2.1.1 libdata/pkgconfig/libcircle.pc %%PORTDOCS%%share/man/man3/CIRCLE_handle.3.gz %%PORTDOCS%%share/man/man3/lib.c.3.gz %%PORTDOCS%%share/man/man3/queue.c.3.gz %%PORTDOCS%%share/man/man3/token.c.3.gz %%PORTDOCS%%share/man/man3/worker.c.3.gz
Workaround DOCS <=> DOXYGEN: PORTNAME= libcircle DISTVERSION= 0.3.0 CATEGORIES= devel parallel MASTER_SITES= https://github.com/hpc/${PORTNAME}/releases/download/v${DISTVERSION:R}/ MAINTAINER= rikka.goering@outlook.de COMMENT= Efficient distributed work queue library for MPI clusters WWW= https://hpc.github.io/libcircle/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING USES= libtool localbase mpi:openmpi pathfix pkgconfig USE_LDCONFIG= yes GNU_CONFIGURE= yes CONFIGURE_ENV= CC=${MPICC} \ MPICC=${MPICC} INSTALL_TARGET= install-strip TEST_TARGET= check PORTDOCS= * OPTIONS_DEFINE= DOCS DOXYGEN OPTIONS_DEFAULT= SHARED OPTIONS_MULTI= LIBS OPTIONS_MULTI_LIBS= SHARED STATIC OPTIONS_SUB= yes SHARED_DESC= Build shared libraries STATIC_DESC= Build static libraries DOXYGEN_IMPLIES= DOCS DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen DOXYGEN_CONFIGURE_ENABLE= doxygen SHARED_CONFIGURE_ENABLE= shared STATIC_CONFIGURE_ENABLE= static do-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/AUTHORS ${STAGEDIR}${DOCSDIR} do-install-DOXYGEN-on: (cd ${WRKSRC}/doc && ${COPYTREE_SHARE} "html latex" ${STAGEDIR}${DOCSDIR}) ${INSTALL_MAN} ${WRKSRC}/doc/man/man3/*.3 ${STAGEDIR}${PREFIX}/share/man/man3 .include <bsd.port.mk> include/libcircle.h %%STATIC%%lib/libcircle.a %%SHARED%%lib/libcircle.so %%SHARED%%lib/libcircle.so.2 %%SHARED%%lib/libcircle.so.2.1.1 libdata/pkgconfig/libcircle.pc %%DOXYGEN%%share/man/man3/CIRCLE_handle.3.gz %%DOXYGEN%%share/man/man3/lib.c.3.gz %%DOXYGEN%%share/man/man3/queue.c.3.gz %%DOXYGEN%%share/man/man3/token.c.3.gz %%DOXYGEN%%share/man/man3/worker.c.3.gz
Created attachment 269791 [details] v5: [NEW PORT] devel/libcircle: API to distribute parallel workloads across MPI ranks Updated patch to review feedback: - adjusted doxygen/docs handling - created new options for static and shared libraries Thanks a lot for the review feedback!
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=14736c6ee94658022c9172e0594e3125a400f068 commit 14736c6ee94658022c9172e0594e3125a400f068 Author: Generic Rikka <rikka.goering@outlook.de> AuthorDate: 2026-04-15 12:29:07 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2026-04-15 13:37:44 +0000 devel/libcircle: New port: API to distribute parallel workloads across MPI ranks libcircle provides an API for distributing embarrassingly parallel workloads across MPI ranks using a distributed work queue. Applications register callbacks to create and process work items, while the library handles load balancing, termination detection, and optional global reductions. It is commonly used on large HPC filesystems to traverse directory trees and perform file operations in parallel on hundreds or thousands of processes. https://github.com/hpc/libcircle It is one of the dependencies for sysutils/mpifileutils. PR: 291589 Sponsored by: UNIS Labs Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org> devel/Makefile | 1 + devel/libcircle/Makefile (new) | 48 +++++++++++++++++++++++++++++++++++++++++ devel/libcircle/distinfo (new) | 3 +++ devel/libcircle/pkg-descr (new) | 8 +++++++ devel/libcircle/pkg-plist (new) | 11 ++++++++++ 5 files changed, 71 insertions(+)
Thanks.