Attempt to fix cross-compilation (arm64-apple -> x86_64-w64-mingw32)#7811
Draft
twalker314 wants to merge 2 commits into
Draft
Attempt to fix cross-compilation (arm64-apple -> x86_64-w64-mingw32)#7811twalker314 wants to merge 2 commits into
twalker314 wants to merge 2 commits into
Conversation
Contributor
Author
|
I still have a linker issue at the end which I am not quite sure how to fix: /opt/homebrew/Cellar/mingw-w64/14.0.0/toolchain-x86_64/bin/x86_64-w64-mingw32-ld: ./contrib/lib/libfreetype.a(ftbzip2.o):ftbzip2.c:(.text+0x71): undefined reference to `BZ2_bzDecompressEnd'
/opt/homebrew/Cellar/mingw-w64/14.0.0/toolchain-x86_64/bin/x86_64-w64-mingw32-ld: ./contrib/lib/libfreetype.a(ftbzip2.o):ftbzip2.c:(.text+0x125): undefined reference to `BZ2_bzDecompress'
/opt/homebrew/Cellar/mingw-w64/14.0.0/toolchain-x86_64/bin/x86_64-w64-mingw32-ld: ./contrib/lib/libfreetype.a(ftbzip2.o):ftbzip2.c:(.text+0x357): undefined reference to `BZ2_bzDecompressEnd'
/opt/homebrew/Cellar/mingw-w64/14.0.0/toolchain-x86_64/bin/x86_64-w64-mingw32-ld: ./contrib/lib/libfreetype.a(ftbzip2.o):ftbzip2.c:(.text+0x3ae): undefined reference to `BZ2_bzDecompressInit'
/opt/homebrew/Cellar/mingw-w64/14.0.0/toolchain-x86_64/bin/x86_64-w64-mingw32-ld: ./contrib/lib/libfreetype.a(ftbzip2.o):ftbzip2.c:(.text+0x65e): undefined reference to `BZ2_bzDecompressInit'
collect2: error: ld returned 1 exit status
make: *** [libhb/hb.dll] Error 1
time end: Sun Apr 12 15:39:15 2026
duration: 25 minutes, 26 seconds (1526.97s)
result: �[31m�[1mFAILURE�[0m (code 2) |
Contributor
|
IIRC that patch was not originally intended for mingw, but for macOS Intel/Arm universal binaries. Try configuring freetype with |
It is also required to target x86_64-w64-mingw32 hosts on Apple Silicon hardware, for example.
3863352 to
48e223d
Compare
Contributor
Author
|
Building freetype without bzip allows the build to complete successfully indeed. I would still like help to get to the cause of the issue if possible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Work in progress.
Part 1/N
Fixes:
Platform-specific application logic seems to be in make/include/contrib.defs:
P00-darwin-applesi-cross.patchwas added in 03bdef6Not quite sure how it ever worked?
046eb04 introduced the current logic using
$$($(1).src/)P??-$$(HOST.system)*.patch ))