unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#32927: 27.0.50; libxml not found when building on macOS Mojave
@ 2018-10-03 21:19 Philipp
  2018-10-03 23:10 ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp @ 2018-10-03 21:19 UTC (permalink / raw)
  To: 32927


Currently 'make' fails for me on master due to:

$ 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/xml.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 -Wno-error=null-pointer-arithmetic  xml.c
xml.c:26:10: fatal error: 'libxml/tree.h' file not found
#include <libxml/tree.h>
         ^~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [xml.o] Error 1
make: *** [src] Error 2

$ ./config.status --config
'--with-modules' '--without-pop' '--with-mailutils' '--enable-gcc-warnings=yes' '--enable-checking=all' '--enable-check-lisp-object-type' 'CFLAGS=-ggdb3 -O0 -Wno-error=null-pointer-arithmetic'

This is on macOS Mojave with Xcode 10.0.


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
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 dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec epa derived epg epg-config
gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils phst pcase ffap thingatpt
url-parse auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs
password-cache json map url-vars subr-x rx gnutls puny seq byte-opt gv
bytecomp byte-compile cconv dbus xml cl-loaddefs cl-lib 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 217251 7421)
 (symbols 48 21677 1)
 (strings 32 33393 2133)
 (string-bytes 1 904721)
 (vectors 16 37435)
 (vector-slots 8 753280 13522)
 (floats 8 50 66)
 (intervals 56 218 0)
 (buffers 992 11))





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

* bug#32927: 27.0.50; libxml not found when building on macOS Mojave
  2018-10-03 21:19 bug#32927: 27.0.50; libxml not found when building on macOS Mojave Philipp
@ 2018-10-03 23:10 ` Glenn Morris
  2018-10-04  5:24   ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2018-10-03 23:10 UTC (permalink / raw)
  To: Philipp; +Cc: 32927


Is this the perennial "xcode-select --install" issue again?

Bug#18779, 22552, 24068, 27526#74, 29931, ...
https://lists.gnu.org/r/emacs-devel/2015-11/msg01926.html





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

* bug#32927: 27.0.50; libxml not found when building on macOS Mojave
  2018-10-03 23:10 ` Glenn Morris
@ 2018-10-04  5:24   ` YAMAMOTO Mitsuharu
  2018-10-04 21:22     ` Philipp Stephani
  0 siblings, 1 reply; 6+ messages in thread
From: YAMAMOTO Mitsuharu @ 2018-10-04  5:24 UTC (permalink / raw)
  To: Glenn Morris; +Cc: Philipp, 32927

On Thu, 04 Oct 2018 08:10:35 +0900,
Glenn Morris wrote:
> 
> 
> Is this the perennial "xcode-select --install" issue again?
> 
> Bug#18779, 22552, 24068, 27526#74, 29931, ...
> https://lists.gnu.org/r/emacs-devel/2015-11/msg01926.html

I've received a similar report for the Mac port, and the situation was
a bit different.  Unlike the previous versions, the Command Line Tools
package for Xcode 10 no longer installs the header files into
/usr/include on macOS 10.14 (*).

*: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes

The culprit for the above case was the bogus libxml-2.0.pc file that
refers to nonexistent /usr/include.  Philipp, could you try

  $ pkg-config --cflags --libs "libxml-2.0 > 2.6.17

to see if it refers to /usr/include ?  If so, locate the erroneous
config file by the following command:

  $ pkg-config --variable pcfiledir "libxml-2.0 > 2.6.17"

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp





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

* bug#32927: 27.0.50; libxml not found when building on macOS Mojave
  2018-10-04  5:24   ` YAMAMOTO Mitsuharu
@ 2018-10-04 21:22     ` Philipp Stephani
  2018-10-05  0:34       ` YAMAMOTO Mitsuharu
  0 siblings, 1 reply; 6+ messages in thread
From: Philipp Stephani @ 2018-10-04 21:22 UTC (permalink / raw)
  To: YAMAMOTO Mitsuharu; +Cc: 32927

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

YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> schrieb am Do., 4. Okt.
2018 um 07:24 Uhr:

> On Thu, 04 Oct 2018 08:10:35 +0900,
> Glenn Morris wrote:
> >
> >
> > Is this the perennial "xcode-select --install" issue again?
> >
> > Bug#18779, 22552, 24068, 27526#74, 29931, ...
> > https://lists.gnu.org/r/emacs-devel/2015-11/msg01926.html
>
> I've received a similar report for the Mac port, and the situation was
> a bit different.  Unlike the previous versions, the Command Line Tools
> package for Xcode 10 no longer installs the header files into
> /usr/include on macOS 10.14 (*).
>
> *:
> https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes
>
> The culprit for the above case was the bogus libxml-2.0.pc file that
> refers to nonexistent /usr/include.  Philipp, could you try
>
>   $ pkg-config --cflags --libs "libxml-2.0 > 2.6.17
>
> to see if it refers to /usr/include ?  If so, locate the erroneous
> config file by the following command:
>
>   $ pkg-config --variable pcfiledir "libxml-2.0 > 2.6.17"
>


Yes, looks like this is the problem:

$ pkg-config --cflags --libs "libxml-2.0 > 2.6.17"

-I/usr/include/libxml2 -lxml2


$ pkg-config --variable pcfiledir "libxml-2.0 > 2.6.17"

/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12


And xcode-select --install doesn't help (because /usr/include doesn't
exist).

[-- Attachment #2: Type: text/html, Size: 2652 bytes --]

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

* bug#32927: 27.0.50; libxml not found when building on macOS Mojave
  2018-10-04 21:22     ` Philipp Stephani
