NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.19k stars 14.2k forks source link

dotnet-sdk_3 broken build #172558

Closed peterromfeldhk closed 2 years ago

peterromfeldhk commented 2 years ago

Steps To Reproduce

nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/c5dbc6d16165577428f03a50fad798088c5a7c58.tar.gz  -p azure-functions-core-tools

Build log

⋊> ~/r/p/nixpkgs on master ◦ nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/c5dbc6d16165577428f03a50fad798088c5a7c58.tar.gz  -p azure-functions-core-tools                                                           14:43:24
unpacking 'https://github.com/NixOS/nixpkgs/archive/c5dbc6d16165577428f03a50fad798088c5a7c58.tar.gz'...
these derivations will be built:
  /nix/store/ahnb5d1i6x09n5cvhpi29i04diysv33a-dotnet-sdk-3.1.415.drv
  /nix/store/yxjj9xnzhbgmk137jj73jkfqy24b9xwf-azure-functions-core-tools-3.0.3785.drv
building '/nix/store/ahnb5d1i6x09n5cvhpi29i04diysv33a-dotnet-sdk-3.1.415.drv'...
unpacking sources
unpacking source archive /nix/store/v341z9d3h8f9kxx1k84r5wh60akz3ysw-dotnet-sdk-3.1.415-linux-x64.tar.gz
source root is .
setting SOURCE_DATE_EPOCH to timestamp 1635274917 of file ./sdk/3.1.415/Sdks/NuGet.Build.Tasks.Pack/CoreCLR/NuGet.Build.Tasks.Pack.dll
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
post-installation fixup
rewriting symlink /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415/bin/dotnet to be relative to /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415
strip is /nix/store/bg35nfwn6zd616facdywiysgpprfvsji-gcc-wrapper-11.3.0/bin/strip
stripping (with command strip and flags -S) in /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415/bin
patching script interpreter paths in /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415
checking for references to /build/ in /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415...
running install tests
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
   at System.Environment.FailFast(System.String)
   at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
   at System.Globalization.GlobalizationMode..cctor()
   at System.Globalization.CultureData.CreateCultureWithInvariantData()
   at System.Globalization.CultureData.get_Invariant()
   at System.Globalization.CultureInfo..cctor()
   at System.String.ToLowerInvariant()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
   at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
   at Microsoft.DotNet.Cli.Program.Main(System.String[])
/nix/store/crpnj8ssz0va2q0p5ibv9i6k6n52gcya-stdenv-linux/setup: line 1373:   125 Aborted                 (core dumped) $out/bin/dotnet --info
builder for '/nix/store/ahnb5d1i6x09n5cvhpi29i04diysv33a-dotnet-sdk-3.1.415.drv' failed with exit code 134
cannot build derivation '/nix/store/yxjj9xnzhbgmk137jj73jkfqy24b9xwf-azure-functions-core-tools-3.0.3785.drv': 1 dependencies couldn't be built
error: build of '/nix/store/yxjj9xnzhbgmk137jj73jkfqy24b9xwf-azure-functions-core-tools-3.0.3785.drv' failed

Additional context

was working fine previously:

nix-shell -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/263ef4cc4146c9fab808085487438c625d4426a9.tar.gz  -p azure-functions-core-tools

Notify maintainers

@jshcmpbll

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.17.5, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - channels(root): `"nixos-21.11.337422.3c5ae9be1f1, home-manager"`
 - channels(peter): `""`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
peterromfeldhk commented 2 years ago

the error seems to come from dotnet-sdk_3

jshcmpbll commented 2 years ago

Seeing the same results as @peterromfeldhk I was away from home and now my system fails to build 😭

@kuznero I see you are the maintainer for the dotnet compiler. Are you aware sdk_3_1 is failing?

Build log

git/nixpkgs [master●] nix-build -A dotnetCorePackages.sdk_3_1
these derivations will be built:
  /nix/store/ahnb5d1i6x09n5cvhpi29i04diysv33a-dotnet-sdk-3.1.415.drv
