Skip to content

update patches#26

Draft
sachintu47 wants to merge 4 commits into
zopencommunity:mainfrom
sachintu47:main
Draft

update patches#26
sachintu47 wants to merge 4 commits into
zopencommunity:mainfrom
sachintu47:main

Conversation

@sachintu47
Copy link
Copy Markdown
Member

No description provided.

@sachintu47
Copy link
Copy Markdown
Member Author

augment review

@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented Mar 24, 2026

🤖 Augment PR Summary

Summary: Updates the port to zstd v1.5.7 and refreshes the z/OS (OS/390) patch set to align with the newer upstream build system.

Changes:

  • Bumped ZSTD_VERSION from 1.5.5 to 1.5.7
  • Switched STABLE source acquisition from a tarball URL to cloning the upstream git repo at tag v${ZSTD_VERSION}
  • Adjusted build dependencies and enabled multi-threaded library build via lib-mt / MT=1
  • Enabled “minimal” zopen build flow via ZOPEN_CONFIGURE_MINIMAL / ZOPEN_MAKE_MINIMAL and the clang wrapper
  • Updated upstream Makefile filters so OS/390 is treated as a validated POSIX-like platform for install/test gating
  • Reworked shared-library handling for OS/390 in lib/Makefile (SONAME handling, versioned symlinks, and installing libzstd.x)
  • Consolidated/renamed patch files and removed older PR1-specific patches in favor of a smaller patch set

Technical Notes: The patch set now relies more on upstream’s UNAME_TARGET_SYSTEM/UNAME conditionals for z/OS behavior, and the build scripts report the configured version directly rather than probing the built binary.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 1 suggestion posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread patches/programs.patch
#include <stdio.h> /* fprintf, fopen */
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset, strerror */
+#include "platform.h" /* Large Files support, compiler specifics */
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

platform.h is documented upstream as needing to be included first (e.g., for large-file/feature macros), but this patch moves it (and in one case util.h) after system headers in several translation units, which can cause subtle ABI/IO issues. Consider keeping these headers first (or ensuring the required macros are provided via compiler flags) to preserve the intended behavior.

Severity: medium

Other Locations
  • patches/assertfirst.patch:36
  • patches/assertfirst.patch:58
  • patches/assertfirst.patch:77
  • patches/assertfirst.patch:95

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

- Disable unsupported -soname binder option
- Add -shared to CFLAGS for dynamic library objects
- Link with -lzoslib -lstdc++ to resolve missing symbols
- Reorder includes in program source to fix assert macro conflict
- Update buildenv to use git repo and minimal config
@sachintu47
Copy link
Copy Markdown
Member Author

augment review

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. 3 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Comment thread buildenv
export ZOPEN_STABLE_DEPS="curl gzip make coreutils zoslib check_python"
export ZOPEN_STABLE_URL="https://github.com/facebook/zstd.git"
export ZOPEN_STABLE_TAG="v${ZSTD_VERSION}"
export ZOPEN_STABLE_DEPS="make coreutils check_python diffutils which"
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildenv:8 ZOPEN_STABLE_URL is now a git repo, but ZOPEN_STABLE_DEPS no longer includes any tool that guarantees git is available; this may cause source-fetch failures in minimal build environments.

Severity: medium

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread buildenv
zopen_get_version()
{
./zstd --version | head -1 | awk '{print $5; }' | tr -d ',v'
echo $ZSTD_VERSION
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

buildenv:52 zopen_get_version() now returns the configured $ZSTD_VERSION instead of querying the built ./zstd, which can hide version/build mismatches (e.g., if the checked-out tag differs from what was built/installed).

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

Comment thread patches/lib.patch
$(LIBZSTD): CPPFLAGS += $(CPPFLAGS_DYNLIB)
$(LIBZSTD): CFLAGS += -fPIC -fvisibility=hidden
+ifeq ($(UNAME_TARGET_SYSTEM), OS/390)
+$(LIBZSTD): CFLAGS += -shared
Copy link
Copy Markdown

@augmentcode augmentcode Bot May 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patches/lib.patch:32 Adding -shared to CFLAGS means it may be used during compilation steps as well as linking; if the toolchain treats -shared as link-only, this can fail or produce unexpected build behavior.

Severity: medium

Other Locations
  • patches/lib.patch:60

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

@sachintu47
Copy link
Copy Markdown
Member Author

/run tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant