We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 5454 - sdl2_ttf make fails on macos bigsur m1
Summary: sdl2_ttf make fails on macos bigsur m1
Status: NEW
Alias: None
Product: SDL_ttf
Classification: Unclassified
Component: misc (show other bugs)
Version: 2.0.15
Hardware: ARM Mac OS X (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-01-09 11:04 UTC by nsklaus
Modified: 2021-01-09 19:01 UTC (History)
1 user (show)

See Also:


Attachments
build output (10.09 KB, text/plain)
2021-01-09 11:04 UTC, nsklaus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nsklaus 2021-01-09 11:04:29 UTC
Created attachment 4647 [details]
build output

sdl2_ttf make fails from macos bigsur on m1 arch:

"
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [libSDL2_ttf.la] Error 1
"

i was able to build sdl2, sdl2_image, sdl2_mixer, and sdl2_ttf fails.
please see attached build output.
Comment 1 Cameron Gutman 2021-01-09 19:01:22 UTC
It's because the included FreeType.framework binary doesn't include arm64 code. The same situation is also true for the the Windows builds of libfreetype-6.dll (only x86 and x64, no ARM64).

As a workaround, I just grabbed the latest FreeType 2.10.4 source, built for Windows x86+x64+ARM64 and macOS x86_64+ARM64, replaced the bundled binaries in the SDL_ttf source, and then built SDL_ttf. IIRC, it required a few tweaks to the build files to pick up the newer library version, but it wasn't too bad.

It would be nice to get new SDL_ttf builds for ARM64 on Windows and macOS, or at least update the prebuilt binaries in the SDL_ttf source tree to have ARM64 builds.