Bug 280716

Summary: science/py-scipy: fix build with clang 19
Product: Ports & Packages Reporter: Dimitry Andric <dim>
Component: Individual Port(s)Assignee: Po-Chuan Hsieh <sunpoet>
Status: Closed FIXED    
Severity: Affects Some People Flags: bugzilla: maintainer-feedback? (python)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 280562    
Attachments:
Description Flags
science/py-scipy: fix build with clang 19 none

Description Dimitry Andric freebsd_committer freebsd_triage 2024-08-09 17:16:45 UTC
With clang 19, science/py-scipy fails to build, first due to bug 280715
which is the fault of math/py-numpy. When that is fixed, it next fails
due to a new error indicating a typo:

    In file included from scipy/_lib/_uarray/_uarray_dispatch.cxx:3:
    scipy/_lib/_uarray/small_dynamic_array.h:145:18: error: reference to non-static member function must be called
      145 |     size_ = copy.size;
          |             ~~~~~^~~~

This is an upstream bug, which has been fixed in the mean time by
https://github.com/scipy/scipy/pull/21069. Add it as a PATCHFILES entry
in the Makefile, until a newer version of py-scipy is imported.
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-08-09 17:18:08 UTC
Created attachment 252633 [details]
science/py-scipy: fix build with clang 19
Comment 2 commit-hook freebsd_committer freebsd_triage 2024-08-15 11:56:49 UTC
A commit in branch main references this bug:

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

commit f24227e0c8ae1d8053448413e07b446ca1df6aa9
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-08-15 09:47:27 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-08-15 11:53:55 +0000

    science/py-scipy: Fix build with Clang 19

    PR:             280716
    Obtained from:  https://github.com/scipy/scipy/commit/ab7d08c6148286059f6498ab5c3070268d13cbd9

 science/py-scipy/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2024-08-15 12:08:48 UTC
Committed. Thanks!
Comment 4 Dimitry Andric freebsd_committer freebsd_triage 2024-09-08 09:36:41 UTC
Reopening, this patch was not correctly applied, and the port still fails to compile with the error from comment 0.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-09-08 19:44:02 UTC
A commit in branch main references this bug:

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

commit ec40f806c0006797c83d62e0519d1fa1f3d9cdb6
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-08 19:42:49 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-09-08 19:42:49 +0000

    science/py-scipy: Fix build with Clang 19

    PR:             280716
    Obtained from:  https://github.com/scipy/scipy/commit/ab7d08c6148286059f6498ab5c3070268d13cbd9

 science/py-scipy/Makefile | 3 +++
 science/py-scipy/distinfo | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)
Comment 6 Po-Chuan Hsieh freebsd_committer freebsd_triage 2024-09-08 19:52:14 UTC
(In reply to Dimitry Andric from comment #4)

It should be fixed now. Thanks.