Title: PowerShell build fails on GNU/Linux systems without the en_US locale · Issue #20941 · PowerShell/PowerShell · GitHub
Open Graph Title: PowerShell build fails on GNU/Linux systems without the en_US locale · Issue #20941 · PowerShell/PowerShell
X Title: PowerShell build fails on GNU/Linux systems without the en_US locale · Issue #20941 · PowerShell/PowerShell
Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerShell 5.1 and PowerShell. Steps to reprodu...
Open Graph Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
X Description: Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/20941
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"PowerShell build fails on GNU/Linux systems without the en_US locale","articleBody":"### Prerequisites\r\n\r\n- [X] Write a descriptive title.\r\n- [X] Make sure you are able to repro it on the [latest released version](https://github.com/PowerShell/PowerShell/releases)\r\n- [X] Search the existing issues.\r\n- [X] Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- [X] Refer to [Differences between Windows PowerShell 5.1 and PowerShell](https://learn.microsoft.com/powershell/scripting/whats-new/differences-from-windows-powershell).\r\n\r\n### Steps to reproduce\r\n\r\n1. check /etc/locale.gen it is does not contain any en_US locale, remove them,\r\n2. regen locales with locale-gen,\r\n3. switch to a non-en_US locale, for example on Gentoo use `eselect locale set ...`\r\n\r\nI would like to know if we can use the C locale for build and the \"why\" if it is not possible.\r\nIf it is impossible to use other locale, \r\nthen from-source distributions like Gentoo, Guix, Nix, LFS, etc. \r\nhave to update their build scripts.\r\n\r\n\r\n### Expected behavior\r\n\r\n```console\r\nBuild passes with success, maybe with some features unavailable?\r\n```\r\n\r\n\r\n### Actual behavior\r\n\r\n```console\r\nBuild fails.\r\n```\r\n\r\n\r\n### Error details\r\n\r\n```console\r\n> dotnet-8.0 build --configuration Release --no-restore --no-self-contained --output /var/tmp/portage/app-shells/pwsh-7.4.0/work/pwsh-7.4.0_net8.0_Release --runtime linux-x64 -maxCpuCount:6 -p:StripSymbols=true -p:NativeDebugSymbols=false -p:WarningLevel=1 src/powershell-unix/powershell-unix.csproj\r\n\r\n\r\nMSBuild version 17.8.3+195e7f5a3 for .NET\r\n /bin/sh: line 1: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\n /bin/sh: line 1: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\n /bin/sh: line 1: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\n /bin/sh: line 1: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\n /bin/sh: line 1: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\n /bin/sh: line 1: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\n /bin/sh: line 1: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)\r\n PSVersionInfoGenerator -> /var/tmp/portage/app-shells/pwsh-7.4.0/work/pwsh-7.4.0_net8.0_Release/SMA.Generator.dll\r\n/usr/lib64/dotnet-sdk-8.0/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.GenerateAssemblyInfo.targets(226,5): error MSB4044: The \"GetAssemblyVersion\" task was not given a value for the required parameter \"NuGetVersion\". [/var/tmp/portage/app-shells/pwsh-7.4.0/work/pwsh-7.4.0/src/System.Management.Automation/System.Management.Automation.csproj]\r\n\r\nBuild FAILED.\r\n\r\n/usr/lib64/dotnet-sdk-8.0/sdk/8.0.100/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.GenerateAssemblyInfo.targets(226,5): error MSB4044: The \"GetAssemblyVersion\" task was not given a value for the required parameter \"NuGetVersion\". [/var/tmp/portage/app-shells/pwsh-7.4.0/work/pwsh-7.4.0/src/System.Management.Automation/System.Management.Automation.csproj]\r\n 0 Warning(s)\r\n 1 Error(s)\r\n\r\nTime Elapsed 00:00:06.59\r\n```\r\n\r\n\r\n### Environment data\r\n\r\n```powershell\r\n> Paste verbatim output from $PSVersionTable below.\r\n\r\nNone.\r\n\r\n> locale\r\n\r\n\r\nLANG=pl_PL.utf8\r\nLC_CTYPE=\"pl_PL.utf8\"\r\nLC_NUMERIC=\"pl_PL.utf8\"\r\nLC_TIME=\"pl_PL.utf8\"\r\nLC_COLLATE=POSIX\r\nLC_MONETARY=\"pl_PL.utf8\"\r\nLC_MESSAGES=\"pl_PL.utf8\"\r\nLC_PAPER=\"pl_PL.utf8\"\r\nLC_NAME=\"pl_PL.utf8\"\r\nLC_ADDRESS=\"pl_PL.utf8\"\r\nLC_TELEPHONE=\"pl_PL.utf8\"\r\nLC_MEASUREMENT=\"pl_PL.utf8\"\r\nLC_IDENTIFICATION=\"pl_PL.utf8\"\r\nLC_ALL=\r\n```\r\n\r\n\r\n### Visuals\r\n\r\nnone.","author":{"url":"https://github.com/xgqt","@type":"Person","name":"xgqt"},"datePublished":"2023-12-16T20:21:54Z","url":"https://github.com/PowerShell/PowerShell/issues/20941"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cb1b976b-ea6d-c6bd-8894-c68303ea81d2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E2B4:C816B:AD6DA0:F38B3A:6AFDD000 |
| html-safe-nonce | 59c019ff1e636d73952f4a0ab0a106ca0ce5f7ac575043d99051bd8f056500e4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMkI0OkM4MTZCOkFENkRBMDpGMzhCM0E6NkFGREQwMDAiLCJ2aXNpdG9yX2lkIjoiMTU1MzU4MjkzMjY1MzM4MzY4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 6e4854283aed717795bf28103cfbd2bfeaddacc6642527c3500ea83b51b9888b |
| hovercard-subject-tag | issue:2044947316 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/20941/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4073008a3939a9e9fab82a508492e20e1161b94de8a051ae980a98face54ebe8/PowerShell/PowerShell/issues/20941 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4073008a3939a9e9fab82a508492e20e1161b94de8a051ae980a98face54ebe8/PowerShell/PowerShell/issues/20941 |
| og:image:alt | Prerequisites Write a descriptive title. Make sure you are able to repro it on the latest released version Search the existing issues. Refer to the FAQ. Refer to Differences between Windows PowerSh... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | xgqt |
| hostname | github.com |
| expected-hostname | github.com |
| None | 26886a40b582b821a7a76351e0a2f42b6d6160854b6e2520db24f31fd7be5da7 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 68ebaa631a1d248d69ebde4b9c5defd3a19aeb2f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width