aspnet / libuv-package

NuGet packages for libuv
Other
19 stars 14 forks source link

Support Alpine linux #23

Open natemcmaster opened 6 years ago

natemcmaster commented 6 years ago

Requires compiling for musl, not glibc.

Workaround Users can remove libuv from their app and rely on the system's installed version of libuv instead.

<ItemGroup>
  <PackageReference Include="Libuv" Version="1.10.0" ExcludeAssets="Native" />
</ItemGroup>

Then, install libuv on host machines.

apk add libuv
ln -s /usr/lib/libuv.so.1 /usr/lib/libuv.so
muratg commented 6 years ago

cc @glennc

Petermarcu commented 6 years ago

Can you flip back to using sockets to unblock temporarily?

natemcmaster commented 6 years ago

At the moment, Kestrel's default is still sockets in 2.1 preview1 bits. This default is subject to change before RTM. https://github.com/aspnet/KestrelHttpServer/issues/2220

Petermarcu commented 6 years ago

Is see, I haven't seen the error for Alpine but what is blocking then? Is it that tests are failing on Alpine because they are explicitly running on libuv?

natemcmaster commented 6 years ago

Right. When I say it's a blocker, I mean blocking moving forward with Alpine in a supported way. We can disable tests, and produce a shared framework is broken for several key scenarios on Alpine...but I wouldn't want to ship that.

Petermarcu commented 6 years ago

We need to unblock product construction first. Alpine is already noted as a best effort OS and not in our supported list. Could you just disable the tests on Alpine? I also thought tests were not critical path for product construction

natemcmaster commented 6 years ago

Yes we can do those things. I updated my PR to the CLI last night to skip tests and pull our portable sharedfx even though it won't work. https://github.com/dotnet/cli/pull/8341

Petermarcu commented 6 years ago

Sounds good. Thanks! Hopefully Alpine will be off the blocking list then.

natemcmaster commented 6 years ago

Punting to backlog as we want to make sockets the default transport in Kestrel. Users could workaround for now by installing the libuv apk.

Petermarcu commented 6 years ago

Did we make the call on switching to Sockets as the default for Kestrel? Can we drop the libuv package from the nuget dependency graph too?

natemcmaster commented 6 years ago

Yes. I’ll share our design meeting notes on Monday

Sent from Outlookhttps://aka.ms/qtex0l for iOS

natemcmaster commented 6 years ago

Design meeting notes from March 2, 2018

See also https://github.com/aspnet/KestrelHttpServer/issues/2360, https://github.com/aspnet/KestrelHttpServer/issues/2361

Petermarcu commented 6 years ago

Do you want to support the All package and libuv transport on Alpine? If so, wouldn't you still need this issue?

natemcmaster commented 6 years ago

@muratg we should still probably consider this. Although you can workaround it with a globally installed libuv, it's not always easy to get that setup correctly.

ghost commented 6 years ago

@Petermarcu, @natemcmaster, I have built libuv binary on Alpine Linux with https://github.com/aspnet/libuv-build/pull/34. Can this be shipped with 2.1? We can also build libuv for arm32 to match the dotnet-core supported platform matrix: https://github.com/aspnet/Universe/issues/554.

natemcmaster commented 6 years ago

We are currently not planning on re-building the Libuv package to support Alpine in 2.1. However, we are still planning to enable ASP.NET Core for Alpine (already available in nightly builds, see https://hub.docker.com/r/microsoft/dotnet-nightly.) In 2.1, Kestrel will no longer rely on Libuv by default, so this issue isn't essential to getting ASP.NET Core + Alpine working.

We don't have plans to support arm32 in ASP.NET Core, at the moment.

muratg commented 5 years ago

Moved this to 3.0.0