GNU bug report logs - #26398
26.0.50; GNU LIB build fails on macOS 10.12.4

Previous Next

Package: emacs;

Reported by: Harald Maier <Harald <at> Maierh.de>

Date: Sat, 8 Apr 2017 07:15:02 UTC

Severity: normal

Found in version 26.0.50

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#26398: closed (26.0.50; GNU LIB build fails on macOS 10.12.4)
Date: Sun, 09 Apr 2017 08:04:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sun, 9 Apr 2017 01:03:30 -0700
with message-id <d936c05c-adba-3e62-69b2-ba9b8da8ed16 <at> cs.ucla.edu>
and subject line Re: GNU LIB build fails on macOS 10.12.4
has caused the debbugs.gnu.org bug report #26398,
regarding 26.0.50; GNU LIB build fails on macOS 10.12.4
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
26398: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=26398
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Harald Maier <Harald <at> Maierh.de>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.0.50; GNU LIB build fails on macOS 10.12.4
Date: Sat, 8 Apr 2017 09:14:25 +0200
The latest git checkout fails on mac OS 10.12.4.

  CC       fstatat.o
In file included from fstatat.c:45:
In file included from ./fcntl.h:67:
In file included from ./unistd.h:135:
In file included from ./getopt_pfx_core.h:52:
./getopt_core.h:91:79: error: expected ';' after top level declarator
extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
                                                                              ^
./getopt_core.h:92:28: error: expected identifier or '('
       __THROW __nonnull ((2, 3));
                           ^
./getopt_core.h:92:28: error: expected ')'
./getopt_core.h:92:27: note: to match this '('
       __THROW __nonnull ((2, 3));
                          ^
3 errors generated.
make[2]: *** [fstatat.o] Error 1
make[1]: *** [lib] Error 2

$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.0.0 (clang-800.0.38)
Target: x86_64-apple-darwin16.5.0


In GNU Emacs 26.0.50 (build 2, x86_64-apple-darwin16.4.0, X toolkit, Xaw3d scroll bars)
 of 2017-03-26 built on ate.maierh
Repository revision: 082e2cb3f40b717e4c00d31532927c9693b7cb9b
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
Recent messages:
Omitting...
Omitted 54 lines.
Mark saved where search started
Updating buffer list...
Formats have changed, recompiling...done
Updating buffer list...done
Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help
Mark set
previous-line: Beginning of buffer
Mark saved where search started
Quit [2 times]
Configured using:
 'configure --without-ns --with-x-toolkit=lucid
 --x-includes=/opt/X11/include --x-libraries=/opt/X11/lib --without-pop
 --without-gsettings --with-jpeg=no --with-png=no --with-gif=no
 --with-tiff=no'



[Message part 3 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Zack Weinberg <zackw <at> panix.com>
Cc: 26398-done <at> debbugs.gnu.org, Harald Maier <Harald <at> Maierh.de>,
 GNU C Library <libc-alpha <at> sourceware.org>, Gnulib bugs <bug-gnulib <at> gnu.org>
Subject: Re: GNU LIB build fails on macOS 10.12.4
Date: Sun, 9 Apr 2017 01:03:30 -0700
[Message part 4 (text/plain, inline)]
Zack Weinberg wrote:

> This patch is incomplete.

Yes, it was the Emacs patch, not the Gnulib patch. I'll attach a complete Gnulib 
patch.

> If gnulib cannot use __nonnull in
> getopt_{core,ext}.h, then there is no point trying to define it in
> getopt_cdefs.h.

Good point, I've removed that in the attached.

> And you're going to need to put snippet/arg-nonnull
> back in the module file for this to work at all, aren't you?

Yes, that's in the attached patch.

> From glibc's point of view, I think it would be better if
> getopt_core.h and getopt_ext.h simply assumed _GL_ARG_NONNULL to be
> available; we can add it to either our getopt.h wrapper or to
> sys/cdefs.h - I don't want to make that call unilaterally.

By "our getopt.h wrapper" do you mean a file in glibc but not in Gnulib? If so, 
this doesn't affect Gnulib. I suspect _GL_ARG_NONNULL logically belongs in 
sys/cdefs.h but it should also work to put it into the getopt.h wrapper.

> (Do you
> know of a complete list of _GL_ macros that may appear in _public_
> header files?)

I don't know of an explicit list. You can look at all the .h files listed in the 
Files: sections of gnulib/modules/snippet/*. For example, the 
snippet/arg-nonnull module defines _GL_ARG_NONNULL, the snippet/_Noreturn module 
defines _Noreturn, and so forth. There are quite a few such macros, and (as 
_Noreturn indicates) they don't all begin with _GL_.

I installed the attached into Gnulib and merged it into Emacs, and am boldly 
marking the Emacs bug (Bug#26398) as done. I think there still needs to be some 
changes done on the proposed change to glibc, to define _GL_ARG_NONNULL 
somewhere for glibc.
[0001-getopt-port-recent-getopt-changes-to-macOS.patch (text/x-diff, attachment)]

This bug report was last modified 8 years and 48 days ago.

Previous Next


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