-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Hello,
I'm encountering a precompilation error with FFTW.jl on my macOS system running on Apple Silicon. The error indicates that the symbol fftw_init_threads
is missing from the FFTW library.
When I try to run a script (which depends on FFTW.jl), I get the following error:
ERROR: InitError: could not load symbol "fftw_init_threads":
dlsym(0x..., fftw_init_threads): symbol not found
Stacktrace:
[1] fftw_init_threads
@ ~/.julia/packages/FFTW/mFpUb/src/providers.jl:69 [inlined]
[2] __init__()
@ FFTW ~/.julia/packages/FFTW/mFpUb/src/FFTW.jl:32
...
System Information
-
macOS Version: macOS 15.4
-
CPU/Architecture: Apple Silicon (M3)
-
Julia Version: 1.11.4 (Official release)
Reproduction
A minimal reproduction involves a script that sets the following:
ENV["FFTW_LIBRARY_PATH"] = "/opt/homebrew/lib"
ENV["FFTW_LIBRARY"] = "/opt/homebrew/lib/libfftw3_threads.dylib"
ENV["FFTW_FORCE_SYSTEM_LIB"] = "true"
ENV["FFTW_INIT_THREADS"] = "0"
ENV["FFTW_NUM_THREADS"] = "1"
import Pkg
Pkg.build("FFTW")
using FFTW
And then I immediately get the error regarding fftw_init_threads
.
I have also verified that the thread‑enabled library exports the symbol by running:
nm /opt/homebrew/lib/libfftw3_threads.dylib | grep fftw_init_threads
which returns a line such as:
00000000000048e8 T _fftw_init_threads
Is there a known workaround for this issue on macOS/Apple Silicon? How can I configure FFTW.jl
to correctly use my system-provided FFTW, or should a patch be considered to disable threaded initialization on platforms where it is unavailable?
Thank you for your help and for maintaining FFTW.jl!