git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git can not be built for s390x since update to git-2.38.0

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Nov 22, 2022, 22:20 UTC
Message-ID
<CAPig+cRfheaDMuQ501dABZnW0xW0+YbicoPL4665GtdjtR1fSQ@mail.gmail.com>
In-Reply-To
<221122.86v8n6abeh.gmgdl@evledraar.gmail.com>

On Tue, Nov 22, 2022 at 5:10 PM Ævar Arnfjörð Bjarmason <avarab@gmail.com> wrote:

Show 11 quoted lines
> On that platform, this also works:
>         diff --git a/t/chainlint.pl b/t/chainlint.pl
>         @@ -656,7 +656,7 @@ sub ncores {
>                 # Windows
>                 return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});
>                 # Linux / MSYS2 / Cygwin / WSL
>         -       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor\s*:/, <>)); } if -r '/proc/cpuinfo';
>         +       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^(?:CPU\d+|processor\s*):/, <>)); } if -r '/proc/cpuinfo';
>                 # macOS & BSD
>                 return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;
>                 return 1;
Thanks for digging into this. Your diagnosis matches the diagnosis in [1].
Show 6 quoted lines
> Anyway, the "fix" here can also be:
>
>          $jobs = ncores() if $jobs < 1;
>         +$jobs = 1 if $jobs < 1;
>
> I.e. it's another case of bad /proc/cpuinfo parsing.

Yup, I suggested the same in [2] as a would-be-nice-to-have-eventually patch, although only as a fallback, not as a proper fix for the reported problem since a real fix (as you have above and as in [1]) would return the correct core count.

[1]: https://lore.kernel.org/git/CANYNYEHXU8ivgAOa8EO5e9kOcbu6XF7rj+9EcSrbDQE+Rvyw_Q@mail.gmail.com/ [2]: https://lore.kernel.org/git/CAPig+cQ6_7wf6C280Rqi7mcTCiQp-n5GiLWTPazfcUcGFeZi0g@mail.gmail.com/

Previous: Ævar Arnfjörð Bjarmason
Message 5 of 5 in “Re: git can not be built for s390x since update to git-2.38.0”
  1. Eric SunshineNov 21, 2022
  2. Ævar Arnfjörð BjarmasonNov 22, 2022
  3. Eric SunshineNov 22, 2022
  4. Ævar Arnfjörð BjarmasonNov 22, 2022
  5. Eric SunshineNov 22, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.