Bug 281976 - biology/biosig: fix build with libc++ 19
Summary: biology/biosig: fix build with libc++ 19
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: Dimitry Andric
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-10-09 18:59 UTC by Dimitry Andric
Modified: 2024-10-11 17:43 UTC (History)
0 users

See Also:
yuri: maintainer-feedback+


Attachments
biology/biosig: fix build with libc++ 19 (2.03 KB, patch)
2024-10-09 19:04 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2024-10-09 18:59:48 UTC
With libc++ 19, biology/biosig fails to compile, with errors similar to:

  /usr/include/c++/v1/__math/special_functions.h:51:16: error: expected unqualified-id
     51 |   if (!__math::isfinite(__H_n)) {
        |                ^
  ./t230/../biosig-dev.h:932:22: note: expanded from macro 'isfinite'
    932 | # define isfinite(a) (-INFINITY < (a) && (a) < INFINITY)
        |                      ^

This is because biosig attempts to define its own isfinite() macro,
which it should not do. Stub out the incompatible definition.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-10-09 19:04:45 UTC
Created attachment 254122 [details]
biology/biosig: fix build with libc++ 19
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-10-09 22:39:49 UTC
Approved.
Please commit it.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-10-11 17:32:02 UTC
A commit in branch main references this bug:

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

commit 08d6ba6fa1dddca87fb19366370f0eb06c6aac21
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-10-09 18:57:33 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-10-11 17:30:49 +0000

    biology/biosig: fix build with libc++ 19

    With libc++ 19, biology/biosig fails to compile, with errors similar to:

      /usr/include/c++/v1/__math/special_functions.h:51:16: error: expected unqualified-id
         51 |   if (!__math::isfinite(__H_n)) {
            |                ^
      ./t230/../biosig-dev.h:932:22: note: expanded from macro 'isfinite'
        932 | # define isfinite(a) (-INFINITY < (a) && (a) < INFINITY)
            |                      ^

    This is because biosig attempts to define its own isfinite() macro,
    which it should not do. Stub out the incompatible definition.

    PR:             281976
    Approved by:    yuri (maintainer)
    MFH:            2024Q4

 biology/biosig/files/patch-biosig4c++_biosig-dev.h | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)
Comment 4 commit-hook freebsd_committer freebsd_triage 2024-10-11 17:37:04 UTC
A commit in branch 2024Q4 references this bug:

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

commit 9e3c846ca05513deb6908fb41598bfdcc52b30c1
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-10-09 18:57:33 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-10-11 17:36:10 +0000

    biology/biosig: fix build with libc++ 19

    With libc++ 19, biology/biosig fails to compile, with errors similar to:

      /usr/include/c++/v1/__math/special_functions.h:51:16: error: expected unqualified-id
         51 |   if (!__math::isfinite(__H_n)) {
            |                ^
      ./t230/../biosig-dev.h:932:22: note: expanded from macro 'isfinite'
        932 | # define isfinite(a) (-INFINITY < (a) && (a) < INFINITY)
            |                      ^

    This is because biosig attempts to define its own isfinite() macro,
    which it should not do. Stub out the incompatible definition.

    PR:             281976
    Approved by:    yuri (maintainer)
    MFH:            2024Q4

    (cherry picked from commit 08d6ba6fa1dddca87fb19366370f0eb06c6aac21)

 biology/biosig/files/patch-biosig4c++_biosig-dev.h | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)