Skip to content

[Configure] Fix SFLAGS and improve sed portability#2016

Merged
Dead2 merged 1 commit intozlib-ng:developfrom
mtl1979:configure-fix2
Nov 20, 2025
Merged

[Configure] Fix SFLAGS and improve sed portability#2016
Dead2 merged 1 commit intozlib-ng:developfrom
mtl1979:configure-fix2

Conversation

@mtl1979
Copy link
Copy Markdown
Collaborator

@mtl1979 mtl1979 commented Nov 17, 2025

  • "\i" is not valid escape code in BSD sed
  • Some x86 shared sources were missing -fPIC due to using wrong variable in build rule

Fixes #2015.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Nov 17, 2025

Walkthrough

Compile-time build rules were adjusted for two x86 shared-object targets to use SFLAGS instead of CFLAGS, and two sed regex patterns in the generated configure script were corrected by removing an unnecessary backslash in the include-matching expression.

Changes

Cohort / File(s) Summary
Shared object compilation flags
arch/x86/Makefile.in
Changed compilation rule for chorba_sse2.lo and chorba_sse41.lo to use SFLAGS (retaining -DPIC and other flags) instead of CFLAGS.
Configure script regex fix
configure
Removed an unnecessary backslash in two sed patterns that match # include "..." lines, changing s/# *\include *"\(.*\.h\)".*/\1/p' to s/# *include *"\(.*\.h\)".*/\1/p' to avoid trailing-backslash regex errors.

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix build using configure' directly relates to the PR's main objectives: fixing two build/configure issues (BSD sed compatibility and missing -fPIC flag).
Description check ✅ Passed The description clearly explains both issues being fixed: the invalid BSD sed escape sequence and the missing -fPIC flag in x86 shared sources, with reference to issue #2015.
Linked Issues check ✅ Passed The PR successfully addresses the primary requirement from issue #2015: removing the invalid backslash escape sequence in the sed regex in configure script that caused 'RE error: trailing backslash' errors on FreeBSD. Additionally, it fixes the missing -fPIC flag for x86 shared sources by correcting the variable used in the build rule.
Out of Scope Changes check ✅ Passed All changes in the PR are directly scoped to the linked issue #2015: fixing the sed regex compatibility problem in configure and correcting the build flags for x86 shared sources. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 318a27a and 02ab052.

📒 Files selected for processing (2)
  • arch/x86/Makefile.in (1 hunks)
  • configure (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • arch/x86/Makefile.in
  • configure
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (135)
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: macOS Clang ASAN (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: macOS Clang ASAN (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: macOS Clang ASAN (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: macOS Clang ASAN (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit
  • GitHub Check: Ubuntu GCC Symbol Prefix
  • GitHub Check: macOS Clang Native Instructions (ARM64)
  • GitHub Check: macOS Clang ASAN (ARM64)
  • GitHub Check: Windows MSVC 2022 v140 Win64
  • GitHub Check: macOS GCC UBSAN (ARM64)
  • GitHub Check: Windows GCC Compat No Opt
  • GitHub Check: Windows MSVC 2022 v140 Win32
  • GitHub Check: Windows GCC Native Instructions (AVX)
  • GitHub Check: Windows GCC
  • GitHub Check: EL10 Clang S390X DFLTCC MSAN
  • GitHub Check: Ubuntu GCC AARCH64 No NEON UBSAN
  • GitHub Check: Ubuntu GCC AARCH64 Compat No Opt UBSAN
  • GitHub Check: Ubuntu GCC -O3 OSB
  • GitHub Check: Ubuntu GCC 32-bit

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining why this PR is needed, why this solution was chosen, and what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 17, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.64%. Comparing base (0084432) to head (02ab052).
⚠️ Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2016      +/-   ##
===========================================
- Coverage    82.77%   79.64%   -3.13%     
===========================================
  Files          163      163              
  Lines        12862    12862              
  Branches      3171     3168       -3     
===========================================
- Hits         10646    10244     -402     
- Misses        1186     1556     +370     
- Partials      1030     1062      +32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

* "\i" is not valid escape code in BSD sed
* Some x86 shared sources were missing -fPIC due to using wrong variable in build rule

Fixes zlib-ng#2015.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes two build issues when using the configure script on BSD systems:

  • Removes invalid \i escape sequence in sed commands that caused failures on BSD sed
  • Corrects compilation flags for shared object files in x86 architecture to include -fPIC

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
configure Fixed sed regex pattern by changing \include to include - the backslash-i escape sequence is not valid in BSD sed
arch/x86/Makefile.in Fixed chorba_sse2.lo and chorba_sse41.lo build rules to use SFLAGS instead of CFLAGS, ensuring -fPIC is included for shared library compilation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Dead2
Copy link
Copy Markdown
Member

Dead2 commented Nov 18, 2025

@brad0 Could you please test this to verify the fix works as it should?

@brad0
Copy link
Copy Markdown
Contributor

brad0 commented Nov 18, 2025

@Dead2 Tested. This resolves the error and builds Ok.

@Dead2 Dead2 merged commit 469cf6d into zlib-ng:develop Nov 20, 2025
161 of 162 checks passed
@Dead2 Dead2 changed the title Fix build using configure [Configure] Fix SFLAGS and improve sed portability Nov 25, 2025
@Dead2 Dead2 mentioned this pull request Nov 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sed error from configure script regarding trailing backslash

4 participants