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

[fftw3] Fixed the issue that some functions are dynamically exported under Windows #37749

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jimwang118
Copy link
Contributor

Fixes #33322

api.c.obj : error LNK2019: unresolved external symbol fftw_imax referenced in function fftw_plan_with_nthreads
api.c.obj : error LNK2001: unresolved external symbol fftw_mksolver_ct_hook
api.c.obj : error LNK2001: unresolved external symbol fftw_mksolver_hc2hc_hook
conf.c.obj : error LNK2019: unresolved external symbol fftw_solvtab_exec referenced in function fftw_threads_conf_standard
ct.c.obj : error LNK2001: unresolved external symbol fftw_dft_solve
dft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftw_dft_solve
vrank-geq1-rdft2.c.obj : error LNK2019: unresolved external symbol fftw_ops_zero referenced in function applicable
ct.c.obj : error LNK2001: unresolved external symbol fftw_ops_zero
dft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftw_ops_zero
hc2hc.c.obj : error LNK2001: unresolved external symbol fftw_ops_zero
rdft-vrank-geq1.c.obj : error LNK2001: unresolved external symbol fftw_ops_zero

Exports some internal symbols so that we won't have to WITH_COMBINED_THREADS for Win32.

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

Usage test pass with following triplets:

x64-windows
@jimwang118 jimwang118 added category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team. labels Mar 27, 2024
Comment on lines +94 to +96
+#if (defined(FFTW_DLL) || defined(DLL_EXPORT)) && (defined(_WIN32) || defined(__WIN32__))
+ __declspec(dllimport)
+#endif
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

X(mksolver_ct_hook) and X(mksolver_hc2hc_hook) are variables in which case we have to explicitly modify them with __declspec(dllimport) in the headers.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the questions is who is dllexporting these variables. This is a very strange condition to have in this place where everyody would expect a macro.

@jimwang118 jimwang118 marked this pull request as ready for review March 29, 2024 02:38
@jimwang118 jimwang118 marked this pull request as draft April 7, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-bug The issue is with a library, which is something the port should already support info:internal This PR or Issue was filed by the vcpkg team.
4 participants