From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.devel Subject: Re: macOS/GCC support policy Date: Fri, 2 Aug 2019 17:06:47 +0200 Message-ID: References: <20190718192321.65684-1-pcr910303@icloud.com> <20190719041654.88561-1-pcr910303@icloud.com> <83pnm5t8ui.fsf@gnu.org> <20190729202649.GA89035@breton.holly.idiocy.org> <0A9ED54B-E381-44AA-9512-40CC0481F097@icloud.com> <20190731195633.GA5520@breton.holly.idiocy.org> <8336ilipe2.fsf@gnu.org> <20190801213958.GA30753@breton.holly.idiocy.org> <838sscgimf.fsf@gnu.org> <83sgqjg4z1.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="38007"; mail-complaints-to="usenet@blaine.gmane.org" Cc: Alan Third , pcr910303@icloud.com, Emacs developers To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Aug 02 17:09:51 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1htZBl-0009kt-Gv for ged-emacs-devel@m.gmane.org; Fri, 02 Aug 2019 17:09:49 +0200 Original-Received: from localhost ([::1]:35590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htZBk-0003cA-Gw for ged-emacs-devel@m.gmane.org; Fri, 02 Aug 2019 11:09:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47356) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1htZ94-0006os-SI for emacs-devel@gnu.org; Fri, 02 Aug 2019 11:07:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1htZ93-0005cA-Hj for emacs-devel@gnu.org; Fri, 02 Aug 2019 11:07:02 -0400 Original-Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:42343) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1htZ91-0005ar-Kn; Fri, 02 Aug 2019 11:06:59 -0400 Original-Received: by mail-ot1-x32f.google.com with SMTP id l15so78441719otn.9; Fri, 02 Aug 2019 08:06:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=KHCmF78F4qVJJPkmxjSl7Ny2sSqdtyOZgzLR1rrNeAA=; b=LXg8uVKYGyA0Yf7E3RgdNwBgwp4B9C/NmN8Fv/xP7R59uI2WMhNhFL2tf59qBSqagL 2izqIoXmAYLWsp9EefRGPy8OLEwPi9/j6kOYZbqaAl9BWFUjU4My99/bzYnjeHQbEph5 Cyx1lWeK50vnliejnHqkEXHPFcVz63F8cPtRNfYZKoAn3Jc66Us/VxVetHeY9QK8okdt mEzZkxtESxKMUMRmWS9OVdVvu4JeUf8Km5KAqej67iwj/+cKDTMbWzSGyggM0sJPavV8 k64SRmKwMBMgH1E2FWiNUHjDHzy6Au0C4TIaPIFh0gCkXuHtInQTOIxzEbk7Ju0F7HxP n3Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KHCmF78F4qVJJPkmxjSl7Ny2sSqdtyOZgzLR1rrNeAA=; b=gsLr2KL6eJ5AYq2nUO4lbImCEV0Dgefe8HwNJ8MgH1AAJbrDvDqqMYYC0cZuUMVO6N muHdr+sDC/53xmxwt0Oa1og4zhqrgo+OdZ58gXeguNzxxV/xNXbKm9osTwaKudGGFQNd z4VIKHuu7RqWcCKfhr5p4l59YCIXyXg0Yr3DIOSN0GGHpCJQOIXokLezfEv67WvzKZxd 1fycleX3jLLJPPEpoIFMRJRTkDzWWc8VDVCFu9kYu2sQnQ23XXWpDDMcptmE6aLF8jYl D/s4NbLdrM8eKtMBxNg47T5O/8TFKlvT3Uw1NTIjbP/hW90RuhFqQXKr557VLQNHwyY4 T43w== X-Gm-Message-State: APjAAAWmvFUKhMs7jngv228/p91yNV5vQ5fwhXiUh0MTLKgfdF9dh6RE kh7L4o47w1Vau4HXif/DmUQBbeCEtDHdLEc5GW5XBuHI X-Google-Smtp-Source: APXvYqwS/xSsxAlyKIIhKy2omUqDYRDHNgefJxn7WbDpI7Srbmn5oj3NKa9ACRy4L4Ao0gZ/KzteMYun0gJWRv0mWsw= X-Received: by 2002:a9d:5ed:: with SMTP id 100mr8826184otd.105.1564758418617; Fri, 02 Aug 2019 08:06:58 -0700 (PDT) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::32f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:239138 Archived-At: Am Fr., 2. Aug. 2019 um 16:59 Uhr schrieb Philipp Stephani : > > Am Fr., 2. Aug. 2019 um 16:55 Uhr schrieb Philipp Stephani > : > > > > Am Fr., 2. Aug. 2019 um 13:51 Uhr schrieb Eli Zaretskii : > > > > > > > From: Philipp Stephani > > > > Date: Fri, 2 Aug 2019 12:08:35 +0200 > > > > Cc: Alan Third , pcr910303@icloud.com, > > > > Emacs developers > > > > > > > > > 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 > 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.