Bug 283587

Summary: math/suitesparse-lagraph: needs -lm on armv7
Product: Ports & Packages Reporter: Robert Clausecker <fuz>
Component: Individual Port(s)Assignee: freebsd-fortran (Nobody) <fortran>
Status: Closed FIXED    
Severity: Affects Only Me Flags: fuz: maintainer-feedback-
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
suitesparse-lagraph 1.1.3 build failure on armv7 FreeBSD 14.1 none

Description Robert Clausecker freebsd_committer freebsd_triage 2024-12-25 09:28:16 UTC
Created attachment 256126 [details]
suitesparse-lagraph 1.1.3 build failure on armv7 FreeBSD 14.1

In a recent test build I found that the test suite would fail to link due to missing math library (-lm) symbols:

: && /usr/local/libexec/ccache/cc -O2 -pipe  -O3 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLGDIR=/wrkdirs/usr/ports/math/suitesparse-lagraph/work/SuiteSparse-7.7.0/LAGraph -O3  -O2 -pipe  -O3 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -Wno-extra-semi-stmt -O2 -pipe  -O3 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -Wno-extra-semi-stmt -O2 -pipe  -O3 -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -DNDEBUG -Wno-extra-semi-stmt -L/wrkdirs/usr/ports/math/suitesparse-lagraph/work/SuiteSparse-7.7.0/lib -s -fstack-protector-strong -L/usr/local/lib     -Xlinker --dependency-file=src/test/CMakeFiles/test_Betweenness.dir/link.d src/test/CMakeFiles/test_Betweenness.dir/test_Betweenness.c.o -o src/test/test_Betweenness  -Wl,-rpath,/wrkdirs/usr/ports/math/suitesparse-lagraph/work/SuiteSparse-7.7.0/LAGraph/experimental:/wrkdirs/usr/ports/math/suitesparse-lagraph/work/SuiteSparse-7.7.0/LAGraph/src/test:/wrkdirs/usr/ports/math/suitesparse-lagraph/work/SuiteSparse-7.7.0/LAGraph/src  experimental/liblagraphx.so.1.1.3  src/test/liblagraphtest.so.1.1.3  src/liblagraph.so.1.1.3  /usr/local/lib/libgraphblas.so.9.1.0 && :
ld: error: undefined reference due to --no-allow-shlib-undefined: round
>>> referenced by experimental/liblagraphx.so.1.1.3

ld: error: undefined reference due to --no-allow-shlib-undefined: fmax
>>> referenced by experimental/liblagraphx.so.1.1.3

ld: error: undefined reference due to --no-allow-shlib-undefined: fmin
>>> referenced by experimental/liblagraphx.so.1.1.3

This should be fixable by supplying -lm to the link of these components.
See attached log file for details.
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2025-01-20 17:58:10 UTC
Maintainer timeout.

Will commit a patch for this one with my next batch.
Comment 2 commit-hook freebsd_committer freebsd_triage 2025-01-21 23:48:47 UTC
A commit in branch main references this bug:

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

commit 337d71346c03accc50ec76b465dd232b88a9570c
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-01-20 03:11:36 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-01-21 23:46:21 +0000

    math/suitesparse-lagraph: fix build on armv7

    liblagraphx requires libm on this platform.

    Approved by:    portmgr (build fix blanket)
    MFH:            2025Q1
    PR:             283587

 math/suitesparse-lagraph/Makefile                  |  1 +
 ...patch-LAGraph_experimental_CMakeLists.txt (new) | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-01-21 23:52:52 UTC
A commit in branch 2025Q1 references this bug:

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

commit ec9a9e065cbf5c572fc5d99076244d88ebd921e8
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2025-01-20 03:11:36 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-01-21 23:50:38 +0000

    math/suitesparse-lagraph: fix build on armv7

    liblagraphx requires libm on this platform.

    Approved by:    portmgr (build fix blanket)
    MFH:            2025Q1
    PR:             283587

    (cherry picked from commit 337d71346c03accc50ec76b465dd232b88a9570c)

 math/suitesparse-lagraph/Makefile                  |  1 +
 ...patch-LAGraph_experimental_CMakeLists.txt (new) | 23 ++++++++++++++++++++++
 2 files changed, 24 insertions(+)