building '/nix/store/ahnb5d1i6x09n5cvhpi29i04diysv33a-dotnet-sdk-3.1.415.drv'...
unpacking sources
unpacking source archive /nix/store/v341z9d3h8f9kxx1k84r5wh60akz3ysw-dotnet-sdk-3.1.415-linux-x64.tar.gz
source root is .
setting SOURCE_DATE_EPOCH to timestamp 1635274917 of file ./sdk/3.1.415/Sdks/NuGet.Build.Tasks.Pack/CoreCLR/NuGet.Build.Tasks.Pack.dll
patching sources
configuring
no configure script, doing nothing
building
no Makefile, doing nothing
installing
post-installation fixup
rewriting symlink /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415/bin/dotnet to be relative to /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415
strip is /nix/store/bg35nfwn6zd616facdywiysgpprfvsji-gcc-wrapper-11.3.0/bin/strip
stripping (with command strip and flags -S) in /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415/bin
patching script interpreter paths in /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415
checking for references to /build/ in /nix/store/zaak5j4w1hm1cdl4iijks8afgcb51gz0-dotnet-sdk-3.1.415...
running install tests
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
   at System.Environment.FailFast(System.String)
   at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
   at System.Globalization.GlobalizationMode..cctor()
   at System.Globalization.CultureData.CreateCultureWithInvariantData()
   at System.Globalization.CultureData.get_Invariant()
   at System.Globalization.CultureInfo..cctor()
   at System.String.ToLowerInvariant()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetArch()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment..cctor()
   at Microsoft.DotNet.PlatformAbstractions.RuntimeEnvironment.GetRuntimeIdentifier()
   at Microsoft.DotNet.Cli.MulticoreJitProfilePathCalculator.CalculateProfileRootPath()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.StartCliProfileOptimization()
   at Microsoft.DotNet.Cli.MulticoreJitActivator.TryActivateMulticoreJit()
   at Microsoft.DotNet.Cli.Program.Main(System.String[])
/nix/store/crpnj8ssz0va2q0p5ibv9i6k6n52gcya-stdenv-linux/setup: line 1373:   125 Aborted                 (core dumped) $out/bin/dotnet --info
builder for '/nix/store/ahnb5d1i6x09n5cvhpi29i04diysv33a-dotnet-sdk-3.1.415.drv' failed with exit code 134
error: build of '/nix/store/ahnb5d1i6x09n5cvhpi29i04diysv33a-dotnet-sdk-3.1.415.drv' failed
cideM commented 2 years ago

I think this issue should be renamed to indicate that it's DotNet SDK that's broken. I think that gets more attention than some Azure thing.

I ran a git bisect and the offending commit appears to be 4f55f016f5fe90aedeaa627f629bc095f4ea2ee0 which switched the top level icu from icu70 -> icu71. Indeed, if I change the derivation for DotNet SDK it works if I then run nix-build -A dotnet-sdk_3 .

diff --git a/pkgs/development/compilers/dotnet/build-dotnet.nix b/pkgs/development/compilers/dotnet/build-dotnet.nix
index 4a30107bbec..e44dd129977 100644
--- a/pkgs/development/compilers/dotnet/build-dotnet.nix
+++ b/pkgs/development/compilers/dotnet/build-dotnet.nix
@@ -11,7 +11,7 @@ assert builtins.elem type [ "aspnetcore" "runtime" "sdk"];
 , writeText
 , libunwind
 , openssl
-, icu
+, icu70
 , libuuid
 , zlib
 , curl
@@ -40,7 +40,7 @@ in stdenv.mkDerivation rec {
     zlib

     curl
-    icu
+    icu70
     libunwind
     libuuid
     openssl

I'm not sure if this is something that should be committed or if there are issues with using a different icu lib.

con-f-use commented 2 years ago

Yeah, came across that when building python-language-server today. A fix would sure be nice :wink:

cideM commented 2 years ago

It's being fixed in https://github.com/NixOS/nixpkgs/pull/172335 @con-f-use

jshcmpbll commented 2 years ago

Issue seems resolved. I think this can be closed

peterromfeldhk commented 2 years ago

~im still getting ICU error :(~ fixed by adding DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true envvar