libsdl-org/SDL_ttf

MSYS2 clang aarch64 build error

markand opened this issue · 3 comments

Hello,

It looks like there is an lld option that msys2's clang is unable to understand. I don't know what it's used for so I must say that I have no idea what to do in that case:

ninja -v
[1/1] cmd.exe /C "cd . && C:\msys64\clangarm64\bin\cc.exe -Os -DNDEBUG  "-Wl,--version-script=C:/Users/David Demelier/Downloads/SDL_ttf/src/SDL_ttf.sym" -shared -o SDL3_ttf.dll -Wl,--out-implib,libSDL3_ttf.dll.a -Wl,--major-image-version,0,--minor-image-version,0 CMakeFiles/SDL3_ttf-shared.dir/src/SDL_ttf.c.obj CMakeFiles/SDL3_ttf-shared.dir/src/version.rc.obj  C:/msys64/clangarm64/lib/libSDL3.dll.a  C:/msys64/clangarm64/lib/libfreetype.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
FAILED: SDL3_ttf.dll libSDL3_ttf.dll.a
cmd.exe /C "cd . && C:\msys64\clangarm64\bin\cc.exe -Os -DNDEBUG  "-Wl,--version-script=C:/Users/David Demelier/Downloads/SDL_ttf/src/SDL_ttf.sym" -shared -o SDL3_ttf.dll -Wl,--out-implib,libSDL3_ttf.dll.a -Wl,--major-image-version,0,--minor-image-version,0 CMakeFiles/SDL3_ttf-shared.dir/src/SDL_ttf.c.obj CMakeFiles/SDL3_ttf-shared.dir/src/version.rc.obj  C:/msys64/clangarm64/lib/libSDL3.dll.a  C:/msys64/clangarm64/lib/libfreetype.dll.a  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
lld: error: unknown argument: --version-script=C:/Users/David Demelier/Downloads/SDL_ttf/src/SDL_ttf.sym
cc: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.

Windows ARM / MSYS2 / clang64 and SDL_ttf commit revision ebeb6a1

@madebr, we should be checking whether the version script is supported before using it. Any fix we do here should be rolled out across SDL projects.

madebr commented

Fixed in fee14e5, and pushed to all satellite libraries.
Please try again in a fresh build directory (or remove HAVE_WL_VERSION_SCRIPT from your CMakeCache.txt).

It works, thanks!