GNU bug report logs -
#43167
28.0.50; Cannot build on MacOS due to -std=c99 change in configure.ac
Previous Next
Reported by: Keith Irwin <keith <at> zentrope.com>
Date: Wed, 2 Sep 2020 05:45:01 UTC
Severity: normal
Found in version 28.0.50
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
I’ve been unable to build Emacs from the master branch for the past several days on MacOS (Big Sur). Previously, compiling on Big Sur worked.
I get the following error:
CC fringe.o
CC image.o
CC json.o
CC nsterm.o
In file included from nsterm.m:46:
./lisp.h:1237:24: error: implicit declaration of function 'typeof' is invalid in
C99 [-Werror,-Wimplicit-function-declaration]
return USE_LSB_TAG ? make_fixnum (n) : XIL (n + (int0 << VALBITS));
^
./lisp.h:444:26: note: expanded from macro 'make_fixnum'
# define make_fixnum(n) lisp_h_make_fixnum (n)
^
./lisp.h:395:9: note: expanded from macro 'lisp_h_make_fixnum'
({ typeof (+(n)) lisp_h_make_fixnum_n = n; \
^
./lisp.h:1237:24: note: did you mean 'Ftype_of'?
./lisp.h:444:26: note: expanded from macro 'make_fixnum'
# define make_fixnum(n) lisp_h_make_fixnum (n)
^
./lisp.h:395:9: note: expanded from macro 'lisp_h_make_fixnum'
({ typeof (+(n)) lisp_h_make_fixnum_n = n; \
^
./globals.h:4765:8: note: 'Ftype_of' declared here
EXFUN (Ftype_of, 1);
^
In file included from nsterm.m:46:
./lisp.h:1237:24: error: expected ';' after expression
return USE_LSB_TAG ? make_fixnum (n) : XIL (n + (int0 << VALBITS));
I tracked the issue to this commit:
https://emba.gnu.org/emacs/emacs/-/commit/72f66f70eef18e3b25cc989d67711887304f184b
When I make this change to line ~1904:
#GNU_OBJC_CFLAGS="-std=c99”
GNU_OBJC_CFLAGS=""
I can compile emacs as per usual.
I’m running macOS 11, Beta 5, with Xcode Beta 6, though I’m not sure if that’s an issue.
$ clang --version
Apple clang version 12.0.0 (clang-1200.0.31.1)
Target: x86_64-apple-darwin20.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
$ gcc --version
Configured with: --prefix=/Applications/Xcode-beta.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.31.1)
Target: x86_64-apple-darwin20.0.0
Thread model: posix
InstalledDir: /Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
This bug report was last modified 4 years and 242 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.