GNU bug report logs - #43167
28.0.50; Cannot build on MacOS due to -std=c99 change in configure.ac

Previous Next

Package: emacs;

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.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43167 in the body.
You can then email your comments to 43167 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#43167; Package emacs. (Wed, 02 Sep 2020 05:45:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Keith Irwin <keith <at> zentrope.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 02 Sep 2020 05:45:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Keith Irwin <keith <at> zentrope.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Alan Third <alan <at> idiocy.org>
Subject: 28.0.50; Cannot build on MacOS due to -std=c99 change in configure.ac
Date: Tue, 1 Sep 2020 22:44:07 -0700
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






Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43167; Package emacs. (Thu, 03 Sep 2020 20:59:01 GMT) Full text and rfc822 format available.

Message #8 received at 43167 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Keith Irwin <keith <at> zentrope.com>
Cc: 43167 <at> debbugs.gnu.org
Subject: Re: bug#43167: 28.0.50; Cannot build on MacOS due to -std=c99 change
 in configure.ac
Date: Thu, 3 Sep 2020 22:58:30 +0200 (CEST)
On Tue, Sep 01, 2020 at 10:44:07PM -0700, Keith Irwin wrote:
> 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));

Ah, useful, now GCC won't build without -std=c99, but clang won't
build WITH it. 🙄

And the irony is that both versions I have direct access to don't care
either way.

Right, I'll have to add a test, I suppose.

Done, and pushed to master. I've checked it compiles here, but it was
working anyway, so please give it another go and let us know how it
goes.

Thanks!
-- 
Alan Third




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43167; Package emacs. (Thu, 03 Sep 2020 21:05:02 GMT) Full text and rfc822 format available.

Message #11 received at 43167 <at> debbugs.gnu.org (full text, mbox):

From: Keith Irwin <keith <at> zentrope.com>
To: Alan Third <alan <at> idiocy.org>
Cc: 43167 <at> debbugs.gnu.org
Subject: Re: bug#43167: 28.0.50; Cannot build on MacOS due to -std=c99 change
 in configure.ac
Date: Thu, 3 Sep 2020 14:04:36 -0700
[Message part 1 (text/plain, inline)]
Works for me!

Thanks. ;)

Regards,
Keith

> On Sep 3, 2020, at 1:58 PM, Alan Third <alan <at> idiocy.org> wrote:
> 
> On Tue, Sep 01, 2020 at 10:44:07PM -0700, Keith Irwin wrote:
>> 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));
> 
> Ah, useful, now GCC won't build without -std=c99, but clang won't
> build WITH it. 🙄
> 
> And the irony is that both versions I have direct access to don't care
> either way.
> 
> Right, I'll have to add a test, I suppose.
> 
> Done, and pushed to master. I've checked it compiles here, but it was
> working anyway, so please give it another go and let us know how it
> goes.
> 
> Thanks!
> -- 
> Alan Third

[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43167; Package emacs. (Fri, 04 Sep 2020 07:01:01 GMT) Full text and rfc822 format available.

Message #14 received at 43167 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: keith <at> zentrope.com, 43167 <at> debbugs.gnu.org
Subject: Re: bug#43167: 28.0.50;
 Cannot build on MacOS due to -std=c99 change in configure.ac
Date: Fri, 04 Sep 2020 09:59:37 +0300
> Date: Thu, 3 Sep 2020 22:58:30 +0200 (CEST)
> From: Alan Third <alan <at> idiocy.org>
> Cc: 43167 <at> debbugs.gnu.org
> 
> Ah, useful, now GCC won't build without -std=c99, but clang won't
> build WITH it. 🙄

Does it help to use -std=gnu99 instead?




bug Marked as fixed in versions 28.1. Request was from Alan Third <alan <at> idiocy.org> to control <at> debbugs.gnu.org. (Sun, 27 Sep 2020 20:39:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#43167; Package emacs. (Fri, 25 Dec 2020 06:23:02 GMT) Full text and rfc822 format available.

Message #19 received at 43167 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Alan Third <alan <at> idiocy.org>
Cc: 43167 <at> debbugs.gnu.org
Subject: Re: bug#43167: 28.0.50; Cannot build on MacOS due to -std=c99
 change in configure.ac
Date: Fri, 25 Dec 2020 07:22:15 +0100
Alan Third <alan <at> idiocy.org> writes:

> fixed 43167 28.1

This was marked as fixed, but not closed?  So I'm closing this now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 43167 <at> debbugs.gnu.org and Keith Irwin <keith <at> zentrope.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 25 Dec 2020 06:23:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 22 Jan 2021 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 93 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.