Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 756151

Summary: app-shells/bash-5.0_p18: failed build on macOS Big Sur (.../MacOSX.sdk/usr/include/string.h:134:7: error: expected identifier or '('))
Product: Gentoo/Alt Reporter: Sam James <sam>
Component: Prefix SupportAssignee: Gentoo Prefix <prefix>
Status: RESOLVED FIXED    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://www.mail-archive.com/bug-bash@gnu.org/msg25109.html
Whiteboard: Workaround: use newer Bash (rc) or apply the patch somehow
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 755644    
Attachments: build.log

Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-22 23:29:05 UTC
Created attachment 674386 [details]
build.log

gcc -m64  -DPROGRAM='"bash"' -DCONF_HOSTTYPE='"x86_64"' -DCONF_OSTYPE='"darwin18"' -DCONF_MACHTYPE='"x86_64-apple-darwin18"' -DCONF_VENDOR='"apple"' -DLOCALEDIR='"/Users/sam/Gentoo/tmp/usr/share/locale"' -DPACKAGE='"bash"' -DSHELL -DHAVE_CONFIG_H -DMACOSX   -I. -I./include -I. -I./include -I./lib   -isystem /Users/sam/Gentoo/tmp/usr/include -isystem /Users/sam/Gentoo/MacOSX.sdk/usr/include -DDEFAULT_PATH_VALUE='"/Users/sam/Gentoo/tmp/usr/local/sbin:/Users/sam/Gentoo/tmp/usr/local/bin:/Users/sam/Gentoo/tmp/usr/sbin:/Users/sam/Gentoo/tmp/usr/bin:/Users/sam/Gentoo/tmp/sbin:/Users/sam/Gentoo/tmp/bin"' -DSTANDARD_UTILS_PATH='"/Users/sam/Gentoo/tmp/bin:/Users/sam/Gentoo/tmp/usr/bin:/Users/sam/Gentoo/tmp/sbin:/Users/sam/Gentoo/tmp/usr/sbin"' -DSYS_BASHRC='"/Users/sam/Gentoo/tmp/etc/bash/bashrc"' -DSYS_BASH_LOGOUT='"/Users/sam/Gentoo/tmp/etc/bash/bash_logout"' -DNON_INTERACTIVE_LOGIN_SHELLS -DSSH_SOURCE_BASHRC -march=native -O2 -pipe -Wno-parentheses -Wno-format-security -c xmalloc.c
In file included from siglist.c:36:
In file included from ./xmalloc.h:25:
In file included from ./bashansi.h:28:
/Users/sam/Gentoo/MacOSX.sdk/usr/include/string.h:134:7: error: expected
      identifier or '('
char    *strsignal(int __sig);
         ^
./siglist.h:37:27: note: expanded from macro 'strsignal'
#  define strsignal(sig) (char *)sys_siglist[sig]

----
This is actually the same type of error I had building Bash when I used the latest gawk to fix bug 756136 (which I ended up reverting).

I'm a bit lost with this one, especially because I didn't hit this on a previous attempt with /usr/local/include hacks.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-11-23 00:24:29 UTC
I didn't want to mess around with applying the patch because I'd have needed to autoreconf it externally and apply a patch(?)

So, I switched to app-shells/bash-5.1-rc3 and the corresponding sys-libs/readline-8.1_rc3, and added keywords there locally. Bash has now built.
Comment 2 Fabian Groffen gentoo-dev 2020-11-26 16:05:45 UTC
I've unmasked bash-5.1 in the BigSur profile, using an accept_keywords entry