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

SYCL Symbol Visibility Issue on Windows, main branch (2024.08.03.) #289

Open
krasznaa opened this issue Aug 3, 2024 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@krasznaa
Copy link
Member

krasznaa commented Aug 3, 2024

While doing some tests on Windows with the latest version of the code, I ran into the following warnings during the build:

...
[ 70%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/memory/memory_resource_base.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 71%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/memory/device_memory_resource.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 71%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/memory/host_memory_resource.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 71%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/memory/shared_memory_resource.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 72%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/utils/sycl/copy.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 72%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/utils/sycl/async_copy.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 73%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/utils/sycl/queue_wrapper.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 73%] Building SYCL object sycl/CMakeFiles/vecmem_sycl.dir/src/utils/sycl/get_queue.sycl.obj
icx-cl: warning: unknown argument ignored in clang-cl: '-fvisibility-ms-compat' [-Wunknown-argument]
[ 73%] Linking SYCL shared library ..\bin\vecmem_sycl.dll
...

So, #282's setup is not working perfectly with this combination of compilers. (MSVC + oneAPI) The failure is not fatal, but it would be nice to get rid of these warnings... 🤔

@krasznaa krasznaa added the bug Something isn't working label Aug 3, 2024
@krasznaa krasznaa self-assigned this Aug 3, 2024
@krasznaa
Copy link
Member Author

krasznaa commented Aug 8, 2024

Unfortunately I don't have any good ideas about this right now. 😦

The issue is that icx-cl.exe on Windows treats unrecognized command line options as warnings. So the VECMEM_HAVE_SYCL_VISIBILITY_MS_COMPAT test succeeds.

When settings -DVECMEM_FAIL_ON_WARNINGS=TRUE, the VECMEM_HAVE_SYCL_VISIBILITY_MS_COMPAT test fails all of a sudden, as it should. So the build in the end succeeds with both -DVECMEM_FAIL_ON_WARNINGS=TRUE and -DVECMEM_FAIL_ON_WARNINGS=FALSE. We "just" get some pesky warnings in one case.

If we're willing to require a newer CMake version as a minimum, it could be possible to make this code behave a bit better. But with the current minimum I can just not find the right incantation of testing the usage of -fvisibility-ms-compat and -Werror at the same time with try_compile(...). 😦

So I'll let this one go to sleep for now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant