Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Can't build GNU Emacs or Remacs on macOS 10.14 Mojave - fatal error: 'libxml/tree.h' file not found #886
Might be off-topic but I get this error on macOS 10.14 Mojave, after running
I didn't get this error before updating macOS to Mojave.
changed the title
Can't build GNU Emacs or Remacs on macOS "Mojave xml.c:23:10: fatal error: 'libxml/tree.h' file not found"
Oct 1, 2018
I also upgraded to Mojave and I ran into this problem. I solved it by using homebrew to install
$ brew install libxml2
If you have already installed
$ export LDFLAGS="-L/usr/local/opt/libxml2/lib" $ export CPPFLAGS="-I/usr/local/opt/libxml2/include" $ export PKG_CONFIG_PATH="/usr/local/opt/libxml2/lib/pkgconfig"
Once you have your environment updated with
$ ./configure --enable-rust-debug
Now you should be able to re-run make. It built to completion for me when I did this. It took just over 2 hours on my machine.
Yes it's working @db48x , I have this in my
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig:/opt/X11/li b/pkgconfig:$PKG_CONFIG_PATH
I'm a bit curious why the built-in libxml2 from Xcode located at
The Xcode version does not seem to have a pkgconfig directory and setting the environment variables
Should be fine to use the Xcode headers... you just need to copy them out, and Apple provided a package for this. They hid it well.
Then launch it from your desktop. After, I'm able to build Emacs at least. Haven't tried Remacs yet.
I tested this and it works, I was able to build using this command
so there is no need for installing libxm2 via brew, I'll update the docs later