* bug#32924: 27.0.50; Error building master on macOS Mojave
@ 2018-10-03 20:10 Philipp
2018-10-03 20:44 ` Philipp Stephani
2018-10-09 18:19 ` Paul Eggert
0 siblings, 2 replies; 3+ messages in thread
From: Philipp @ 2018-10-03 20:10 UTC (permalink / raw)
To: 32924
When trying to build master today, I got the error message:
$ make V=1
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib all
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C lib-src all
make[1]: Nothing to be done for `all'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src VCSWITNESS='$(srcdir)/../.git/logs/HEAD' all
gcc -c -Demacs -I. -I. -I../lib -I../lib -isystem /usr/X11/include -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -DMAGICKCORE_HDRI_ENABLE=1 -DMAGICKCORE_QUANTUM_DEPTH=16 -isystem /usr/local/Cellar/imagemagick/7.0.8-12/include/ImageMagick-7 -isystem /usr/include/libxml2 -isystem /usr/local/Cellar/little-cms2/2.9/include -MMD -MF deps/emacs.d -MP -isystem /usr/local/Cellar/jansson/2.11/include -isystem /usr/local/Cellar/gnutls/3.5.19/include -isystem /usr/local/Cellar/nettle/3.4/include -isystem /usr/local/Cellar/libtasn1/4.13/include -isystem /usr/local/Cellar/p11-kit/0.23.14/include/p11-kit-1 -Werror -fno-common -W -Waddress -Wall -Wattributes -Wbuiltin-macro-redefined -Wchar-subscripts -Wcomment -Wcomments -Wcpp -Wdangling-else -Wdate-time -Wdeprecated -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wduplicate-decl-specifier -Wempty-body -Wendif-labels -Wenum-compare -Wexpansion-to-defined -Wextra -Wformat-extra-args -Wformat-security -Wformat-y2k -Wformat-zero-length -Wignored-attributes -Wignored-qualifiers -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wincompatible-pointer-types -Winit-self -Wint-conversion -Wint-to-pointer-cast -Winvalid-pch -Wlogical-not-parentheses -Wmain -Wmissing-declarations -Wmissing-include-dirs -Wmissing-prototypes -Wmultichar -Wnarrowing -Wnested-externs -Wnonnull -Wnull-dereference -Wodr -Wold-style-definition -Woverflow -Wpacked -Wparentheses -Wpointer-arith -Wpointer-sign -Wpointer-to-int-cast -Wpragmas -Wreturn-type -Wsequence-point -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wsizeof-array-argument -Wsizeof-pointer-memaccess -Wstrict-aliasing -Wstrict-prototypes -Wswitch-bool -Wtautological-compare -Wtrigraphs -Wuninitialized -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-local-typedefs -Wunused-result -Wunused-value -Wunused-variable -Wvarargs -Wvariadic-macros -Wvolatile-register-var -Wwrite-strings -Wredundant-decls -Wno-missing-field-initializers -Wno-sign-compare -Wno-type-limits -Wno-unused-parameter -Wno-format-nonliteral -Wno-missing-braces -Wno-initializer-overrides -Wno-tautological-compare -Wno-tautological-constant-out-of-range-compare -ggdb3 -O0 emacs.c
In file included from emacs.c:34:
In file included from ./lisp.h:866:
./globals.h:1075:1: error: arithmetic on a null pointer treated as a cast from integer to pointer is a GNU extension [-Werror,-Wnull-pointer-arithmetic]
DEFINE_LISP_SYMBOL (Qnil)
^~~~~~~~~~~~~~~~~~~~~~~~~
./lisp.h:851:27: note: expanded from macro 'DEFINE_LISP_SYMBOL'
DEFINE_GDB_SYMBOL_END (LISPSYM_INITIALLY (name))
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
./lisp.h:840:3: note: expanded from macro 'LISPSYM_INITIALLY'
TAG_PTR (Lisp_Symbol, (char *) (intptr_t) ((i##name) * sizeof *lispsym))
^
./lisp.h:835:53: note: expanded from macro 'TAG_PTR'
LISP_INITIALLY ((Lisp_Word) ((untagged_ptr) (ptr) + LISP_WORD_TAG (tag)))
^
./lisp.h:599:29: note: expanded from macro 'LISP_INITIALLY'
# define LISP_INITIALLY(w) {w}
^
./lisp.h:52:38: note: expanded from macro 'DEFINE_GDB_SYMBOL_END'
# define DEFINE_GDB_SYMBOL_END(id) = id;
^~
1 error generated.
make[1]: *** [emacs.o] Error 1
make: *** [src] Error 2
$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
In GNU Emacs 27.0.50 (build 17, x86_64-apple-darwin17.4.0, NS appkit-1561.20 Version 10.13.3 (Build 17D102))
of 2018-09-21 built on p
Repository revision: ee3be3fdfa96d7d1a0740c8145a26d758c12a711
Windowing system distributor 'Apple', version 10.3.1671
System Description: Mac OS X 10.14
Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Configured using:
'configure --with-modules --without-pop --with-mailutils
--enable-gcc-warnings=yes --enable-checking
--enable-check-lisp-object-type 'CFLAGS=-ggdb3 -O0''
Configured features:
IMAGEMAGICK NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS
MODULES THREADS JSON LCMS2 GMP
Important settings:
value of $LANG: de_DE.UTF-8
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
easymenu mml-sec password-cache epa derived epg epg-config gnus-util
rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils elec-pair time-date
tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type
mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-mode elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock
font-lock syntax facemenu font-core term/tty-colors frame cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer
cl-preloaded nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote threads kqueue cocoa ns
lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 204487 8146)
(symbols 48 20150 1)
(strings 32 29069 1993)
(string-bytes 1 776419)
(vectors 16 35374)
(vector-slots 8 730228 16174)
(floats 8 46 70)
(intervals 56 211 0)
(buffers 992 11))
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#32924: 27.0.50; Error building master on macOS Mojave
2018-10-03 20:10 bug#32924: 27.0.50; Error building master on macOS Mojave Philipp
@ 2018-10-03 20:44 ` Philipp Stephani
2018-10-09 18:19 ` Paul Eggert
1 sibling, 0 replies; 3+ messages in thread
From: Philipp Stephani @ 2018-10-03 20:44 UTC (permalink / raw)
To: 32924
[-- Attachment #1: Type: text/plain, Size: 769 bytes --]
Philipp <p.stephani2@gmail.com> schrieb am Mi., 3. Okt. 2018 um 22:12 Uhr:
>
> ./globals.h:1075:1: error: arithmetic on a null pointer treated as a cast
> from integer to pointer is a GNU extension
> [-Werror,-Wnull-pointer-arithmetic]
> ./lisp.h:835:53: note: expanded from macro 'TAG_PTR'
> LISP_INITIALLY ((Lisp_Word) ((untagged_ptr) (ptr) + LISP_WORD_TAG (tag)))
>
Some discussion around this topic:
http://releases.llvm.org/6.0.0/tools/clang/docs/ReleaseNotes.html#improvements-to-clang-s-diagnostics
, https://reviews.llvm.org/D37042,
http://lists.llvm.org/pipermail/llvm-dev/2017-July/115053.html. Given that
the TAG_PTR implementation is technically undefined behavior, would it be
possible to change the definition (e.g. to use intptr_t instead of char*)?
[-- Attachment #2: Type: text/html, Size: 1298 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* bug#32924: 27.0.50; Error building master on macOS Mojave
2018-10-03 20:10 bug#32924: 27.0.50; Error building master on macOS Mojave Philipp
2018-10-03 20:44 ` Philipp Stephani
@ 2018-10-09 18:19 ` Paul Eggert
1 sibling, 0 replies; 3+ messages in thread
From: Paul Eggert @ 2018-10-09 18:19 UTC (permalink / raw)
To: Philipp; +Cc: 32924-done
[-- Attachment #1: Type: text/plain, Size: 780 bytes --]
> $ gcc --version
> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
> Apple LLVM version 10.0.0 (clang-1000.11.45.2)
Wait, the command 'gcc' on macOS actually runs Clang? That's cold. How do you
think Apple would feel if we called Emacs "iPhone"?
Anyway, we can pacify Clang by disabling its -Wnull-pointer-arithmetic option,
so I installed the attached. I'd rather do this than go back to the old intptr_t
way of doing things, which has too many problems with missing type-checking at
the C language level (unless you configure with --enable-check-lisp-object-type,
which has its own set of problems).
[-- Attachment #2: 0001-Port-enable-gcc-warnings-to-recent-clang.patch --]
[-- Type: text/x-patch, Size: 901 bytes --]
From 7f1beabfcdcb58d90aa78db22b9a123faf298749 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 9 Oct 2018 11:16:00 -0700
Subject: [PATCH] Port --enable-gcc-warnings to recent clang
* configure.ac: Disable -Wnull-pointer-arithmetic if clang (Bug#32924).
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 6f3d7338c3..df910280b4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1019,9 +1019,10 @@ AC_DEFUN
gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
gl_WARN_ADD([-Wno-format-nonliteral])
- # clang is unduly picky about braces.
+ # clang is unduly picky about some things.
if test "$emacs_cv_clang" = yes; then
gl_WARN_ADD([-Wno-missing-braces])
+ gl_WARN_ADD([-Wno-null-pointer-arithmetic])
fi
# This causes too much noise in the MinGW build
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-10-09 18:19 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-03 20:10 bug#32924: 27.0.50; Error building master on macOS Mojave Philipp
2018-10-03 20:44 ` Philipp Stephani
2018-10-09 18:19 ` Paul Eggert
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.