Git 2.35.0-rc0
Hi All,
Git 2.35.0-rc0 is not portable:
uncompress2(uncompressed + block_header_skip, &dst_len,
^ "/home/ituglib/randall/jenkins/.jenkins/workspace/Git_Pipeline/reftable/bloc k.c", line 213: error(114):
identifier "uncompress2" is undefined
This is not a POSIX compliant call.
--Randall
Quoted 11 lines · On Mon, Jan 10, 2022 at 09:20:15PM -0500, [email protected] wrote:
Hi All,
Git 2.35.0-rc0 is not portable:
uncompress2(uncompressed +
block_header_skip,&dst_len,
^ "/home/ituglib/randall/jenkins/.jenkins/workspace/Git_Pipeline/reftable/block.c", line 213: error(114):
identifier "uncompress2" is undefinedThis is not a POSIX compliant call.
uncompress2() isn't a POSIX thing, it's part of zlib IIUC. The new caller is in the reftable code, which provides a build knob NO_UNCOMPRESS2 that you can use if your version of zlib does not have uncompress2().
uncompress2() was added to zlib back in 37281ac (Add uncompress2() function, which returns the input size used., 2016-11-15), which first appeared in version 1.2.9.
If your system doesn't have a modern-ish zlib, you may try building with that knob, or upgrading your system's copy of zlib. And if NonStop doesn't have a modern zlib available at all, we should modify the NonStop section of config.mak.uname.
Thanks,
Taylor
Quoted 20 lines · Taylor Blau
Quoted 4 lines · On Mon, Jan 10, 2022 at 09:20:15PM -0500, [email protected] wrote:
Hi All,
Git 2.35.0-rc0 is not portable:
Quoted 8 lines
uncompress2(uncompressed +
block_header_skip,&dst_len,^"
/home/ituglib/randall/jenkins/.jenkins/workspace/Git_Pipeline/reftable/block.c", line 213: error(114):
identifier "uncompress2" is undefinedThis is not a POSIX compliant call.
uncompress2()isn't a POSIX thing, it's part of zlib IIUC. The new caller is in the reftable code, which provides a build knobNO_UNCOMPRESS2that you can use if your version of zlib does not haveuncompress2().
Quoted 8 lines
uncompress2()was added to zlib back in 37281ac (Adduncompress2()function, which returns the input size used., 2016-11-15), which first appeared in version 1.2.9.If your system doesn't have a modern-ish zlib, you may try building with that knob, or upgrading your system's copy of zlib. And if NonStop doesn't have a modern zlib available at all, we should modify the NonStop section of config.mak.uname.
There is no provision in reftable/block.c to avoid using uncompress2, so the knob will not help. Our zlibc is not that recent (as in it does not have uncompress2) and we cannot make the 2.35.0 timeframe to upgrade it. The current zlib seems to require gcc and is very difficult to port at this stage. This is a blocker situation.
--Randall
Quoted 10 lines · On Mon, Jan 10, 2022 at 09:57:57PM -0500, [email protected] wrote:
Quoted 4 lines
If your system doesn't have a modern-ish zlib, you may try building with that knob, or upgrading your system's copy of zlib. And if NonStop doesn't have a modern zlib available at all, we should modify the NonStop section of config.mak.uname.
There is no provision in
reftable/block.cto avoid using uncompress2, so the knob will not help. Our zlibc is not that recent (as in it does not have uncompress2) and we cannot make the 2.35.0 timeframe to upgrade it. The current zlib seems to require gcc and is very difficult to port at this stage. This is a blocker situation.
NO_UNCOMPRESS2 does not avoid calling uncompress2, but instead compiles a copy-and-pasted implementation in compat/ so that the function is available.
Looking through it, I can't imagine that it wouldn't compile just fine even on NonStop.
Have you tried building with NO_UNCOMPRESS2?
Thanks,
Taylor
Quoted 14 lines · Taylor Blau
Quoted 10 lines · On Mon, Jan 10, 2022 at 09:57:57PM -0500, [email protected] wrote:
Quoted 4 lines
If your system doesn't have a modern-ish zlib, you may try building with that knob, or upgrading your system's copy of zlib. And if NonStop doesn't have a modern zlib available at all, we should modify the NonStop section of config.mak.uname.
There is no provision in
reftable/block.cto avoid using uncompress2, so the knob will not help. Our zlibc is not that recent (as in it does not have uncompress2) and we cannot make the 2.35.0 timeframe to upgrade it. The current zlib seems to require gcc and is very difficult to port at this stage. This is a blocker situation.
Quoted 7 lines
NO_UNCOMPRESS2does not avoid calling uncompress2, but instead compiles a copy-and-pasted implementation in compat/ so that the function is available.Looking through it, I can't imagine that it wouldn't compile just fine even on NonStop.
Have you tried building with
NO_UNCOMPRESS2?
I'm starting a build with that now. Will report back tomorrow. --R
Quoted 13 lines · Taylor Blau
Quoted 10 lines · On Mon, Jan 10, 2022 at 09:57:57PM -0500, [email protected] wrote:
Quoted 4 lines
If your system doesn't have a modern-ish zlib, you may try building with that knob, or upgrading your system's copy of zlib. And if NonStop doesn't have a modern zlib available at all, we should modify the NonStop section of config.mak.uname.
There is no provision in
reftable/block.cto avoid using uncompress2, so the knob will not help. Our zlibc is not that recent (as in it does not have uncompress2) and we cannot make the 2.35.0 timeframe to upgrade it. The current zlib seems to require gcc and is very difficult to port at this stage. This is a blocker situation.
Quoted 7 lines
NO_UNCOMPRESS2does not avoid calling uncompress2, but instead compiles a copy-and-pasted implementation in compat/ so that the function is available.Looking through it, I can't imagine that it wouldn't compile just fine even on NonStop.
Have you tried building with
NO_UNCOMPRESS2?
The patch for NonStop to make this compile is as follows. Test is running - will be 2 days:
config.mak.uname +1 -0
@@ -576,6 +576,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) NO_SETENV = YesPlease NO_UNSETENV = YesPlease NO_MKDTEMP = YesPlease + NO_UNCOMPRESS2 = YesPlease # Currently libiconv-1.9.1. OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEnd
Could we get that into rc1?
I now have a different issue:
make -C t/ all
make[1]: Entering directory '/home/git/git/t'
rm -f -r 'test-results'/usr/coreutils/bin/bash: /usr/bin/perl: Argument list too long
Is there anyway to move to xargs? I am not sure why /usr/bin/perl is having issues with the build.
Regards,
Randall
Quoted 39 lines · Taylor Blau
Quoted 7 lines · Taylor Blau
Quoted 5 lines · On Mon, Jan 10, 2022 at 09:57:57PM -0500, [email protected] wrote:
Quoted 4 lines
If your system doesn't have a modern-ish zlib, you may try building with that knob, or upgrading your system's copy of zlib. And if NonStop doesn't have a modern zlib available at all, we should modify the NonStop section of config.mak.uname.
Quoted 8 lines
Quoted 5 lines
There is no provision in
reftable/block.cto avoid using uncompress2, so the knob will not help. Our zlibc is not that recent (as in it does not have uncompress2) and we cannot make the 2.35.0 timeframe to upgrade it. The current zlib seems to require gcc and is very difficult to port at this stage. This is a blocker situation.
NO_UNCOMPRESS2does not avoid calling uncompress2, but instead compiles a copy-and-pasted implementation in compat/ so that the functionis available.
Quoted 5 lines
Looking through it, I can't imagine that it wouldn't compile just fine even on NonStop.
Have you tried building with
NO_UNCOMPRESS2?The patch for NonStop to make this compile is as follows. Test is running - will be 2 days:
config.mak.uname index renamed from config.mak.uname +0
-0
a3a779327f..9b3e9bff5f100644config.mak.uname +1
-0@@ -576,6 +576,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) NO_SETENV = YesPlease NO_UNSETENV = YesPlease NO_MKDTEMP = YesPlease + NO_UNCOMPRESS2 = YesPlease # Currently libiconv-1.9.1. OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEnd
Quoted 1 line
Could we get that into rc1?
The above is working. We're at t2015 right now. Much relieved. --Randall
Quoted 9 lines · On Mon, Jan 10, 2022 at 10:51:39PM -0500, [email protected] wrote:
I now have a different issue:
make -C t/ all
make[1]: Entering directory '/home/git/git/t'
rm -f -r 'test-results'/usr/coreutils/bin/bash:/usr/bin/perl: Argument list too longIs there anyway to move to xargs? I am not sure why
/usr/bin/perlis having issues with the build.
Tracing through t/Makefile, I am _pretty_ sure that this Perl invocation comes from the test-lint-shell-syntax recipe.
I wonder if something like this would do the trick?
--- 8< ---
t/Makefile +1 -1
@@ -90,7 +90,7 @@ test-lint-executable: echo >&2 "non-executable tests:" $$bad; exit 1; } test-lint-shell-syntax: - @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS) $(TPERF) + @echo $(T) $(THELPERS) $(TPERF) | xargs '$(PERL_PATH_SQ)' check-non-portable-shell.pl test-lint-filenames: @# We do *not* pass a glob to ls-files but use grep instead, to catch
--- >8 ---
Thanks,
Taylor
Quoted 26 lines · Taylor Blau
Quoted 9 lines · On Mon, Jan 10, 2022 at 10:51:39PM -0500, [email protected] wrote:
I now have a different issue:
make -C t/ all
make[1]: Entering directory '/home/git/git/t'
rm -f -r 'test-results'/usr/coreutils/bin/bash:/usr/bin/perl: Argument list too longIs there anyway to move to xargs? I am not sure why
/usr/bin/perlis having issues with the build.Tracing through t/Makefile, I am _pretty_ sure that this Perl invocation comes from the test-lint-shell-syntax recipe.
I wonder if something like this would do the trick?
--- 8< ---
t/Makefile +0
-0@@ -90,7 +90,7 @@ test-lint-executable: echo >&2 "non-executable tests:" $$bad; exit 1; }
t/Makefile test-lint-executable:
Quoted 10 lines
t/Makefile +2
-2test-lint-shell-syntax: - @'$(PERL_PATH_SQ)' check-non-portable-shell.pl $(T) $(THELPERS) $(TPERF) + @echo $(T) $(THELPERS) $(TPERF) | xargs '$(PERL_PATH_SQ)' +check-non-portable-shell.pl test-lint-filenames: @# We do *not* pass a glob to ls-files but use grep instead, to catch --- >8 ---
I think we don't need this yet. My CI/CD system is a bit more robust and does not get stuck here. --Randall
Quoted 13 lines · <[email protected]> writes:
config.mak.uname +1
-0@@ -576,6 +576,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) NO_SETENV = YesPlease NO_UNSETENV = YesPlease NO_MKDTEMP = YesPlease + NO_UNCOMPRESS2 = YesPlease # Currently libiconv-1.9.1. OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEnd
Quoted 1 line
Could we get that into rc1?
Sure, with an appliable patch that is properly signed off.
----- >8 --------- >8 --------- >8 --------- >8 --------- >8 -----
Date: Mon, 10 Jan 2022 22:51:39 -0500
From: "Randall S. Becker" <[email protected]>
Subject: [PATCH] build: NonStop ships with an older zlib
Notably, it lacks uncompress2(); use the fallback we ship in our tree instead.
--- config.mak.uname | 1 + 1 file changed, 1 insertion(+)
config.mak.uname +1 -0
@@ -576,6 +576,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) NO_SETENV = YesPlease NO_UNSETENV = YesPlease NO_MKDTEMP = YesPlease + NO_UNCOMPRESS2 = YesPlease # Currently libiconv-1.9.1. OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEnd
Quoted 15 lines · Junio C Hamano
Quoted 13 lines · <[email protected]> writes:
config.mak.uname +1
-0@@ -576,6 +576,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) NO_SETENV = YesPlease NO_UNSETENV = YesPlease NO_MKDTEMP = YesPlease + NO_UNCOMPRESS2 = YesPlease # Currently libiconv-1.9.1. OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEnd
Quoted 3 lines
Quoted 1 line
Could we get that into rc1?
Sure, with an appliable patch that is properly signed off.
I'm happy to attach my s-o-b to the below as well (and in general, that it's safe to assume my sign-off is provided to everything I post to the list, unless I explicitly say otherwise), since I originally suggested the diff.
Thanks,
Taylor
Quoted 38 lines · Junio C Hamano
Quoted 13 lines · <[email protected]> writes:
config.mak.uname +1
-0@@ -576,6 +576,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) NO_SETENV = YesPlease NO_UNSETENV = YesPlease NO_MKDTEMP = YesPlease + NO_UNCOMPRESS2 = YesPlease # Currently libiconv-1.9.1. OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEndQuoted 1 line
Could we get that into rc1?
Sure, with an appliable patch that is properly signed off.
----- >8 --------- >8 --------- >8 --------- >8 --------- >8 -----
Date: Mon, 10 Jan 2022 22:51:39 -0500
From: "Randall S. Becker" <[email protected]>
Subject: [PATCH] build: NonStop ships with an older zlibNotably, it lacks
uncompress2(); use the fallback we ship in our tree instead.not-Signed-off-yet-by Randall S. Becker <[email protected]>Signed-off-by Junio C Hamano <[email protected]>--- config.mak.uname | 1 + 1 file changed, 1 insertion(+)config.mak.uname +0
-0
config.mak.uname ifeq ($(uname_S),NONSTOP_KERNEL) · line 582
Quoted 7 lines
config.mak.uname +1
-0@@ -576,6 +576,7 @@ ifeq ($(uname_S),NONSTOP_KERNEL) NO_SETENV = YesPlease NO_UNSETENV = YesPlease NO_MKDTEMP = YesPlease + NO_UNCOMPRESS2 = YesPlease # Currently libiconv-1.9.1. OLD_ICONV = UnfortunatelyYes NO_REGEX = NeedsStartEnd
I've run into some other cases on testing on platforms hwere the NO_UNCOMPRESS2 is now needed.
It's a bit of an annoyance, as git would previously compile cleanly on almost any system with NO_CURL=Y NO_OPENSSL=Y, most of those with a C compiler have a libz, even if it's ancient.
As I noted in
https://lore.kernel.org/git/[email protected]/ this use of uncompress2() is just saving a few lines of boilerplate instead of using the underlying zlib functions, which every other in-tree user uses.
So I think it would be most welcome if someone wanted to work on moving to that API use, and IMO such a change could even happen before the final release. After all we don't use reftable for anything except the tests it runs, so as long as those pass it IMO outweighs the new annyonce in compiling git on those platforms.
Quoted 4 lines · Ævar Arnfjörð Bjarmason
https://lore.kernel.org/git/[email protected]/ this use of
uncompress2()is just saving a few lines of boilerplate instead of using the underlying zlib functions, which every other in-tree user uses.
I looked at the source of uncompress2(), and I tend to agree that, we do NOT HAVE TO add dependency on it. You should be able to rewrite the new caller without using it.
But this is a 5-year old API function, that first appeared how many years ago in their public release? In a few years, I would say that we would be laughed at if we avoid it with "it is not available everywhere".
And in the meantime, we ship a copy lifted from upstream, so those with older zlib would be OK with it, too.
That is how I view what we have today. To me, the logical conclusion of the observation is that, we do not have good reason to avoid it.
When we are adding a new piece of code that drives inflate(), we should remember that we now have uncompress2() available in the codebase, and see if we can simplify it by using uncompress2(). The same is true for a case where we refactor existing code that can become simpler with uncompress2().
Thanks.