unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philipp Stephani <p.stephani2@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Alan Third <alan@idiocy.org>,
	pcr910303@icloud.com, Emacs developers <emacs-devel@gnu.org>
Subject: Re: macOS/GCC support policy
Date: Fri, 2 Aug 2019 17:06:47 +0200	[thread overview]
Message-ID: <CAArVCkQm7v1jxtp9Sz8uSOo1mXXwZ46SfMDEVCShgF3HqYYB9w@mail.gmail.com> (raw)
In-Reply-To: <CAArVCkS69UgSGRnakoisuw9oHyG3ZY2THJ0TEGgCh8cj2TbpMw@mail.gmail.com>

Am Fr., 2. Aug. 2019 um 16:59 Uhr schrieb Philipp Stephani
<p.stephani2@gmail.com>:
>
> Am Fr., 2. Aug. 2019 um 16:55 Uhr schrieb Philipp Stephani
> <p.stephani2@gmail.com>:
> >
> > Am Fr., 2. Aug. 2019 um 13:51 Uhr schrieb Eli Zaretskii <eliz@gnu.org>:
> > >
> > > > From: Philipp Stephani <p.stephani2@gmail.com>
> > > > Date: Fri, 2 Aug 2019 12:08:35 +0200
> > > > Cc: Alan Third <alan@idiocy.org>, pcr910303@icloud.com,
> > > >       Emacs developers <emacs-devel@gnu.org>
> > > >
> > > > > What exactly prevents building with GCC on macOS?
> > > > >
> > > >
> > > > I haven't investigated in detail, but when I try to run configure with
> > > > GCC 9 from Homebrew, I get the error message
> > > >
> > > > checking AppKit/AppKit.h usability... no
> > > > checking AppKit/AppKit.h presence... yes
> > > > configure: WARNING: AppKit/AppKit.h: present but cannot be compiled
> > > > configure: WARNING: AppKit/AppKit.h:     check for missing prerequisite headers?
> > > > configure: WARNING: AppKit/AppKit.h: see the Autoconf documentation
> > > > configure: WARNING: AppKit/AppKit.h:     section "Present But Cannot
> > > > Be Compiled"
> > > > configure: WARNING: AppKit/AppKit.h: proceeding with the compiler's result
> > > > configure: WARNING:     ## ------------------------------------ ##
> > > > configure: WARNING:     ## Report this to bug-gnu-emacs@gnu.org ##
> > > > configure: WARNING:     ## ------------------------------------ ##
> > > > checking for AppKit/AppKit.h... no
> > > > configure: error: The include files (AppKit/AppKit.h etc) that
> > > > are required for a Nextstep build are missing or cannot be compiled.
> > > > Either fix this, or re-configure with the option '--without-ns'.
> > >
> > > Thanks.  It would be good if someone could investigate what is the
> > > problem here (and any other problems, if there are any).
> >
> > Excerpt from config.log:
> >
> > configure:10941: checking AppKit/AppKit.h usability
> > configure:10941: gcc-9 -c -g3 -O1 -fsanitize=address
> > -fsanitize=undefined -fno-omit-frame-pointer -x objective-c     -x
> > objective-c  conftest.c >&5
> > In file included from
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/os/object.h:101,
> >                  from
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/dispatch/dispatch.h:48,
> >                  from
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20,
> >                  from
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:17,
> >                  from
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:60,
> >                  from
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6,
> >                  from
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AppKit.framework/Headers/AppKit.h:10,
> >                  from conftest.c:142:
> > /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/objc/NSObject.h:22:4:
> > error: unknown type name 'instancetype'
> >    22 | - (instancetype)self;
> >       |    ^~~~~~~~~~~~
> >
> > (lots of similar errors follow)
> >
> > This indicates that GCC treats the header as C instead of Objective C.
> > Which is interesting because -x objective-c is given explicitly. Does
> > GCC need some other flag to force compilation as Objective C?
>
> The behavior difference is indeed trivial to reproduce:
>
> p@p:/tmp$ cat appkit.c
> #include <AppKit/AppKit.h>
> p@p:/tmp$ clang -c -x objective-c appkit.c 2> /dev/null ; echo $?
> 0
> p@p:/tmp$ gcc-9 -c -x objective-c appkit.c 2> /dev/null ; echo $?
> 1
>
> Without the redirection GCC prints tons of similar errors.

