bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Build fails with Xcode 12


From: Adam Stewart
Subject: Build fails with Xcode 12
Date: Sat, 19 Sep 2020 11:45:00 -0500

I recently updated to Xcode 12 on macOS 10.15.6. Xcode 12 comes with Apple 
Clang 12.0.0 (LLVM Clang 10.0.0), which fails to compile bash 5.0.18. This can 
be reproduced with the typical `./configure; make; make install` logic. The 
exact error message is:


In file included from siglist.c:36:
In file included from ./xmalloc.h:25:
In file included from ./bashansi.h:28:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/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]
                          ^
In file included from siglist.c:36:
In file included from ./xmalloc.h:25:
In file included from ./bashansi.h:28:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:134:7:
 error: expected ')'
./siglist.h:37:27: note: expanded from macro 'strsignal'
#  define strsignal(sig) (char *)sys_siglist[sig]
                          ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/string.h:134:7:
 note: to match this '('
./siglist.h:37:26: note: expanded from macro 'strsignal'
#  define strsignal(sig) (char *)sys_siglist[sig]
                         ^
siglist.c:38:7: error: redefinition of 'sys_siglist' with a different type: 
'char *[32]' vs 'const char *const [32]'
char *sys_siglist[NSIG];
      ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: previous declaration is here
extern __const char *__const sys_siglist[NSIG];
                             ^
siglist.c:46:20: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
    sys_siglist[i] = (char *)0x0;
    ~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:48:18: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[0] = _("Bogus signal");
  ~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:51:23: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGHUP] = _("Hangup");
  ~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:55:23: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGINT] = _("Interrupt");
  ~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:59:24: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGQUIT] = _("Quit");
  ~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:63:23: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGILL] = _("Illegal instruction");
  ~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:67:24: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGTRAP] = _("BPT trace/trap");
  ~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:75:24: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGABRT] = _("ABORT instruction");
  ~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:79:23: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGEMT] = _("EMT instruction");
  ~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:83:23: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGFPE] = _("Floating point exception");
  ~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:87:24: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGKILL] = _("Killed");
  ~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:91:23: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGBUS] = _("Bus error");
  ~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:95:24: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGSEGV] = _("Segmentation fault");
  ~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:99:23: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGSYS] = _("Bad system call");
  ~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:103:24: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGPIPE] = _("Broken pipe");
  ~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
siglist.c:107:24: error: cannot assign to variable 'sys_siglist' with 
const-qualified type 'const char *const [32]'
  sys_siglist[SIGALRM] = _("Alarm clock");
  ~~~~~~~~~~~~~~~~~~~~ ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/signal.h:70:30:
 note: variable 'sys_siglist' declared const here
extern __const char *__const sys_siglist[NSIG];
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [siglist.o] Error 1


I can share the full build log if you need it.

Adam




reply via email to

[Prev in Thread] Current Thread [Next in Thread]