libuv-package icon indicating copy to clipboard operation
libuv-package copied to clipboard

Support Alpine linux

Open natemcmaster opened this issue 7 years ago • 17 comments

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

natemcmaster avatar Jan 08 '18 23:01 natemcmaster

cc @glennc

muratg avatar Jan 08 '18 23:01 muratg

Can you flip back to using sockets to unblock temporarily?

Petermarcu avatar Jan 09 '18 02:01 Petermarcu

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

natemcmaster avatar Jan 09 '18 02:01 natemcmaster

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?

Petermarcu avatar Jan 09 '18 04:01 Petermarcu

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.

natemcmaster avatar Jan 09 '18 06:01 natemcmaster

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

Petermarcu avatar Jan 09 '18 15:01 Petermarcu

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

natemcmaster avatar Jan 09 '18 15:01 natemcmaster

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

Petermarcu avatar Jan 09 '18 16:01 Petermarcu

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

natemcmaster avatar Mar 03 '18 00:03 natemcmaster

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?

Petermarcu avatar Mar 03 '18 01:03 Petermarcu

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

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

natemcmaster avatar Mar 03 '18 01:03 natemcmaster

Design meeting notes from March 2, 2018

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

natemcmaster avatar Mar 05 '18 19:03 natemcmaster

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

Petermarcu avatar Mar 10 '18 03:03 Petermarcu

@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.

natemcmaster avatar Mar 12 '18 17:03 natemcmaster

@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.

ghost avatar Apr 01 '18 18:04 ghost

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.

natemcmaster avatar Apr 02 '18 20:04 natemcmaster

Moved this to 3.0.0

muratg avatar Oct 22 '18 20:10 muratg