OK, I guess this is a red herring and the problem has nothing to do
with -x. The Objective C dialect supported by GCC is simply different
from the Objective C dialect used by Apple, and until GCC supports the
Apple dialect it can't be used to build any macOS app.



  reply	other threads:[~2019-08-02 15:06 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-18 19:23 [PATCH v4] Enable xwidgets on macOS Sungbin Jo
2019-07-19  4:16 ` [PATCH v5] " Sungbin Jo
2019-07-19 19:17   ` Alan Third
2019-07-19 19:25     ` Savannah down (was: [PATCH v5] Enable xwidgets on macOS) Paul Eggert
2019-07-20  8:21   ` [PATCH v5] Enable xwidgets on macOS Eli Zaretskii
2019-07-23 18:36     ` 조성빈
2019-07-25 18:51       ` 조성빈
2019-07-26  5:55         ` Eli Zaretskii
2019-07-27  2:48           ` Richard Stallman
2019-07-27  8:38             ` Eli Zaretskii
2019-07-27 10:41         ` Eli Zaretskii
2019-07-27 12:35           ` 조성빈
2019-07-27 13:03             ` Eli Zaretskii
2019-07-29 17:08               ` 조성빈
2019-08-03 10:03                 ` Eli Zaretskii
2019-08-03 10:52                   ` 조성빈
2019-07-29 20:26         ` Alan Third
2019-07-29 21:02           ` Stefan Monnier
2019-07-30 15:35             ` 조성빈
2019-07-30 19:25               ` Stefan Monnier
2019-07-31 15:52                 ` 조성빈
2019-07-30 15:33           ` 조성빈
2019-07-30 19:12             ` Juri Linkov
2019-07-31 15:55               ` 조성빈
2019-07-31 19:56             ` Alan Third
2019-08-01  2:35               ` Eli Zaretskii
2019-08-01  4:00                 ` 조성빈
2019-08-02  0:47                   ` Richard Stallman
2019-08-02  7:02                     ` Eli Zaretskii
2019-08-03  2:23                       ` Richard Stallman
2019-08-03  6:58                         ` Eli Zaretskii
2019-08-01 21:39                 ` macOS/GCC support policy (was: [PATCH v5] Enable xwidgets on macOS) Alan Third
2019-08-02  2:22                   ` Noam Postavsky
2019-08-02  6:56                   ` macOS/GCC support policy Eli Zaretskii
2019-08-02 10:08                     ` Philipp Stephani
2019-08-02 11:51                       ` Eli Zaretskii
2019-08-02 14:55                         ` Philipp Stephani
2019-08-02 14:59                           ` Philipp Stephani
2019-08-02 15:06                             ` Philipp Stephani [this message]
2019-08-02 15:05                           ` Eli Zaretskii
2019-08-03 11:02                             ` Alan Third
2019-08-03 11:10                               ` Eli Zaretskii
2019-08-03 11:18                                 ` Alan Third
2019-08-03 11:43                                   ` Eli Zaretskii
2019-08-04  2:56                                   ` Richard Stallman
2019-08-10  9:56                                     ` 조성빈
2019-08-18 15:43                                       ` Alan Third
2019-08-18 16:40                                         ` Eli Zaretskii
2019-08-18 23:42                                         ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAArVCkQm7v1jxtp9Sz8uSOo1mXXwZ46SfMDEVCShgF3HqYYB9w@mail.gmail.com \
    --to=p.stephani2@gmail.com \
    --cc=alan@idiocy.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=pcr910303@icloud.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).