Skip to content

Zsh: add build-time dependency on autoconf and add CFLAGS for more recent LLVM#4896

Open
taliaferro wants to merge 3 commits into
spack:developfrom
taliaferro:zsh-fix
Open

Zsh: add build-time dependency on autoconf and add CFLAGS for more recent LLVM#4896
taliaferro wants to merge 3 commits into
spack:developfrom
taliaferro:zsh-fix

Conversation

@taliaferro

@taliaferro taliaferro commented May 19, 2026

Copy link
Copy Markdown
Contributor

This PR fixes two issues with zsh.

  1. It seems zsh has a build-time dependency on autoconf. (It looks like it's re-running it later in the process and not finding it when it needs it)

  2. Add two compiler flags (-Wno-implicit-int and -Wno-implicit-function-declaration) when building with newer versions of LLVM.

Without the latter, the build would complete successfully, but the resulting zsh would lock up and become unresponsive to signals the first time it encounters process substitution. (this issue can be demonstrated by running timeout 3 zsh -c '$(echo echo success)' || echo failure.)

@taliaferro

Copy link
Copy Markdown
Contributor Author

@spackbot fix style, if you'd be so kind

@spackbot-app

spackbot-app Bot commented May 19, 2026

Copy link
Copy Markdown

Let me see if I can fix that for you!

@spackbot-app

spackbot-app Bot commented May 19, 2026

Copy link
Copy Markdown

I was able to run spack style --fix for you!

spack style --fix
repos/spack_repo/builtin/packages/zsh/package.py
�[1;34m==> �[0mrunning ruff format
1 file reformatted
�[1;34m==> �[0mrunning ruff check
All checks passed!
�[1;34m==> �[0mstyle checks passed
Keep in mind that I cannot fix your flake8 or mypy errors, so if you have any you'll need to fix them and update the pull request. If I was able to push to your branch, if you make further changes you will need to pull from your updated branch before pushing again.

I've updated the branch with style fixes.

Comment on lines +52 to +56
if (
name == "cflags"
and self.spec.satisfies("%llvm@10:")
or self.spec.satisfies("%apple-clang@12:")
):

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think there's an issue with operator precedence here:

>>> False and False or True
True

(%apple-clang is always True regardless of name)

@alalazo alalazo self-assigned this May 27, 2026
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.

2 participants