@ 2018-10-05  0:34       ` YAMAMOTO Mitsuharu
  2018-10-15 14:52         ` Xu Xin
  0 siblings, 1 reply; 6+ messages in thread
From: YAMAMOTO Mitsuharu @ 2018-10-05  0:34 UTC (permalink / raw)
  To: Philipp Stephani; +Cc: 32927

tags 32927 notabug
close 32927
quit

On Fri, 05 Oct 2018 06:22:22 +0900,
Philipp Stephani wrote:

> Yes, looks like this is the problem:
> 
> $ pkg-config --cflags --libs "libxml-2.0 > 2.6.17"
> 
> -I/usr/include/libxml2 -lxml2
> 
> $ pkg-config --variable pcfiledir "libxml-2.0 > 2.6.17"
> 
> /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12

The file libxml-2.0.pc there (installed via Homebrew?) does not make
sense (and actually does harm) unless the header files are installed
into /usr/include.  You can do that by following the workaround
mentioned in the Xcode release notes, but I'm not sure this is the way
intended by the Homebrew developers (and I'm not using Homebrew).
Maybe you want to ask it at some Homebrew forum.

Anyway, this is not a bug in Emacs.  Closing.

				     YAMAMOTO Mitsuharu
				mituharu@math.s.chiba-u.ac.jp





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

* bug#32927: 27.0.50; libxml not found when building on macOS Mojave
  2018-10-05  0:34       ` YAMAMOTO Mitsuharu
@ 2018-10-15 14:52         ` Xu Xin
  0 siblings, 0 replies; 6+ messages in thread
From: Xu Xin @ 2018-10-15 14:52 UTC (permalink / raw)
  Cc: 32927

On Thu, Oct 4, 2018 at 8:35 PM YAMAMOTO Mitsuharu
<mituharu@math.s.chiba-u.ac.jp> wrote:
>
> tags 32927 notabug
> close 32927
> quit
>
> On Fri, 05 Oct 2018 06:22:22 +0900,
> Philipp Stephani wrote:
>
> > Yes, looks like this is the problem:
> >
> > $ pkg-config --cflags --libs "libxml-2.0 > 2.6.17"
> >
> > -I/usr/include/libxml2 -lxml2
> >
> > $ pkg-config --variable pcfiledir "libxml-2.0 > 2.6.17"
> >
> > /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.12
>
> The file libxml-2.0.pc there (installed via Homebrew?) does not make
> sense (and actually does harm) unless the header files are installed
> into /usr/include.  You can do that by following the workaround
> mentioned in the Xcode release notes, but I'm not sure this is the way
> intended by the Homebrew developers (and I'm not using Homebrew).
> Maybe you want to ask it at some Homebrew forum.
>
> Anyway, this is not a bug in Emacs.  Closing.
>
>                                      YAMAMOTO Mitsuharu
>                                 mituharu@math.s.chiba-u.ac.jp
>
>
>

A ticket opened for Homebrew, but looks like there's no plan to fix it
for now: https://github.com/Homebrew/brew/issues/5068

A patch like this can also be a hack:

% cat pkgconfig_10.14.diff
diff --git a/Library/Homebrew/os/mac/pkgconfig/10.14/libxml-2.0.pc
b/Library/Homebrew/os/mac/pkgconfig/10.14/libxml-2.0.pc
index c297c6b45..7a037a9cf 100644
--- a/Library/Homebrew/os/mac/pkgconfig/10.14/libxml-2.0.pc
+++ b/Library/Homebrew/os/mac/pkgconfig/10.14/libxml-2.0.pc
@@ -1,7 +1,8 @@
 prefix=/usr
+xcode_prefix=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk${prefix}
 exec_prefix=${prefix}
 libdir=${exec_prefix}/lib
-includedir=${prefix}/include
+includedir=${xcode_prefix}/include
 modules=1

 Name: libXML

Another interesting thing is Homebrew itself able to build emacs
successfully by command `brew install --build-from-source emacs`
without any header file error and any hack/workaround to *.pc files.
Maybe because of some internal settings.

- Xin





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

end of thread, other threads:[~2018-10-15 14:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-03 21:19 bug#32927: 27.0.50; libxml not found when building on macOS Mojave Philipp
2018-10-03 23:10 ` Glenn Morris
2018-10-04  5:24   ` YAMAMOTO Mitsuharu
2018-10-04 21:22     ` Philipp Stephani
2018-10-05  0:34       ` YAMAMOTO Mitsuharu
2018-10-15 14:52         ` Xu Xin

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