Closed SirLynix closed 1 month ago
I will look at it in these days.
this patch will break it. https://github.com/xmake-io/xmake/commit/aa278bc7fc0b723a315120bb95531991b7939229
I will try to fix it in next days.
I added a cli.bisect
util to find patch. https://github.com/xmake-io/xmake/pull/5462
and this patch will also break it. https://github.com/xmake-io/xmake-repo/blob/8822e12a8bd9a85bb34b13bacbe1a0899968c964/packages/f/fmt/xmake.lua#L56
I know the cause of the problem, it's supposed to be the toolchain check and load order that's causing the problem, but I need some more time to figure out how to fix it.
fmt package issue has been fixed. https://github.com/xmake-io/xmake-repo/pull/4942
it should works now for your project. But I don't have a better way to get on_load to support has_tool, and some packages rely on it to set deps, and I haven't thought of a good way to get around that yet.
Xmake Version
2.9.4 dev
Operating System Version and Architecture
macOS x86_64
Describe Bug
On macOS arm64 runner when building a x86_64 library and having a host library (for example for compiling shaders), xmake will fail to find the right toolchain to build the host library.
This worked right but broke about a week ago.
Also while writing this issue it appears x86 and arm64 have the same issue on Windows: https://github.com/SirLynix/xmake-macos-issue/actions/runs/10318714333/job/28565640114
Expected Behavior
That xmake compiles fine.
Project Configuration
the target is irrelevant as the issue will happen when installing packages.
I made a simple project reproducing the bug here: https://github.com/SirLynix/xmake-macos-issue
Additional Information and Error Logs
When xmake compiles the x86_64 fmt it finds the right toolchain:
but when it tries to compile the host (arm64 version):
full logs
additionnally removing the -z ldflags and adding verbose linker results in
https://github.com/NazaraEngine/NazaraEngine/actions/runs/10250822598/job/28359351809#step:11:31022