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

Build failed for arm64ec target architecture #10307

Open
brianGriifin114 opened this issue Jul 18, 2024 · 4 comments
Open

Build failed for arm64ec target architecture #10307

brianGriifin114 opened this issue Jul 18, 2024 · 4 comments
Milestone

Comments

@brianGriifin114
Copy link

Hi, we are the MSVC test team and we found that SDL build fails for arm64ec target architecture.
here's a part of error info

8>Link:
            Creating library C:/gitP/spurious/SDL-mirror/build_arm64ec/Release/SDL2.lib and object C:/gitP/spurious/SDL-mirror/build_arm64ec/Release/SDL2.exp
     8>LINK : warning LNK4294: missing EC version of load config symbol for ARM64X image [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_dinputhaptic.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_xinputhaptic.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_hidapi_xboxone.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_hidapijoystick.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_dinputjoystick.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_xinputjoystick.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_hidapi_stadia.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_hidapi_switch.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_hidapi_xbox360.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]
     8>SDL_hidapi_xbox360w.obj : error LNK2001: unresolved external symbol #__chkstk_arm64ec (EC Symbol) [C:\gitP\spurious\SDL-mirror\build_arm64ec\SDL2.vcxproj]

It seems caused by incompatibilities in the libraries.However, I noticed the issue #8759, which mentioned that it can be compiled successfully under arm64ec. Is there something wrong with my configuration? I attached the setup.log and build.log for reference. If you guys need any more information, please let me know. Thanks!
Build (3).log
Setup (1).log

@slouken
Copy link
Collaborator

slouken commented Jul 18, 2024

Try running cmake with -DSDL_LIBC=ON. This is the default for SDL3, which was where I was reporting it worked in #8759.

@slouken slouken added this to the 2.32.0 milestone Jul 18, 2024
@brianGriifin114
Copy link
Author

brianGriifin114 commented Jul 18, 2024

cmake -G "Visual Studio 17 2022" -A ARM64EC -DCMAKE_SYSTEM_VERSION=10.0.22621.0 -DSDL_LIBC=ON .. 2>&1

CMake Warning:
  Manually-specified variables were not used by the project:

    SDL_LIBC

I tried it, but the same problem occurs(setup success and build failed).Maybe it's because of the SDL version? I'm using SDL2.I can provide steps to reproduce if necessary.

@madebr
Copy link
Contributor

madebr commented Jul 18, 2024

In #10312, ARM64EC detection is added and SDL_LIBC defaults to true for arm64ec.

With this GitHub workflow patch, I can confirm it works.
For current SDL2 releases (that don't know how to detect arm64ec), configuring with -DSDL_LIBC=ON should do the job.
I don't know why -DSDL_LIBC is considered non-used: it's here in the cmake script.

I couldn't test the -A ARM64EC integration because it is not available in current CMake versions.

@brianGriifin114
Copy link
Author

Thanks for your answer. We will modify the build script soon and see if there are any problems.

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

3 participants