unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#36332: non-GUI build broken on macOS
@ 2019-06-22 18:46 Paul Eggert
  2019-06-22 19:38 ` Alan Third
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Eggert @ 2019-06-22 18:46 UTC (permalink / raw)
  To: 36332

Apparently Emacs master does not build in macOS when configured without a GUI, 
e.g., './configure --without-ns'. Someone with macOS experience should fix this, 
as Emacs should always be buildable without a GUI. Please see:

https://lists.gnu.org/r/emacs-devel/2019-06/msg00847.html

where Robert Pluim reports the following symptoms:

In file included from nsterm.m:49:
./nsterm.h:1322:20: error: typedef redefinition with different types
('NSUInteger' (aka 'unsigned long') vs 'enum NSWindowStyleMask')
typedef NSUInteger NSWindowStyleMask;

                    ^
/System/Library/Frameworks/AppKit.framework/Headers/NSWindow.h:35:32: note:
previous definition is here
typedef NS_OPTIONS(NSUInteger, NSWindowStyleMask) {
                                ^
In file included from nsterm.m:49:
./nsterm.h:1326:6: error: enumeration previously declared with fixed underlying
type
enum NSWindowTabbingMode
      ^





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 18:46 bug#36332: non-GUI build broken on macOS Paul Eggert
@ 2019-06-22 19:38 ` Alan Third
  2019-06-22 19:44   ` Paul Eggert
  0 siblings, 1 reply; 14+ messages in thread
From: Alan Third @ 2019-06-22 19:38 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 36332

On Sat, Jun 22, 2019 at 11:46:26AM -0700, Paul Eggert wrote:
> Apparently Emacs master does not build in macOS when configured without a
> GUI, e.g., './configure --without-ns'. Someone with macOS experience should
> fix this, as Emacs should always be buildable without a GUI.

It is. What doesn’t work is defining HAVE_NS but not setting the
requirements for an NS build.

'./configure --without-ns' works fine as is.
-- 
Alan Third





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 19:38 ` Alan Third
@ 2019-06-22 19:44   ` Paul Eggert
  2019-06-22 20:19     ` Alan Third
  0 siblings, 1 reply; 14+ messages in thread
From: Paul Eggert @ 2019-06-22 19:44 UTC (permalink / raw)
  To: Alan Third; +Cc: 36332

Alan Third wrote:
> It is. What doesn’t work is defining HAVE_NS but not setting the
> requirements for an NS build.
> 
> './configure --without-ns' works fine as is.

OK, thanks, in that case I guess that the problem is only that after one does 
'make extraclean' then one cannot build with the current master without manually 
specifying './configure --without-ns' at some point. This makes the bug less 
urgent to fix.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 19:44   ` Paul Eggert
@ 2019-06-22 20:19     ` Alan Third
  2019-06-22 20:25       ` Paul Eggert
  2019-06-22 20:50       ` Glenn Morris
  0 siblings, 2 replies; 14+ messages in thread
From: Alan Third @ 2019-06-22 20:19 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 36332

[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]

On Sat, Jun 22, 2019 at 12:44:40PM -0700, Paul Eggert wrote:
> Alan Third wrote:
> > It is. What doesn’t work is defining HAVE_NS but not setting the
> > requirements for an NS build.
> > 
> > './configure --without-ns' works fine as is.
> 
> OK, thanks, in that case I guess that the problem is only that after one
> does 'make extraclean' then one cannot build with the current master without
> manually specifying './configure --without-ns' at some point. This makes the
> bug less urgent to fix.

I haven’t been following the clean build chat on emacs-devel, does
make extraclean delete macuvs.h?

We could try returning a useful message at configure time instead of
just failing during the build. Do you think the attached patch is OK?

I’d rather not just build headless as the usual build process on the
Mac is to do ’make; make install’, which just builds the NS app
directory. If we were to configure headless then run that same command
it would attempt to install a headless Emacs to /usr or somewhere. It
would probably fail due to permissions, but I’d prefer to avoid any
confusion in the first place.
-- 
Alan Third

