Closed JinShil closed 2 months ago
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.
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas See info in area-owners.md if you want to be subscribed.
Author: | JinShil |
---|---|
Assignees: | - |
Labels: | `untriaged`, `area-NativeAOT-coreclr`, `needs-area-label` |
Milestone: | - |
The solution is to either set <ObjCopyName>aarch64-linux-gnu-objcopy
property, or install llvm-objcopy
, which supports multiple architectures.
The solution is to either set
<ObjCopyName>aarch64-linux-gnu-objcopy
property, or installllvm-objcopy
, which supports multiple architectures.
I argue that is a workaround, not a solution. The build system should be able to determine what tools the system has and make the correct choice. If a supported tool is not available then it should display an error saying so with information about which tools need to be installed. It should never use the wrong tool.
I don't have strong opinions on this, but when we added this support, the idea/feedback was to keep it simple and keep symbol stripping opt-in. Now we have changed it to opt-out in main
branch, so things are evolving and this can too.
If you want this (somewhat niche) scenario to work seamlessly, then feel free to send a PR. We also do not have version-awareness in NativeAOT build integration. Ideally, we should introspect the matching tools the way we do in runtime build (that takes care of 'matching toolchain' && 'matching version' before resorting to 'fallback') https://github.com/dotnet/runtime/blob/c45caed8e96368f30806f86abc945cc5236205cf/eng/native/configuretools.cmake#L24-L70 but implementing cmake-like introspection in NativeAOT's msbuild targets without the dependency on cmake is quite involved.
This is the general "crossbuild is difficult to setup" bucket. We now document one way to set it up as part of official docs here: https://learn.microsoft.com/en-us/dotnet/core/deploying/native-aot/cross-compile#linux. It's unlikely we'd do more tool introspection because it would just be a bugfarm.
Describe the bug
The following output shows the problem:
To Reproduce
dotnet publish
command in an attempt to publish it for Linux ARM64objcopy
instead ofaarch64-linux-gnu-objcopy
to strip the symbolsFurther technical details