Skip to content

Conversation

@tueda
Copy link
Collaborator

@tueda tueda commented Jan 27, 2026

Even for ./configure --without-std, we need extern/zstd/zlibWrapper at configure time.

This PR slightly improves the error message for non-standard builds from a GitHub source snapshot (equivalent to git archive), changing it from:

checking for git... /usr/bin/git
fatal: not a git repository (or any of the parent directories): .git
configure: error: in '/home/tueda/tmp/20260127/1/form-master':
configure: error: ./extern/zstd/zlibWrapper does not exist
See 'config.log' for more details

to

checking for git... /usr/bin/git
configure: error: in '/home/tueda/tmp/20260127/2/form-pr-build-zlibwrapper-handling':
configure: error: ./extern/zstd/zlibWrapper does not exist. Copy the zlibWrapper directory from upstream (https://github.com/facebook/zstd)
See 'config.log' for more details

which answers a possible FAQ.

This avoids running git submodule when not in a Git working tree (which
would otherwise result in a Git error) and provides a more helpful error
message.
Copy link

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 improves the error message shown when the extern/zstd/zlibWrapper directory is missing during configure, particularly for non-Git builds (e.g., from GitHub source snapshots). It also enhances Git repository detection to avoid unnecessary attempts at running git commands.

Changes:

  • Added git repository validation check before attempting submodule updates
  • Changed .git directory test to handle git worktrees and submodules (where .git can be a file)
  • Enhanced error message to provide actionable guidance for obtaining zlibWrapper from upstream

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

@coveralls
Copy link

Coverage Status

coverage: 57.999%. remained the same
when pulling 7c2e81a on tueda:pr/build/zlibwrapper-handling
into 8ad1bbf on form-dev:master.

@tueda tueda merged commit c968a9e into form-dev:master Jan 27, 2026
146 of 147 checks passed
@tueda tueda deleted the pr/build/zlibwrapper-handling branch January 27, 2026 06:51
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.

3 participants