Bug 291587 - [NEW PORT] devel/lwgrp: Light-weight group library for MPI
Summary: [NEW PORT] devel/lwgrp: Light-weight group library for MPI
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://github.com/llnl/lwgrp
Keywords:
Depends on:
Blocks: 291588 291679
  Show dependency treegraph
 
Reported: 2025-12-11 22:15 UTC by Generic Rikka
Modified: 2026-04-15 13:41 UTC (History)
1 user (show)

See Also:


Attachments
new port devel/lwgrp (v1.0.6) (3.06 KB, patch)
2025-12-11 22:15 UTC, Generic Rikka
no flags Details | Diff
new port devel/lwgrp (v1.0.6) (3.21 KB, patch)
2025-12-17 23:26 UTC, Generic Rikka
no flags Details | Diff
v2: new port devel/lwgrp (v1.0.6) (3.25 KB, patch)
2026-04-12 21:58 UTC, Generic Rikka
no flags Details | Diff
v3: [NEW PORT] devel/lwgrp (v1.0.6) (3.53 KB, patch)
2026-04-15 01:41 UTC, Generic Rikka
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Generic Rikka 2025-12-11 22:15:36 UTC
Created attachment 266110 [details]
new port devel/lwgrp (v1.0.6)

Hi,

I’d like to add a new port devel/lwgrp, the Light-weight Group library from LLNL. It provides data structures and collectives to create and destroy ordered process groups efficiently in MPI applications, which is useful when frequent, transient groups would make full communicator creation too expensive.

This library is a building block for other MPI tools (e.g. DTCMP and mpifileutils) and is part of an ongoing effort to make modern HPC tooling more easily available on FreeBSD.

Port details
- Upstream: LLNL / GitHub (tag v1.0.6)
- Builds a shared library, installs headers and pkg-config file
- Uses the MPI compiler wrapper (MPICC) via CONFIGURE_ENV

Optional DOCS (installs README 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.
Comment 1 Generic Rikka 2025-12-17 23:26:04 UTC
Created attachment 266311 [details]
new port devel/lwgrp (v1.0.6)

Minor Makefile styling update.
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-08 21:47:12 UTC
MASTER_SITES=https://github.com/llnl/${PORTNAME}/releases/download/v${DISTVERSION}/
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-11 22:49:09 UTC
Library with wrong soname "liblwgrp.so" without version.
I don't know how to fix this.
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-11 22:52:41 UTC
PORTNAME=       lwgrp
DISTVERSION=    1.0.6
CATEGORIES=     devel parallel
MASTER_SITES=   https://github.com/llnl/${PORTNAME}/releases/download/v${DISTVERSION}/

MAINTAINER=     rikka.goering@outlook.de
COMMENT=        Light-weight group library for MPI (LLNL)
WWW=            https://github.com/llnl/lwgrp/

LICENSE=        BSD3CLAUSE
LICENSE_FILE=   ${WRKSRC}/LICENSE.TXT

USES=           libtool localbase mpi:openmpi pathfix pkgconfig
USE_LDCONFIG=   yes

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --enable-shared \
                --enable-static \
                --with-mpi=${MPI_HOME}
CONFIGURE_ENV=  CC=${MPICC}
INSTALL_TARGET= install-strip
TEST_TARGET=    check

PORTDOCS=       README

OPTIONS_DEFINE= DOCS

do-install-DOCS-on:
        @${MKDIR} ${STAGEDIR}${DOCSDIR}
        ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}

post-install:
        ${RM} -r ${STAGEDIR}${DATADIR}

.include <bsd.port.mk>
Comment 5 Generic Rikka 2026-04-12 21:58:10 UTC
Created attachment 269687 [details]
v2: new port devel/lwgrp (v1.0.6)

