Cross building from x64 to arm64 fails compiling using clang #4573
Replies: 8 comments 1 reply
-
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Beta Was this translation helpful? Give feedback.
-
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
Beta Was this translation helpful? Give feedback.
-
Some relevant bits from the log:
Could it be that the compiler being used can't target arm64 and the compiler that can target arm64 isn't being picked up? |
Beta Was this translation helpful? Give feedback.
-
Yeah, that seems to be the case. It looks as though void's clang can't cross compile, and they use cross-aarch64-linux-gnu instead as a compiler. If I install clang then dotnet's build script tries to use it and fails. If I don't install it then dotnet's build script will complain it can't find clang. In both cases the $CC variable is set to cross-aarch64-linux-gnu I don't know how dependent dotnet is on clang, but would it be possible to use something else? Ideally though an env var or flag? |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
-
I haven't done any cross-builds for arm64 myself, but when I compare with ppc64le cross builds (which I do build): I set some env vars:
My build command is then literally:
|
Beta Was this translation helpful? Give feedback.
-
[Triage] This appears as a discussion with no actionable changes necessary within source-build. Converting to a discussion. Please open follow-up issues if any source changes are needed. |
Beta Was this translation helpful? Give feedback.
-
Describe the Bug
When cross building from x64 to arm64 the process fails as clang "is not able to compile a simple test program."
Steps to Reproduce
In the dotnet/dotnet repo on version v8.0.7 the following command should cause the issue
ROOTFS_DIR=/usr/aarch64-linux-gnu bash ./build.sh --clean-while-building --online --source-repository https://github.com/dotnet/dotnet --source-version 8be139ddde52d33e24c7d82f813248ff9fc54b97 -- -p:TargetArchitecture=arm64 -p:CrossBuild=true
The full void template is available on github (very much WIP)
Other Information
The relevant output log of the build process can be found here
(I have omitted the void-related stuff, such as installing dependencies, as well as the prep.sh output. If it's relevant I can paste it as well)
Beta Was this translation helpful? Give feedback.
All reactions