Add `libatomic1` to Ubuntu Dependencies
Summary
libatomic1 is a dependency that is explicitly installed in the sdk docker image, but is not specified as a dependency in the documentation, leading to unexpected behavior for users who perform manual/scripted installation of sdks.
Fixes: Sdk#51677
Internal previews
| 📄 File | 🔗 Preview link |
|---|---|
| docs/core/install/linux-ubuntu-install.md | Install .NET SDK or .NET Runtime on Ubuntu |
Thanks for noticing and fixing this. I have a query open to the product team to validate this (on either the Dockerfile or the backing requirements.json file for .NET)
@Cryptoc1 I think the discussion I'm seeing is that this lib is very useful for developer scenarios, but it's not specifically a dependency.
@adegeo would it make sense to have separate "SDK Dependencies" and "Runtime Dependencies" lists?
I don't think so. It's not a dependency either way. However, this is the list of dependencies and I would say if this list gets the package, it makes sense to update the docs to follow: https://github.com/dotnet/core/blob/main/release-notes/10.0/os-packages.json
@adegeo I'm not quite following...
Per Sdk#51677, if a command like dotnet build produces an error because a library that is expected to be installed is not installed, then I would consider that library to be a dependency? Am I misunderstanding, or should I re-open my issue against the Sdk, in-order to get the os-packages.json file updated?
Ahhhhh I see, thank you for clarifying. @leecow @richlander Should we add this to the dependencies json if it's required for the SDK? Or are we really only documenting the runtime-only dependencies?
I'm not sure I understand the dotnet build dependency. I installed 10.0.100 using dotnet-install.sh on a green 25.10 image and the only other thing I needed to install to run dotnet --info, dotnet new console, and dotnet build was libicu76.
I thought this library was a dependency on libmsquic so only relevant for HTTP/3 scenario. Is that true?
Here is example output of the error (which occurred when building/publishing a BlazorWASM project):
Restore complete (0.5s)
Determining projects to restore...
Restored /home/cryptoc1/Developer/temp/temp.csproj (in 134 ms).
temp net10.0 browser-wasm failed with 2 error(s) (1.7s)
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Compiling native assets with /home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.linux-x64/10.0.0/Sdk/../tools/emscripten/emcc with -Oz. This may take a while ...
[3/4] driver.c -> driver.o [took 0.07s]
[2/4] pinvoke.c -> pinvoke.o [took 0.07s]
[1/4] corebindings.c -> corebindings.o [took 0.07s]
[4/4] runtime.c -> runtime.o [took 0.08s]
Linking for initial memory $(WasmInitialHeapSize)=33554432 bytes. Set this msbuild property to change the value.
Linking with emcc with -O2. This may take a while ...
/home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.linux-x64/10.0.0/tools/bin/clang --version
/home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Node.linux-x64/10.0.0/tools/bin/node /home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.linux-x64/10.0.0/tools/emscripten/src/compiler.mjs /tmp/tmp5dyrehcf.json --symbols-only
/home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Node.linux-x64/10.0.0/tools/bin/node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory
emcc : error '/home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Node.linux-x64/10.0.0/tools/bin/node /home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.Emscripten.3.1.56.Sdk.linux-x64/10.0.0/tools/emscripten/src/compiler.mjs /tmp/tmp5dyrehcf.json --symbols-only' failed (returned 127)
/home/cryptoc1/.dotnet/packs/Microsoft.NET.Runtime.WebAssembly.Sdk/10.0.0/Sdk/BrowserWasmApp.targets(522,5): error MSB3073: The command "emcc "@/home/cryptoc1/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/10.0.0/runtimes/browser-wasm/native/src/emcc-default.rsp" -msimd128 "@/home/cryptoc1/.dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.browser-wasm/10.0.0/runtimes/browser-wasm/native/src/emcc-link.rsp" "@/home/cryptoc1/Developer/temp/obj/Release/net10.0/wasm/for-publish/emcc-link.rsp"" exited with code 1.
temp net10.0 browser-wasm failed (4.4s) → bin/Release/net10.0/wwwroot
Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
Optimizing assemblies for size. This process might take a while.
temp.sln failed with 1 warning(s) (0.0s)
/home/cryptoc1/.dotnet/sdk/10.0.100/Current/SolutionFile/ImportAfter/Microsoft.NET.Sdk.Solution.targets(36,5): warning NETSDK1194: The "--output" option isn't supported when building a solution. Specifying a solution-level output path results in all projects copying outputs to the same directory, which can lead to inconsistent builds.
Build failed with 2 error(s) and 1 warning(s) in 6.8s
It appears that libatomic is required by node (bundled within the Microsoft.NET.Runtime.Emscripten.3.1.56.Node.linux-x64 pack), for usage of emcc/Emscripten compiler.