maintainer-feedback requested: [Bug 280715] math/py-numpy: remove clang error condition in distutils check

2024-08-09 Thread bugzilla-noreply
Bugzilla Automation  has asked freebsd-python (Nobody)
 for maintainer-feedback:
Bug 280715: math/py-numpy: remove clang error condition in distutils check
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280715



--- Description ---
numpy has a C source file in their distutils checks, which is supposed
to check for AVX512FP16, but for apparently historical reasons, it has:

/* clang has a bug regarding our spr coode, see gh-23730. */
#if __clang__
#error
#endif

Since clang 19 now supports the -mavx512fp16 flag, other ports such as
science/py-scipy (which depend on numpy) then bomb out in their
configure scripts with:

WARN: CCompilerOpt.dist_test[637] : CCompilerOpt._dist_test_spawn[771] :
Command (cc -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -fPIC -c
/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/cpu_avx512_spr.c
-o
/tmp/tmp_dkw8pp0/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/
cpu_avx512_spr.o
-MMD -MF
/tmp/tmp_dkw8pp0/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/
cpu_avx512_spr.o.d
-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma
-mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512vl -mavx512bw -mavx512dq
-mavx512vnni -mavx512ifma -mavx512vbmi -mavx512vbmi2 -mavx512bitalg
-mavx512vpopcntdq -mavx512fp16 -Werror) failed with exit status 1 output ->
   
/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/cpu_avx512_spr.c
:20:2:
error:
   20 | #error
  |  ^
1 error generated.

I have tried clang 15 through 19 on cpu_avx512_spr.c with the #error
removed, and none of them crashed or otherwise got an error. So I think
we should simply remove the whole #if / #endif part.

Also bump the portrevision, to force dependencies to configure against
the new cpu_avx512_spr.c file.



[Bug 280715] math/py-numpy: remove clang error condition in distutils check

2024-08-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280715

Bug ID: 280715
   Summary: math/py-numpy: remove clang error condition in
distutils check
   Product: Ports & Packages
   Version: Latest
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: Individual Port(s)
  Assignee: python@FreeBSD.org
  Reporter: d...@freebsd.org
 Flags: maintainer-feedback?(python@FreeBSD.org)
  Assignee: python@FreeBSD.org

numpy has a C source file in their distutils checks, which is supposed
to check for AVX512FP16, but for apparently historical reasons, it has:

/* clang has a bug regarding our spr coode, see gh-23730. */
#if __clang__
#error
#endif

Since clang 19 now supports the -mavx512fp16 flag, other ports such as
science/py-scipy (which depend on numpy) then bomb out in their
configure scripts with:

WARN: CCompilerOpt.dist_test[637] : CCompilerOpt._dist_test_spawn[771] :
Command (cc -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -O2 -pipe
-fstack-protector-strong -fno-strict-aliasing -fPIC -c
/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/cpu_avx512_spr.c
-o
/tmp/tmp_dkw8pp0/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/cpu_avx512_spr.o
-MMD -MF
/tmp/tmp_dkw8pp0/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/cpu_avx512_spr.o.d
-msse -msse2 -msse3 -mssse3 -msse4.1 -mpopcnt -msse4.2 -mavx -mf16c -mfma
-mavx2 -mavx512f -mno-mmx -mavx512cd -mavx512vl -mavx512bw -mavx512dq
-mavx512vnni -mavx512ifma -mavx512vbmi -mavx512vbmi2 -mavx512bitalg
-mavx512vpopcntdq -mavx512fp16 -Werror) failed with exit status 1 output ->
   
/usr/local/lib/python3.11/site-packages/numpy/distutils/checks/cpu_avx512_spr.c:20:2:
error:
   20 | #error
  |  ^
1 error generated.

I have tried clang 15 through 19 on cpu_avx512_spr.c with the #error
removed, and none of them crashed or otherwise got an error. So I think
we should simply remove the whole #if / #endif part.

Also bump the portrevision, to force dependencies to configure against
the new cpu_avx512_spr.c file.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 280715] math/py-numpy: remove clang error condition in distutils check

2024-08-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280715

--- Comment #1 from Dimitry Andric  ---
Created attachment 252632
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252632&action=edit
math/py-numpy: remove clang error condition in distutils check

-- 
You are receiving this mail because:
You are the assignee for the bug.


maintainer-feedback requested: [Bug 280716] science/py-scipy: fix build with clang 19

2024-08-09 Thread bugzilla-noreply
Bugzilla Automation  has asked freebsd-python (Nobody)
 for maintainer-feedback:
Bug 280716: science/py-scipy: fix build with clang 19
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280716



--- Description ---
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.



[Bug 280716] science/py-scipy: fix build with clang 19

2024-08-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280716

Bug ID: 280716
   Summary: science/py-scipy: fix build with clang 19
   Product: Ports & Packages
   Version: Latest
  Hardware: Any
OS: Any
Status: New
  Severity: Affects Some People
  Priority: ---
 Component: Individual Port(s)
  Assignee: python@FreeBSD.org
  Reporter: d...@freebsd.org
  Assignee: python@FreeBSD.org
 Flags: maintainer-feedback?(python@FreeBSD.org)

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.

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 280716] science/py-scipy: fix build with clang 19

2024-08-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280716

--- Comment #1 from Dimitry Andric  ---
Created attachment 252633
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=252633&action=edit
science/py-scipy: fix build with clang 19

-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 280715] math/py-numpy: remove clang error condition in distutils check

2024-08-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280715

Dimitry Andric  changed:

   What|Removed |Added

 Blocks||280562


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280562
[Bug 280562] [exp-run] Against llvm-19-update branch on GitHub
-- 
You are receiving this mail because:
You are the assignee for the bug.


[Bug 280716] science/py-scipy: fix build with clang 19

2024-08-09 Thread bugzilla-noreply
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280716

Dimitry Andric  changed:

   What|Removed |Added

 Blocks||280562


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280562
[Bug 280562] [exp-run] Against llvm-19-update branch on GitHub
-- 
You are receiving this mail because:
You are the assignee for the bug.