Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fftw build failed when open ENABLE_OPENMP #342

Open
LilyWangLL opened this issue Dec 8, 2023 · 1 comment
Open

Fftw build failed when open ENABLE_OPENMP #342

LilyWangLL opened this issue Dec 8, 2023 · 1 comment

Comments

@LilyWangLL
Copy link

The version of fftw: 3.3.10
OS: Windows 11 x64 & Visual Studio 2022

I use vcpkg to install fftw3[openmp], it build failed on with the following errors. The solution from #120 could resolve these errors, but this could cause repeat their definitions in the DLL.

I also test this #142 (comment), but it still builds failed. cc @stevengj

[449/450] cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=CMakeFiles\fftw3f_omp.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe  CMakeFiles\fftw3f_omp.dir\threads\api.c.obj CMakeFiles\fftw3f_omp.dir\threads\conf.c.obj CMakeFiles\fftw3f_omp.dir\threads\ct.c.obj CMakeFiles\fftw3f_omp.dir\threads\dft-vrank-geq1.c.obj CMakeFiles\fftw3f_omp.dir\threads\f77api.c.obj CMakeFiles\fftw3f_omp.dir\threads\hc2hc.c.obj CMakeFiles\fftw3f_omp.dir\threads\rdft-vrank-geq1.c.obj CMakeFiles\fftw3f_omp.dir\threads\vrank-geq1-rdft2.c.obj CMakeFiles\fftw3f_omp.dir\threads\openmp.c.obj  /out:fftw3f_omp.dll /implib:fftw3f_omp.lib /pdb:fftw3f_omp.pdb /dll /version:3.0 /machine:x64 /debug /INCREMENTAL  fftw3f.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
FAILED: fftw3f_omp.dll fftw3f_omp.lib 
cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=CMakeFiles\fftw3f_omp.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100183~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe  CMakeFiles\fftw3f_omp.dir\threads\api.c.obj CMakeFiles\fftw3f_omp.dir\threads\conf.c.obj CMakeFiles\fftw3f_omp.dir\threads\ct.c.obj CMakeFiles\fftw3f_omp.dir\threads\dft-vrank-geq1.c.obj CMakeFiles\fftw3f_omp.dir\threads\f77api.c.obj CMakeFiles\fftw3f_omp.dir\threads\hc2hc.c.obj CMakeFiles\fftw3f_omp.dir\threads\rdft-vrank-geq1.c.obj CMakeFiles\fftw3f_omp.dir\threads\vrank-geq1-rdft2.c.obj CMakeFiles\fftw3f_omp.dir\threads\openmp.c.obj  /out:fftw3f_omp.dll /implib:fftw3f_omp.lib /pdb:fftw3f_omp.pdb /dll /version:3.0 /machine:x64 /debug /INCREMENTAL  fftw3f.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib  && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1425~1.286\bin\Hostx64\x64\link.exe CMakeFiles\fftw3f_omp.dir\threads\api.c.obj CMakeFiles\fftw3f_omp.dir\threads\conf.c.obj CMakeFiles\fftw3f_omp.dir\threads\ct.c.obj CMakeFiles\fftw3f_omp.dir\threads\dft-vrank-geq1.c.obj CMakeFiles\fftw3f_omp.dir\threads\f77api.c.obj CMakeFiles\fftw3f_omp.dir\threads\hc2hc.c.obj CMakeFiles\fftw3f_omp.dir\threads\rdft-vrank-geq1.c.obj CMakeFiles\fftw3f_omp.dir\threads\vrank-geq1-rdft2.c.obj CMakeFiles\fftw3f_omp.dir\threads\openmp.c.obj /out:fftw3f_omp.dll /implib:fftw3f_omp.lib /pdb:fftw3f_omp.pdb /dll /version:3.0 /machine:x64 /debug /INCREMENTAL fftw3f.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\fftw3f_omp.dir/intermediate.manifest CMakeFiles\fftw3f_omp.dir/manifest.res" failed (exit code 1120) with the following output:
Microsoft (R) Incremental Linker Version 14.25.28611.0
Copyright (C) Microsoft Corporation.  All rights reserved.

   Creating library fftw3f_omp.lib and object fftw3f_omp.exp
api.c.obj : error LNK2019: unresolved external symbol fftwf_imax referenced in function fftwf_plan_with_nthreads
api.c.obj : error LNK2001: unresolved external symbol fftwf_mksolver_ct_hook
api.c.obj : error LNK2001: unresolved external symbol fftwf_mksolver_hc2hc_hook
conf.c.obj : error LNK2019: unresolved external symbol fftwf_solvtab_exec referenced in function fftwf_threads_conf_standard
ct.c.obj : error LNK2001: unresolved external symbol fftwf_dft_solve
dft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftwf_dft_solve
vrank-geq1-rdft2.c.obj : error LNK2019: unresolved external symbol fftwf_ops_zero referenced in function applicable
ct.c.obj : error LNK2001: unresolved external symbol fftwf_ops_zero
dft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftwf_ops_zero
hc2hc.c.obj : error LNK2001: unresolved external symbol fftwf_ops_zero
rdft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftwf_ops_zero
vrank-geq1-rdft2.c.obj : error LNK2019: unresolved external symbol fftwf_ops_add2 referenced in function applicable
ct.c.obj : error LNK2001: unresolved external symbol fftwf_ops_add2
dft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftwf_ops_add2
hc2hc.c.obj : error LNK2001: unresolved external symbol fftwf_ops_add2
rdft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftwf_ops_add2
@garging
Copy link

garging commented Apr 30, 2024

I fixed almost all errors by adding IFFTW_EXTERN to function declarations except for fftwf_mksolver_hc2hc_hook... This function is exported at fftw3f.dll, but cannot be linked in fftw3f_omp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants