-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
I'm getting a linker error when statically linking both fftw3 and fftw3f in a binary:
/opt/AMD/aocc/5.0.0/bin/clang++ -march=znver4 -ffast-math -fopenmp-simd -Ofast -g -DNDEBUG -fveclib=AMDLIBM -lamdlibm -lm -rdynamic -Xlinker [...] -o [...] -ldl [...] -Wl,-Bstatic -lrt -Wl,-Bdynamic /opt/AMD/aocl/5.1.0/gcc/lib/libfftw3.a /opt/AMD/aocl/5.1.0/gcc/lib/libfftw3f.a [...]
ld.lld: error: duplicate symbol: is_avx512
>>> defined at transpose.c
>>> transpose.o:(is_avx512) in archive /opt/AMD/aocl/5.1.0/gcc/lib/libfftw3.a
>>> defined at transpose.c
>>> transpose.o:(.bss+0x4) in archive /opt/AMD/aocl/5.1.0/gcc/lib/libfftw3f.a
ld.lld: error: duplicate symbol: is_avx
>>> defined at transpose.c
>>> transpose.o:(is_avx) in archive /opt/AMD/aocl/5.1.0/gcc/lib/libfftw3.a
>>> defined at transpose.c
>>> transpose.o:(.bss+0x0) in archive /opt/AMD/aocl/5.1.0/gcc/lib/libfftw3f.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
The symbols were added in commits 08964c6 and 830c977 by @BiplabRaut.
Declaring int is_avx512, is_avx in transpose.c static solves the problem.
https://github.com/amd/amd-fftw/blob/amd-fftw/kernel/transpose.c#L332C1-L332C23
Metadata
Metadata
Assignees
Labels
No labels