You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today dotnet core 2.1 is running on Alpine for x86.
It is possible to run docker on an embedded system (for example ResinOS) and in order to do this efficiently a small container image is needed, hence the need for Alpine support.
It is expected to have symmetry in OS support between different CPU architectures where possible
(If/when this is implemented the docker images for running .net core application should be available. )
Oh, that's unfortunate. But as for your previous comment, why would we need to ship the toolchain? Wouldn't compiling the runtime bits with it be sufficient?
(for some reason, cmake picks up /bin/c++ instead of /bin/clang++ in this docker)
I have seen cases when clang package has installed clang, but clang++-3.x or vice versa. In other words, the version was just on one of those and it was causing the same or similar issue. Adding a symbolic link to make it symmetric helped.
I was thinking that we might need to ship the generated ABI libs
I believe the ABI is the same and the only difference is in the supported instructions inside the binaries. So we should be able to build dotnet core using the self compiled toolchain, but the result should work on the Alpine as is.
Update: I have the build working for both arm and arm64, but I need to test it on a real device / container yet to make sure the compiled binaries are 100% correct.
@kasper3 the steps you have provided were really a great guideline. However, they were actually compiling under the qemu and so the compilation was really slow. So I have implemented the cross build the same way as we build for debian / ubuntu. That means that the build system's clang is used for building and the rootfs just provides the libraries / headers to compile / link against.
The only issue was that the LD sets the .interp section to point to the glibc loader instead of the musl one, since it knows nothing about musl. For the time being, I've added a linker option that asks it to set it explicitly to the musl one, but I am not sure if that's a correct solution.
I am sorry for the delay, but I was OOF this and the last week Monday and Tuesday.
Activity
RussKeldorph commentedon Apr 10, 2018
@Petermarcu @richlander @janvorli
janvorli commentedon Apr 10, 2018
See my comment https://github.com/dotnet/coreclr/issues/9370#issuecomment-364912259
We want to support ARM32 Alpine, but in order to do that, we need a way to cross build for Alpine arm on x64. The cross build mechanisms that we have in our build now works only for debian based distros and uses qemu-debootstrap. That would not work for Alpine.
In the comment above, I've identified a potential way to do that.
janvorli commentedon Apr 19, 2018
Oh, that's unfortunate. But as for your previous comment, why would we need to ship the toolchain? Wouldn't compiling the runtime bits with it be sufficient?
janvorli commentedon Apr 20, 2018
I have seen cases when clang package has installed
clang, butclang++-3.xor vice versa. In other words, the version was just on one of those and it was causing the same or similar issue. Adding a symbolic link to make it symmetric helped.I believe the ABI is the same and the only difference is in the supported instructions inside the binaries. So we should be able to build dotnet core using the self compiled toolchain, but the result should work on the Alpine as is.
janvorli commentedon Apr 25, 2018
@kasper3 that is awesome! Thank you so much for looking into it and making it work!
I'll be happy to do the integration.
sdmaclea commentedon Apr 26, 2018
@janvorli Would you be willing to do this for arm64 also. I think alpine is interesting in arm64 docker scenarios because it is lightweight.
janvorli commentedon Apr 26, 2018
@sdmaclea sure, I think there would be only minor differences needed for arm64.
I'll get to it next week, I'm flying home from Redmond this afternoon.
janvorli commentedon May 9, 2018
Update: I have the build working for both arm and arm64, but I need to test it on a real device / container yet to make sure the compiled binaries are 100% correct.
@kasper3 the steps you have provided were really a great guideline. However, they were actually compiling under the qemu and so the compilation was really slow. So I have implemented the cross build the same way as we build for debian / ubuntu. That means that the build system's clang is used for building and the rootfs just provides the libraries / headers to compile / link against.
The only issue was that the LD sets the .interp section to point to the glibc loader instead of the musl one, since it knows nothing about musl. For the time being, I've added a linker option that asks it to set it explicitly to the musl one, but I am not sure if that's a correct solution.
I am sorry for the delay, but I was OOF this and the last week Monday and Tuesday.
If you are interested, you can check the current state here:
janvorli/coreclr@0a03ff8
32 remaining items
JensNordenbro commentedon Mar 21, 2022
Is this status really correct?
The related #2021 seems to be done.
ericstj commentedon Mar 22, 2022
I believe it is supported. We call that out here:
https://github.com/dotnet/core/blob/main/release-notes/6.0/supported-os.md
Linked from here: https://github.com/dotnet/core/blob/main/os-lifecycle-policy.md
This issue should be closed.
The screenshotted document should probably be fixed. Looks like you found that here https://github.com/dotnet/dotnet-docker/blob/main/samples/dotnetapp/README.md?msclkid=510db129aa1811eca844fa3c0dbee4cf#build-an-image-for-arm32-and-arm64
Rather than transferring this issue could you instead file an issue in that repo, or propose a PR if it's straightforward?