[-- Attachment #2: 0001-Provide-a-useful-message-if-macuvs.h-doesn-t-exist-b.patch --]
[-- Type: text/plain, Size: 1220 bytes --]

From 8ece63cd67d158b0349dda83c303e1f02a947f40 Mon Sep 17 00:00:00 2001
From: Alan Third <alan@idiocy.org>
Date: Sat, 22 Jun 2019 21:13:50 +0100
Subject: [PATCH] Provide a useful message if macuvs.h doesn't exist
 (bug#36332)

* configure.ac (with-ns): Error out if attempting to configure with
Cocoa but macuvs.h doesn't exist.
---
 configure.ac | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 0507f58054..d7efe467fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1963,7 +1963,12 @@ AC_DEFUN
   # macfont.o requires macuvs.h which is absent after 'make extraclean',
   # so avoid NS_IMPL_COCOA if macuvs.h is absent.
   # Even a headless Emacs can build macuvs.h, so this should let you bootstrap.
-  if test "${opsys}" = darwin && test -f "$srcdir/src/macuvs.h"; then
+  if test "${opsys}" = darwin; then
+     if test \! -f "$srcdir/src/macuvs.h"; then
+       AC_MSG_ERROR([Cocoa build requested, however macuvs.h is missing.
+Rerun configure with the option '--without-ns' and run make before
+configuring '--with-ns'.])
+     fi
      NS_IMPL_COCOA=yes
      ns_appdir=`pwd`/nextstep/Emacs.app
      ns_appbindir=${ns_appdir}/Contents/MacOS
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 20:19     ` Alan Third
@ 2019-06-22 20:25       ` Paul Eggert
  2019-06-22 20:37         ` Alan Third
  2019-06-22 20:50       ` Glenn Morris
  1 sibling, 1 reply; 14+ messages in thread
From: Paul Eggert @ 2019-06-22 20:25 UTC (permalink / raw)
  To: Alan Third; +Cc: 36332

Alan Third wrote:

> I haven’t been following the clean build chat on emacs-devel, does
> make extraclean delete macuvs.h?

Yes, and this was true even before the recent patches in this area.
> We could try returning a useful message at configure time instead of
> just failing during the build. Do you think the attached patch is OK?

Sure, that looks good.

> I’d rather not just build headless as the usual build process on the
> Mac is to do ’make; make install’

My idea is that plain 'make' would build a headless Emacs for src/temacs and 
src/bootstrap-emacs, as that's all that Emacs needs to compile itself. However, 
src/emacs would continue to be an Emacs with the GUI. This could be done on all 
platforms, not just macOS. Admittedly it'd be some work.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 20:25       ` Paul Eggert
@ 2019-06-22 20:37         ` Alan Third
  0 siblings, 0 replies; 14+ messages in thread
From: Alan Third @ 2019-06-22 20:37 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 36332

On Sat, Jun 22, 2019 at 01:25:58PM -0700, Paul Eggert wrote:
> Alan Third wrote:
> 
> > I haven’t been following the clean build chat on emacs-devel, does
> > make extraclean delete macuvs.h?
> 
> Yes, and this was true even before the recent patches in this area.
> > We could try returning a useful message at configure time instead of
> > just failing during the build. Do you think the attached patch is OK?
> 
> Sure, that looks good.

Thanks, I’ll push it to master if nobody complains in a couple of days.

> > I’d rather not just build headless as the usual build process on the
> > Mac is to do ’make; make install’
> 
> My idea is that plain 'make' would build a headless Emacs for src/temacs and
> src/bootstrap-emacs, as that's all that Emacs needs to compile itself.
> However, src/emacs would continue to be an Emacs with the GUI. This could be
> done on all platforms, not just macOS. Admittedly it'd be some work.

Yes, that would be better. I’d have no idea where to start, though. :)
-- 
Alan Third





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 20:19     ` Alan Third
  2019-06-22 20:25       ` Paul Eggert
@ 2019-06-22 20:50       ` Glenn Morris
  2019-06-22 20:55         ` Lars Ingebrigtsen
  1 sibling, 1 reply; 14+ messages in thread
From: Glenn Morris @ 2019-06-22 20:50 UTC (permalink / raw)
  To: Alan Third; +Cc: Paul Eggert, 36332

Alan Third wrote:

> I haven't been following the clean build chat on emacs-devel, does
> make extraclean delete macuvs.h?

It does, but it doesn't have to.
For example, it doesn't remove lisp/cedet/semantic/grammar-wy.el
or lisp/ldefs-boot.el.
Before least week, "extraclean" wasn't a particularly well-formed target.
Now it apparently needs to be buildable.
So I suggest that it doesn't delete src/macuvs.h.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 20:50       ` Glenn Morris
@ 2019-06-22 20:55         ` Lars Ingebrigtsen
  2019-06-22 21:10           ` Alan Third
  2019-06-23  2:36           ` Eli Zaretskii
  0 siblings, 2 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-22 20:55 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Alan Third, Paul Eggert, 36332

Glenn Morris <rgm@gnu.org> writes:

> Before least week, "extraclean" wasn't a particularly well-formed target.
> Now it apparently needs to be buildable.
> So I suggest that it doesn't delete src/macuvs.h.

I think that's a good solution. 

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 20:55         ` Lars Ingebrigtsen
@ 2019-06-22 21:10           ` Alan Third
  2019-06-23  2:36           ` Eli Zaretskii
  1 sibling, 0 replies; 14+ messages in thread
From: Alan Third @ 2019-06-22 21:10 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Paul Eggert, 36332

On Sat, Jun 22, 2019 at 10:55:10PM +0200, Lars Ingebrigtsen wrote:
> Glenn Morris <rgm@gnu.org> writes:
> 
> > Before least week, "extraclean" wasn't a particularly well-formed target.
> > Now it apparently needs to be buildable.
> > So I suggest that it doesn't delete src/macuvs.h.
> 
> I think that's a good solution. 

Yes, it certainly looks like the best option.
-- 
Alan Third





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-22 20:55         ` Lars Ingebrigtsen
  2019-06-22 21:10           ` Alan Third
@ 2019-06-23  2:36           ` Eli Zaretskii
  2019-06-23 14:11             ` Robert Pluim
  2019-06-25  1:43             ` Glenn Morris
  1 sibling, 2 replies; 14+ messages in thread
From: Eli Zaretskii @ 2019-06-23  2:36 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: alan, eggert, 36332

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sat, 22 Jun 2019 22:55:10 +0200
> Cc: Alan Third <alan@idiocy.org>, Paul Eggert <eggert@cs.ucla.edu>,
>  36332@debbugs.gnu.org
> 
> Glenn Morris <rgm@gnu.org> writes:
> 
> > Before least week, "extraclean" wasn't a particularly well-formed target.
> > Now it apparently needs to be buildable.
> > So I suggest that it doesn't delete src/macuvs.h.
> 
> I think that's a good solution. 

I'm OK with not removing it.  However, let's also mention this in the
description of "extraclean" in the top-level Makefile.in, to the
effect that if someone wants to force regenerating macuvs.h (e.g.,
because IVD_Sequences.txt was updated), they might need to remove this
file manually.

Thanks.





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-23  2:36           ` Eli Zaretskii
@ 2019-06-23 14:11             ` Robert Pluim
  2019-06-25  1:43             ` Glenn Morris
  1 sibling, 0 replies; 14+ messages in thread
From: Robert Pluim @ 2019-06-23 14:11 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, eggert, alan, 36332

>>>>> On Sun, 23 Jun 2019 05:36:22 +0300, Eli Zaretskii <eliz@gnu.org> said:

    >> From: Lars Ingebrigtsen <larsi@gnus.org>
    >> Date: Sat, 22 Jun 2019 22:55:10 +0200
    >> Cc: Alan Third <alan@idiocy.org>, Paul Eggert <eggert@cs.ucla.edu>,
    >> 36332@debbugs.gnu.org
    >> 
    >> Glenn Morris <rgm@gnu.org> writes:
    >> 
    >> > Before least week, "extraclean" wasn't a particularly well-formed target.
    >> > Now it apparently needs to be buildable.
    >> > So I suggest that it doesn't delete src/macuvs.h.
    >> 
    >> I think that's a good solution. 

    Eli> I'm OK with not removing it.  However, let's also mention this in the
    Eli> description of "extraclean" in the top-level Makefile.in, to the
    Eli> effect that if someone wants to force regenerating macuvs.h (e.g.,
    Eli> because IVD_Sequences.txt was updated), they might need to remove this
    Eli> file manually.

master builds again for me on macOS. Apologies for being grumpy
earlier.

Thanks

Robert





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-23  2:36           ` Eli Zaretskii
  2019-06-23 14:11             ` Robert Pluim
@ 2019-06-25  1:43             ` Glenn Morris
  2019-06-25 11:24               ` Lars Ingebrigtsen
  1 sibling, 1 reply; 14+ messages in thread
From: Glenn Morris @ 2019-06-25  1:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Lars Ingebrigtsen, eggert, alan, 36332


>> > So I suggest that [extraclean] doesn't delete src/macuvs.h.
>> 
>> I think that's a good solution. 
>
> I'm OK with not removing it.  However, let's also mention this in the
> description of "extraclean" in the top-level Makefile.in, to the
> effect that if someone wants to force regenerating macuvs.h (e.g.,
> because IVD_Sequences.txt was updated), they might need to remove this
> file manually.

I think the "extraclean" target has not had a proper definition to date.
I think a useful definition would be "return to the state of a clean checkout"
(by deleting files known to make, not by git clean).
In which case by definition "extraclean" would not delete macuvs.h.






^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-25  1:43             ` Glenn Morris
@ 2019-06-25 11:24               ` Lars Ingebrigtsen
  2019-06-27  9:45                 ` Paul Eggert
  0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-25 11:24 UTC (permalink / raw)
  To: Glenn Morris; +Cc: eggert, alan, 36332

Glenn Morris <rgm@gnu.org> writes:

> I think the "extraclean" target has not had a proper definition to date.
> I think a useful definition would be "return to the state of a clean checkout"
> (by deleting files known to make, not by git clean).
> In which case by definition "extraclean" would not delete macuvs.h.

I agree.  I've now removed the deletion (but added a comment about it).

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





^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#36332: non-GUI build broken on macOS
  2019-06-25 11:24               ` Lars Ingebrigtsen
@ 2019-06-27  9:45                 ` Paul Eggert
  0 siblings, 0 replies; 14+ messages in thread
From: Paul Eggert @ 2019-06-27  9:45 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Glenn Morris; +Cc: alan, 36332-done

Lars Ingebrigtsen wrote:
> I agree.  I've now removed the deletion (but added a comment about it).

Thanks, closing the bug report.





^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2019-06-27  9:45 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-22 18:46 bug#36332: non-GUI build broken on macOS Paul Eggert
2019-06-22 19:38 ` Alan Third
2019-06-22 19:44   ` Paul Eggert
2019-06-22 20:19     ` Alan Third
2019-06-22 20:25       ` Paul Eggert
2019-06-22 20:37         ` Alan Third
2019-06-22 20:50       ` Glenn Morris
2019-06-22 20:55         ` Lars Ingebrigtsen
2019-06-22 21:10           ` Alan Third
2019-06-23  2:36           ` Eli Zaretskii
2019-06-23 14:11             ` Robert Pluim
2019-06-25  1:43             ` Glenn Morris
2019-06-25 11:24               ` Lars Ingebrigtsen
2019-06-27  9:45                 ` Paul Eggert

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).