{"thread":{"id":"58828","subject":"Re: git can not be built for s390x since update to git-2.38.0","startedAt":"2022-11-21T05:12:24Z","lastAt":"2022-11-22T22:20:45Z","messageCount":5,"participants":["Eric Sunshine","Ævar Arnfjörð Bjarmason"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"467657","messageId":"CAPig+cT92EokWeVA_Ou1P6kkaq90wneRrgPqnKLbkHnc=U56Vg@mail.gmail.com","threadId":"58828","inReplyTo":"4657a19c-89c3-2237-9e6b-db897a492072@opensuse.org","subject":"Re: git can not be built for s390x since update to git-2.38.0","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2022-11-21T05:12:09Z","receivedAt":"2022-11-21T05:12:24Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"[cc:+git; taking this back to the mailing list so others can weigh in]\n\nOn Wed, Nov 9, 2022 at 1:38 AM Sarah Julia Kriesch\n<sarah.kriesch@opensuse.org> wrote:\n>  > Gesendet: Sonntag, 06. November 2022 um 21:42 Uhr\n>  > Von: \"Eric Sunshine\" <sunshine@sunshineco.com>\n>  >\n>  > On Sun, Nov 6, 2022 at 2:18 PM Sarah Julia Kriesch\n>  > <sarah.kriesch@opensuse.org> wrote:\n>  > > We have also identified this week, that chainlint.pl --stats says \"0\n>  > > tests\". That can explain the empty output.\n>  > >\n>  > > ~/rpmbuild/BUILD/git-2.38.1/t> /usr/bin/perl chainlint.pl --stats\n>  > > --emit-all chainlinttmp/tests\n>  > > total: 0 workers, 0 scripts, 0 tests, 0 errors, 0.01s/0.01s (wall/user)\n>  >\n>  > Was `--stats` added for debugging this issue, or is that somehow part\n>  > of your build process?\n>  >\n> Yes. We tried to debug that manually. Therefore, we have added the --stats.\n>\n>  > What is the content of the \"chainlinttmp/tests\" file? Is it empty?\n>  >\n> It is empty.\n>\n>  > It is quite curious that it reports 0 scripts. It should report 1\n>  > script even if chainlinttmp/file is empty. This might point a finger\n>  > at File::Glob::bsd_glob() returning an empty list for some reason, or\n>  > the problem could be a failure with Perl \"ithreads\".\n\nDo you happen to know if Perl is built with \"ithreads\" on your\nplatform, and if so, is \"ithread\" support working?\n\nThe empty \"chainlinttmp/tests\" file also sounds suspicious. If you\nhaven't already done so, I would recommend following the advice in [1]\nand running each command individually which Makefile would have run;\nthis might allow you to isolate the problematic command or shell\nconstruct if such exists.\n\n[1]: https://lore.kernel.org/git/CAPig+cS184iKk6icG6ML=X+6Ng=fJyfic8izFyp1hT40cChm4g@mail.gmail.com/\n"},{"id":"467768","messageId":"221122.86zgcj9hmc.gmgdl@evledraar.gmail.com","threadId":"58828","inReplyTo":"CAPig+cT92EokWeVA_Ou1P6kkaq90wneRrgPqnKLbkHnc=U56Vg@mail.gmail.com","subject":"Re: git can not be built for s390x since update to git-2.38.0","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-11-22T14:35:29Z","receivedAt":"2022-11-22T14:41:22Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Mon, Nov 21 2022, Eric Sunshine wrote:\n\n> [cc:+git; taking this back to the mailing list so others can weigh in]\n>\n> On Wed, Nov 9, 2022 at 1:38 AM Sarah Julia Kriesch\n> <sarah.kriesch@opensuse.org> wrote:\n>>  > Gesendet: Sonntag, 06. November 2022 um 21:42 Uhr\n>>  > Von: \"Eric Sunshine\" <sunshine@sunshineco.com>\n>>  >\n>>  > On Sun, Nov 6, 2022 at 2:18 PM Sarah Julia Kriesch\n>>  > <sarah.kriesch@opensuse.org> wrote:\n>>  > > We have also identified this week, that chainlint.pl --stats says \"0\n>>  > > tests\". That can explain the empty output.\n>>  > >\n>>  > > ~/rpmbuild/BUILD/git-2.38.1/t> /usr/bin/perl chainlint.pl --stats\n>>  > > --emit-all chainlinttmp/tests\n>>  > > total: 0 workers, 0 scripts, 0 tests, 0 errors, 0.01s/0.01s (wall/user)\n>>  >\n>>  > Was `--stats` added for debugging this issue, or is that somehow part\n>>  > of your build process?\n>>  >\n>> Yes. We tried to debug that manually. Therefore, we have added the --stats.\n>>\n>>  > What is the content of the \"chainlinttmp/tests\" file? Is it empty?\n>>  >\n>> It is empty.\n>>\n>>  > It is quite curious that it reports 0 scripts. It should report 1\n>>  > script even if chainlinttmp/file is empty. This might point a finger\n>>  > at File::Glob::bsd_glob() returning an empty list for some reason, or\n>>  > the problem could be a failure with Perl \"ithreads\".\n>\n> Do you happen to know if Perl is built with \"ithreads\" on your\n> platform, and if so, is \"ithread\" support working?\n>\n> The empty \"chainlinttmp/tests\" file also sounds suspicious. If you\n> haven't already done so, I would recommend following the advice in [1]\n> and running each command individually which Makefile would have run;\n> this might allow you to isolate the problematic command or shell\n> construct if such exists.\n>\n> [1]: https://lore.kernel.org/git/CAPig+cS184iKk6icG6ML=X+6Ng=fJyfic8izFyp1hT40cChm4g@mail.gmail.com/\n\nI can also reproduce this on gcc202. It's the same issue with ending up\nwith an empty \"tests\" file.\n\t\n\tavar@gcc202:/run/user/1632/git/t$ uname -a\n\tLinux gcc202 6.0.0-4-sparc64-smp #1 SMP Debian 6.0.8-1 (2022-11-11) sparc64 GNU/Linux\n\tavar@gcc202:/run/user/1632/git/t$ lsb_release -a\n\tNo LSB modules are available.\n\tDistributor ID: Debian\n\tDescription:    Debian GNU/Linux bookworm/sid\n\tRelease:        n/a\n\tCodename:       bookworm\n\nThe change at the tip of\nhttps://lore.kernel.org/git/221122.86cz9fbyln.gmgdl@evledraar.gmail.com/\nfixes it for me, i.e. getting rid of the perl threads stuff...\n\nThat box is built with \"useithreads=define\", so it's not that it doesn't\nsupport threading in general.\n\n"},{"id":"467771","messageId":"CAPig+cTniT+_7MxMm3Kc2C_oEtQGg-WA3870baL8990Av6HmJQ@mail.gmail.com","threadId":"58828","inReplyTo":"221122.86zgcj9hmc.gmgdl@evledraar.gmail.com","subject":"Re: git can not be built for s390x since update to git-2.38.0","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2022-11-22T16:16:01Z","receivedAt":"2022-11-22T16:19:18Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Nov 22, 2022 at 9:41 AM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On Mon, Nov 21 2022, Eric Sunshine wrote:\n> > The empty \"chainlinttmp/tests\" file also sounds suspicious. If you\n> > haven't already done so, I would recommend following the advice in [1]\n> > and running each command individually which Makefile would have run;\n> > this might allow you to isolate the problematic command or shell\n> > construct if such exists.\n>\n> I can also reproduce this on gcc202. It's the same issue with ending up\n> with an empty \"tests\" file.\n\nWere you able to determine why the \"tests\" file is empty? The creation\nloop is simple enough:\n\n    for i in $(CHAINLINTTESTS); do \\\n        echo \"test_expect_success '$$i' '\" && \\\n        sed -e '/^# LINT: /d' chainlint/$$i.test && \\\n        echo \"'\"; \\\n    done >'$(CHAINLINTTMP_SQ)'/tests && \\\n\nand the file is never changed after that (or shouldn't be).\n\n>         avar@gcc202:/run/user/1632/git/t$ uname -a\n>         Linux gcc202 6.0.0-4-sparc64-smp #1 SMP Debian 6.0.8-1 (2022-11-11) sparc64 GNU/Linux\n>         avar@gcc202:/run/user/1632/git/t$ lsb_release -a\n>         No LSB modules are available.\n>         Distributor ID: Debian\n>         Description:    Debian GNU/Linux bookworm/sid\n>         Release:        n/a\n>         Codename:       bookworm\n\nThis is one of the compile-machines to which you have access?\n\n> The change at the tip of\n> https://lore.kernel.org/git/221122.86cz9fbyln.gmgdl@evledraar.gmail.com/\n> fixes it for me, i.e. getting rid of the perl threads stuff...\n\nI'm confused. How does a change to chainlint.pl -- which only reads\nthe \"tests\" file -- fix the empty \"tests\" file?\n\n> That box is built with \"useithreads=define\", so it's not that it doesn't\n> support threading in general.\n"},{"id":"467815","messageId":"221122.86v8n6abeh.gmgdl@evledraar.gmail.com","threadId":"58828","inReplyTo":"CAPig+cTniT+_7MxMm3Kc2C_oEtQGg-WA3870baL8990Av6HmJQ@mail.gmail.com","subject":"Re: git can not be built for s390x since update to git-2.38.0","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2022-11-22T22:01:55Z","receivedAt":"2022-11-22T22:10:21Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Tue, Nov 22 2022, Eric Sunshine wrote:\n\n> On Tue, Nov 22, 2022 at 9:41 AM Ævar Arnfjörð Bjarmason\n> <avarab@gmail.com> wrote:\n>> On Mon, Nov 21 2022, Eric Sunshine wrote:\n>> > The empty \"chainlinttmp/tests\" file also sounds suspicious. If you\n>> > haven't already done so, I would recommend following the advice in [1]\n>> > and running each command individually which Makefile would have run;\n>> > this might allow you to isolate the problematic command or shell\n>> > construct if such exists.\n>>\n>> I can also reproduce this on gcc202. It's the same issue with ending up\n>> with an empty \"tests\" file.\n>\n> Were you able to determine why the \"tests\" file is empty? The creation\n> loop is simple enough:\n>\n>     for i in $(CHAINLINTTESTS); do \\\n>         echo \"test_expect_success '$$i' '\" && \\\n>         sed -e '/^# LINT: /d' chainlint/$$i.test && \\\n>         echo \"'\"; \\\n>     done >'$(CHAINLINTTMP_SQ)'/tests && \\\n>\n> and the file is never changed after that (or shouldn't be).\n\nSorry. I meant that the result of running *against* the non-empty test\nfile is empty. I.e.:\n\n\t$ perl chainlint.pl chainlinttmp/tests ; echo $?\n\t0\n\nAnyway, the \"fix\" here can also be:\n\n\t $jobs = ncores() if $jobs < 1;\n\t+$jobs = 1 if $jobs < 1;\n\nI.e. it's another case of bad /proc/cpuinfo parsing.\n\nOn that platform, this also works:\n\t\n\tdiff --git a/t/chainlint.pl b/t/chainlint.pl\n\tindex 976db4b8a0..e6bc476fc5 100755\n\t--- a/t/chainlint.pl\n\t+++ b/t/chainlint.pl\n\t@@ -656,7 +656,7 @@ sub ncores {\n\t        # Windows\n\t        return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n\t        # Linux / MSYS2 / Cygwin / WSL\n\t-       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor\\s*:/, <>)); } if -r '/proc/cpuinfo';\n\t+       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^(?:CPU\\d+|processor\\s*):/, <>)); } if -r '/proc/cpuinfo';\n\t        # macOS & BSD\n\t        return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n\t        return 1;\n\nBut a generic guard against parse failure seems prudent.\n\n>>         avar@gcc202:/run/user/1632/git/t$ uname -a\n>>         Linux gcc202 6.0.0-4-sparc64-smp #1 SMP Debian 6.0.8-1 (2022-11-11) sparc64 GNU/Linux\n>>         avar@gcc202:/run/user/1632/git/t$ lsb_release -a\n>>         No LSB modules are available.\n>>         Distributor ID: Debian\n>>         Description:    Debian GNU/Linux bookworm/sid\n>>         Release:        n/a\n>>         Codename:       bookworm\n>\n> This is one of the compile-machines to which you have access?\n\nYes, and you can get access to it too. The GCC farm is open for free\nsoftware development, you only need to send in an E-Mail request, ssh\nkey etc.\n\n>> The change at the tip of\n>> https://lore.kernel.org/git/221122.86cz9fbyln.gmgdl@evledraar.gmail.com/\n>> fixes it for me, i.e. getting rid of the perl threads stuff...\n>\n> I'm confused. How does a change to chainlint.pl -- which only reads\n> the \"tests\" file -- fix the empty \"tests\" file?\n\nIt doesn't, sorry, see above.\n"},{"id":"467816","messageId":"CAPig+cRfheaDMuQ501dABZnW0xW0+YbicoPL4665GtdjtR1fSQ@mail.gmail.com","threadId":"58828","inReplyTo":"221122.86v8n6abeh.gmgdl@evledraar.gmail.com","subject":"Re: git can not be built for s390x since update to git-2.38.0","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2022-11-22T22:20:27Z","receivedAt":"2022-11-22T22:20:45Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Nov 22, 2022 at 5:10 PM Ævar Arnfjörð Bjarmason\n<avarab@gmail.com> wrote:\n> On that platform, this also works:\n>         diff --git a/t/chainlint.pl b/t/chainlint.pl\n>         @@ -656,7 +656,7 @@ sub ncores {\n>                 # Windows\n>                 return $ENV{NUMBER_OF_PROCESSORS} if exists($ENV{NUMBER_OF_PROCESSORS});\n>                 # Linux / MSYS2 / Cygwin / WSL\n>         -       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^processor\\s*:/, <>)); } if -r '/proc/cpuinfo';\n>         +       do { local @ARGV='/proc/cpuinfo'; return scalar(grep(/^(?:CPU\\d+|processor\\s*):/, <>)); } if -r '/proc/cpuinfo';\n>                 # macOS & BSD\n>                 return qx/sysctl -n hw.ncpu/ if $^O =~ /(?:^darwin$|bsd)/;\n>                 return 1;\n\nThanks for digging into this. Your diagnosis matches the diagnosis in [1].\n\n> Anyway, the \"fix\" here can also be:\n>\n>          $jobs = ncores() if $jobs < 1;\n>         +$jobs = 1 if $jobs < 1;\n>\n> I.e. it's another case of bad /proc/cpuinfo parsing.\n\nYup, I suggested the same in [2] as a would-be-nice-to-have-eventually\npatch, although only as a fallback, not as a proper fix for the\nreported problem since a real fix (as you have above and as in [1])\nwould return the correct core count.\n\n[1]: https://lore.kernel.org/git/CANYNYEHXU8ivgAOa8EO5e9kOcbu6XF7rj+9EcSrbDQE+Rvyw_Q@mail.gmail.com/\n[2]: https://lore.kernel.org/git/CAPig+cQ6_7wf6C280Rqi7mcTCiQp-n5GiLWTPazfcUcGFeZi0g@mail.gmail.com/\n"}]}