emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: master 7555f93: Remove src/macuvs.h from Git repository


From: Alan Third
Subject: Re: master 7555f93: Remove src/macuvs.h from Git repository
Date: Sat, 22 Jun 2019 20:21:35 +0100
User-agent: Mutt/1.12.0 (2019-05-25)

On Sat, Jun 22, 2019 at 12:20:14PM +0200, Robert Pluim wrote:
> 
> *grumble* This stuff has broken the build on macOS, probably because
>  itʼs now building an initial emacs in a configuration thatʼs not been
>  tested in a while, judging by the the contents of config.h:
> 
> 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
>      ^
>      
> (and src/macuvs.h obviously does not get regenerated)

Hmm, so I'm seeing HAVE_NS defined but neither NS_IMPL_COCOA nor
NS_IMPL_GNUSTEP.

That will break things in a few places as there is an assumption that
if you’re building NS you must have an implementation of it.

The following fixes it:

modified   configure.ac
@@ -1959,11 +1959,19 @@ AC_DEFUN
 CFLAGS="$CFLAGS -x objective-c"
 GNU_OBJC_CFLAGS=
 LIBS_GNUSTEP=
+
+  # macfont.o requires macuvs.h which is absent in the repository,
+  # so avoid NS_IMPL_COCOA if macuvs.h is absent.
+  # Even a headless Emacs can build macuvs.h, so this lets you bootstrap.
+if test "${opsys}" = darwin && test \! -f "$srcdir/src/macuvs.h"; then
+  with_ns="no"
+fi
+
 if test "${with_ns}" != no; then
   # macfont.o requires macuvs.h which is absent in the repository,
   # so avoid NS_IMPL_COCOA if macuvs.h is absent.
   # Even a headless Emacs can build macuvs.h, so this lets you bootstrap.
-  if test "${opsys}" = darwin && test -f "$srcdir/src/macuvs.h"; then
+  if test "${opsys}" = darwin; then
      NS_IMPL_COCOA=yes
      ns_appdir=`pwd`/nextstep/Emacs.app
      ns_appbindir=${ns_appdir}/Contents/MacOS

But turns the build into:

    ./autogen.sh
    ./configure
    make
    ./configure
    make
    make install

And if the user accidentally runs ‘make install’ after the first make
it’s going to try to install Emacs in /usr or something, which is
generally the wrong thing on macOS.

Bizarrely I ended up with an X build after the first make...

I don’t know what the right thing to do is.
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]