Bug 198296

Summary: math/fftw3: upgrade, fix the "SSE but not SSE2" systems
Product: Ports & Packages Reporter: Mikhail T. <freebsd-2024>
Component: Individual Port(s)Assignee: Jason E. Hale <jhale>
Status: Closed FIXED    
Severity: Affects Only Me CC: doctorwhoguy, jhale, jmd, mi, sasamotikomi
Priority: --- Flags: bugzilla: maintainer-feedback? (jhale)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Do not assume, that SSE means SSE2 -- only enable SSE2 if explicitly requested
freebsd-2024: maintainer-approval?
Update to 3.3.4 freebsd-2024: maintainer-approval?

Description Mikhail T. 2015-03-05 00:43:34 UTC
Created attachment 153812 [details]
Do not assume, that SSE means SSE2 -- only enable SSE2 if explicitly requested

The existing port builds version 3.3.3, while the newer release -- 3.3.4 -- is available.

Both 3.3.3 and 3.3.4 have a problem with systems, where SSE is among processor-features, but SSE2 is not. For some reason, upstream code interprets "--enable-sse" to ALSO mean "--enable-sse2":

https://github.com/FFTW/fftw3/issues/35

The attached patches attempts to both update our port to 3.3.4 and fix the SSE2-presumption.

It seems to build fine here (used for fftw3-float) and pass the "check" as well ("bigcheck" is just too long for this little Athlon).
Comment 1 Mikhail T. 2015-03-05 00:44:19 UTC
Created attachment 153813 [details]
Update to 3.3.4
Comment 2 Mikhail Teterin freebsd_committer freebsd_triage 2015-04-15 09:50:13 UTC
The upstream maintainer convinced me, my patch is not particularly helpful -- for it disables SSE altogether:

  https://github.com/FFTW/fftw3/issues/35

That -- disabling of SSE -- may be the only work-around for when clang is used on a CPU with SSE, but without SSE2. I can confirm, that gcc (4.2.2) has no problem compiling single-precision SSE for athlon-xp -- which is where clang (3.4.1) dies.

I'm building clang-3.6.0 now to investigate further.
Comment 3 sasamotikomi 2015-05-09 22:28:01 UTC
(In reply to Mikhail Teterin from comment #2)
It's global issue isn't fftw3 only affected:
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198738
Comment 4 Johannes M Dieterich freebsd_committer freebsd_triage 2015-10-17 20:12:05 UTC
*** Bug 201265 has been marked as a duplicate of this bug. ***
Comment 5 Rene Ladan freebsd_committer freebsd_triage 2016-06-27 21:49:21 UTC
Maintainer reset.
Comment 6 Jason E. Hale freebsd_committer freebsd_triage 2016-10-26 00:35:53 UTC
I've updated fftw3 to 3.3.5. Upstream seems to have fixed the issue, but I've included a SIMD option to toggle the optimizations if all else fails. Flags weren't being set for clang either, but I've patched the port to set them.
Comment 7 Jason E. Hale freebsd_committer freebsd_triage 2017-01-10 09:08:04 UTC
Closing this. The upgrade part is done and I believe the SSE issue is resolved and I haven't heard any more feedback about it since I made the changes in October.