git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: Sarah Julia Kriesch <sarah.kriesch@opensuse.org>,
	Git List <git@vger.kernel.org>
Subject: Re: git can not be built for s390x since update to git-2.38.0
Date: Tue, 22 Nov 2022 17:20:27 -0500	[thread overview]
Message-ID: <CAPig+cRfheaDMuQ501dABZnW0xW0+YbicoPL4665GtdjtR1fSQ@mail.gmail.com> (raw)
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:
> 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].

> 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/

  reply	other threads:[~2022-11-22 22:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4657a19c-89c3-2237-9e6b-db897a492072@opensuse.org>
2022-11-21  5:12 ` git can not be built for s390x since update to git-2.38.0 Eric Sunshine
2022-11-22 14:35   ` Ævar Arnfjörð Bjarmason
2022-11-22 16:16     ` Eric Sunshine
2022-11-22 22:01       ` Ævar Arnfjörð Bjarmason
2022-11-22 22:20         ` Eric Sunshine [this message]
2022-11-06 18:32 Sarah Julia Kriesch
2022-11-06 19:15 ` Sarah Julia Kriesch
2022-11-06 20:42   ` Eric Sunshine
2022-11-07  0:42   ` Todd Zullinger
2022-11-22 18:21   ` Eric Sunshine
2022-11-07  0:41 ` Todd Zullinger
  -- strict thread matches above, loose matches on Subject: below --
2022-11-01 18:04 Sarah Julia Kriesch
2022-11-01 19:05 ` Martin Ågren
2022-11-01 19:38   ` Taylor Blau
2022-11-01 19:41   ` Martin Ågren
2022-11-01 22:03     ` Eric Sunshine
2022-11-02 18:49 ` Todd Zullinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPig+cRfheaDMuQ501dABZnW0xW0+YbicoPL4665GtdjtR1fSQ@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=sarah.kriesch@opensuse.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).