GNU bug report logs -
#32927
27.0.50; libxml not found when building on macOS Mojave
Previous Next
Reported by: Philipp <p.stephani2 <at> gmail.com>
Date: Wed, 3 Oct 2018 21:20:02 UTC
Severity: normal
Tags: notabug
Found in version 27.0.50
Done: YAMAMOTO Mitsuharu <mituharu <at> math.s.chiba-u.ac.jp>
Bug is archived. No further changes may be made.
Full log
Message #24 received at 32927 <at> debbugs.gnu.org (full text, mbox):
On Thu, Oct 4, 2018 at 8:35 PM YAMAMOTO Mitsuharu
<mituharu <at> 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 <at> 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
This bug report was last modified 6 years and 298 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.