I tracked the error down to upstream using liblwgrp_la_LDFLAGS = -avoid-version in src/Makefile.am.
I updated the patch to replace that -avoid-version with -version-info 0:0:0 and regenerate autotools files.
The port now installs a properly versioned shared library and the resulting SONAME is liblwgrp.so.0
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-13 01:53:57 UTC
PORTNAME=       lwgrp
DISTVERSION=    1.0.6
CATEGORIES=     devel parallel
MASTER_SITES=   https://github.com/llnl/${PORTNAME}/releases/download/v${DISTVERSION}/

MAINTAINER=     rikka.goering@outlook.de
COMMENT=        Light-weight group library for MPI (LLNL)
WWW=            https://github.com/llnl/lwgrp/

LICENSE=        BSD3CLAUSE
LICENSE_FILE=   ${WRKSRC}/LICENSE.TXT

USES=           autoreconf libtool localbase mpi:openmpi pathfix pkgconfig
USE_LDCONFIG=   yes

GNU_CONFIGURE=  yes
CONFIGURE_ARGS= --with-mpi=${MPI_HOME}
CONFIGURE_ENV=  CC=${MPICC}
INSTALL_TARGET= install-strip
TEST_TARGET=    check

PORTDOCS=       README

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

SHARED_CONFIGURE_ENABLE=        shared
STATIC_CONFIGURE_ENABLE=        static

do-install-DOCS-on:
        @${MKDIR} ${STAGEDIR}${DOCSDIR}
        ${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}

post-install:
        ${RM} -r ${STAGEDIR}${DATADIR}

.include <bsd.port.mk>

include/lwgrp.h
%%STATIC%%lib/liblwgrp.a
%%SHARED%%lib/liblwgrp.so
%%SHARED%%lib/liblwgrp.so.0
%%SHARED%%lib/liblwgrp.so.0.0.0
libdata/pkgconfig/liblwgrp.pc

--- src/Makefile.am.orig        2024-06-28 16:47:36 UTC
+++ src/Makefile.am
@@ -30,4 +30,4 @@ liblwgrp_la_LIBADD =
   lwgrp_comm_split.c
 liblwgrp_la_CFLAGS = $(INCLUDES)
 liblwgrp_la_LIBADD =
-liblwgrp_la_LDFLAGS = -avoid-version
+liblwgrp_la_LDFLAGS = -version-info 0
Comment 7 Generic Rikka 2026-04-15 01:41:16 UTC
Created attachment 269785 [details]
v3: [NEW PORT] devel/lwgrp (v1.0.6)

Adjusted patch according to review feedback:
 - created new options for shared and static libraries
 - adjusted version patching from -version-info 0:0:0 to -version-info 0

Thanks for the feedback!
Comment 8 commit-hook freebsd_committer freebsd_triage 2026-04-15 13:39:08 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f52087a807413b125397a132fd402505c288b411

commit f52087a807413b125397a132fd402505c288b411
Author:     Generic Rikka <rikka.goering@outlook.de>
AuthorDate: 2026-04-15 12:44:22 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2026-04-15 13:37:44 +0000

    devel/lwgrp: New port: Light-weight group library for MPI

    The Light-weight Group library provides data structures and collectives to
    create/destroy ordered process groups efficiently in MPI codes — useful when
    frequent, transient groups make communicator creation too costly.

    https://github.com/llnl/lwgrp/

    It is one of the dependencies for sysutils/mpifileutils.

    PR:             291587
    Sponsored by:   UNIS Labs
    Co-authored-by: Vladimir Druzenko <vvd@FreeBSD.org>

 devel/Makefile                                |  1 +
 devel/lwgrp/Makefile (new)                    | 43 +++++++++++++++++++++++++++
 devel/lwgrp/distinfo (new)                    |  3 ++
 devel/lwgrp/files/patch-src_Makefile.in (new) | 11 +++++++
 devel/lwgrp/pkg-descr (new)                   |  3 ++
 devel/lwgrp/pkg-plist (new)                   |  6 ++++
 6 files changed, 67 insertions(+)
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2026-04-15 13:41:34 UTC
Thanks.