Opened 4 years ago
Last modified 4 years ago
#61515 closed defect
zsh @5.8: wrong configure results because of implicit function declarations — at Version 4
Reported by: | joelburton (Joel Burton) | Owned by: | larryv (Lawrence Velázquez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | bigsur catalina | Cc: | |
Port: | zsh |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
tart zsh without rcs (this should start a new shell):
/usr/local/bin/zsh --no-rcs
try to enter the following in the new shell (it should hang):
echo $(date)
To me it seems like all command substitution using $() causes zsh to hang. Backticks seem to work though.
(Copying report from https://github.com/Homebrew/discussions/discussions/141 ; this is about a problem with Homebrew, but I'm getting the same behavior with MacPorts0.
Change History (5)
comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to larryv |
---|---|
Status: | new → assigned |
comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Per the fix that Homebrew committed, it was a problem with implicit function declarations: a common problem we are seeing with many, many ports under Xcode 12. Whereas Homebrew chose to downgrade the error to a warning, the correct fix is to include the right headers so that the function declarations are provided. Not doing so can spell trouble for Apple Silicon systems.
comment:3 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
$ grep \ implicit -r work/zsh-5.8/config.log work/zsh-5.8/config.log:conftest.c:225:14: error: implicit declaration of function 'tgetent' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:230:6: error: implicit declaration of function 'tgetstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:231:2: error: implicit declaration of function 'creat' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:233:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:225:14: error: implicit declaration of function 'tgetent' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:230:6: error: implicit declaration of function 'tgetstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:231:2: error: implicit declaration of function 'creat' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:233:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:251:24: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:251:40: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:283:5: error: implicit declaration of function 'unlink' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:285:8: error: implicit declaration of function 'mkfifo' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:289:2: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:290:11: error: implicit declaration of function 'fork' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:295:17: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:298:22: error: implicit declaration of function 'write' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:287:2: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:283:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:298:9: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:282:5: error: implicitly declaring library function 'sprintf' with type 'int (char *, const char *, ...)' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:282:27: error: implicit declaration of function 'getpid' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:282:37: error: implicit declaration of function 'rand' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:284:14: error: implicitly declaring library function 'strcpy' with type 'char *(char *, const char *)' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:287:5: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:287:31: error: implicitly declaring library function 'strcmp' with type 'int (const char *, const char *)' [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:293:5: error: implicit declaration of function 'read' is invalid in C99 [-Werror,-Wimplicit-function-declaration] work/zsh-5.8/config.log:conftest.c:315:13: error: implicitly declaring library function 'exit' with type 'void (int) __attribute__((noreturn))' [-Werror,-Wimplicit-function-declaration]
comment:4 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Description: | modified (diff) |
---|---|
Keywords: | catalina added |
Summary: | Brew zsh hangs on $(...) command substitution in Big Sur 11.0.1 → zsh @5.8: wrong configure results because of implicit function declarations |
Changed 4 years ago by larryv (Lawrence Velázquez)
Attachment: | explicit-declarations.patch added |
---|
adaptation of upstream's fix
If you see the same problem with zsh regardless whether zsh is installed with MacPorts or Homebrew, that suggests a bug in zsh that should be reported to the developers of zsh. You could also check whether you get the same problem with /bin/zsh as provided by Apple, but even if you don't, that doesn't mean it's not a zsh bug; Apple probably modifies their zsh just as they modify all of the software they ship with macOS.