-
Notifications
You must be signed in to change notification settings - Fork 328
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.sh
fails while building image for amd64 on aarch64
#313
Comments
The problem is arm64e, it’s a very unstable API it should really be removed from osxcross as even on macOS Xcode uses arm64 not arm64e (only binaries from Apple even use arm64e) |
hm, thats interesting, have you got any more details on that? |
Not really, arm64e and x86_64h are not used on macOS by anything expect maybe Apple (not checked for an x86_64h slice on my M1 yet)
Within that docker image I’d assume it’s just falling back to the arm64 symbols same for x86_64h. I had tried the initial test for this and the arm64e binary failed to run, can’t remember about the x86_64h ad that wasn’t what was asked. Maybe Apple Clang/ld64 is attempting to be over smart and tripping itself up. Outside of some weird configuration I’m not even sure why anyone would want to compile osxcross to target arm64 in any Mac that can run macOS Big Sur or later as that can all be done natively. Hell you can even still target i386 with a 10.13.SDK |
it didn't help unfortunately. I think issue is rather with c++ symbols not installed. from logs clang++ fails on all of architectures.
just to clarify. i'm trying to build |
Can you do
And see what architecture it was compiled for, also do the same for arm64-apple-darwin21.1-clang++ |
just feels like c++ symbols are missing |
How was the SDK package generated?, let’s try ruling that out. |
downloaded 11.3 from here and 12.0 from here |
wonder if absence of libstdc++ in sdk > 10.14 could be case |
The SDKs from phracker are only useful for use on actual macOS using XCode. (Though 10.13 was broken last I checked) The SDKs from joseluisq should be packaged correctly but I’ve not had chance to verify them yet.
That’s another matter entirely and only really matter if your attempting to target basically ancient versions of Mac OSX, that was the default before Mac OSX 10.7 added libc++ that eventually become the default. As you mention having access to actual Mac hardware you should instead generate the SDK yourself to ensure it was done correctly. |
apparently something is missing where libraries search occurs this works
does not work. note there is no
|
Hum that does seem strange. Try setting the following in the environment That should inject everything but it’s possible that Apple changed things again meaning that passing |
does not help, weirdly |
There shouldn’t be a need to pass the SDK location, the -clang wrapper should at least inject that by default so maybe just pass |
you're right, SDK location is unnecessary.
|
I don’t believe editing the test to pass I believe the more correct way would be having the clang wrapper passing |
Hum if the wrapper ends with |
not sure but looks like |
From a quick look over it does seem that’s the case. I guess the next thing to figure out is what’s the first SDK that required passing |
as far as i can tell |
fixes tpoechtrager#313 Signed-off-by: Artur Troian <[email protected]>
I’ll attempt to do additional verifications when I’m free. But if that already gets things working then awesome job. |
fixes tpoechtrager#313 Signed-off-by: Artur Troian <[email protected]>
i'm building multiarch golang-cross image. originally image was built to run on
amd64
but as M1 macs are broadbanding now i wanna create multiarch image.amd64
on Intel machine works fineaarch64
on M1 works fineamd64
on M1 fails with linker error below.any thoughts what i am missing?
linker errors
dockerfile stages
The text was updated successfully, but these errors were encountered: