Linuxbrew / brew

:beer::penguin: The Homebrew package manager for Linux
https://linuxbrew.sh
BSD 2-Clause "Simplified" License
2.66k stars 237 forks source link

brew install emacs failture #873

Closed ipstone closed 6 years ago

ipstone commented 6 years ago

Hello, I am trying to install emacs on centOS 7 with linux brew, but run into the following errors. Ideas for circumvent this? Thanks!

brew install emacs
==> Installing dependencies for emacs: autogen and gnutls
==> Installing emacs dependency: autogen
==> Downloading https://ftp.gnu.org/gnu/autogen/rel5.18.12/autogen-5.18.12.tar.xz
Already downloaded: /home/USER/.cache/Homebrew/downloads/2d10543cdb5328912e996e4d55babd531a059e2c25649c56bd57c13a6a94d933--autogen-5.18.12.tar.xz
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/0de886b/aut
Already downloaded: /home/USER/.cache/Homebrew/downloads/c92ecf2bed3512b550a4f21ecadf268ba74a90ac0315ad672f55caa432828346--allow-guile-2.2.diff
==> Patching
==> Applying allow-guile-2.2.diff
File agen5/guile-iface.h is read-only; trying to patch anyway
patching file agen5/guile-iface.h
Hunk #2 succeeded at 16 with fuzz 2 (offset -8 lines).
patching file configure
Hunk #1 succeeded at 14198 (offset 7 lines).
==> ./configure --disable-silent-rules --prefix=/SERVER/home/USER/.linuxbrew/Cellar/auto
==> make
Last 15 lines from /home/USER/.cache/Homebrew/Logs/autogen/02.make:
echo '#define  PKGDATADIR "/SERVER/home/USER/.linuxbrew/Cellar/autogen/5.18.12_1/share/autogen"' ; \
echo ; echo '#define  DEFINING 1' ; \
echo '#include "autoopts/project.h"' ; \
for f in xmlopts.c fork.c xml2ag.c ; \
do echo "#include \"$f\"" ; done
gcc-5 -DHAVE_CONFIG_H -I. -I..  -I.. -I../autoopts -I/usr/include/libxml2   -g -O2 -c -o x.o x.c
In file included from xmlopts.c:47:0,
                 from x.c:6:
xmlopts.h:238:27: fatal error: libxml/parser.h: No such file or directory
compilation terminated.
make[2]: *** [x.o] Error 1
make[2]: Leaving directory `/tmp/autogen-20181025-70419-1yg85w0/autogen-5.18.12/xml2ag'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/autogen-20181025-70419-1yg85w0/autogen-5.18.12'
make: *** [all] Error 2

READ THIS: https://github.com/Linuxbrew/brew/wiki/troubleshooting
Please do not report this issue to Homebrew/brew or Homebrew/core,
which support macOS only."

USER@SERVER:~$ brew install gnutls
==> Installing dependencies for gnutls: autogen
==> Installing gnutls dependency: autogen
==> Downloading https://ftp.gnu.org/gnu/autogen/rel5.18.12/autogen-5.18.12.tar.xz
Already downloaded: /home/USER/.cache/Homebrew/downloads/2d10543cdb5328912e996e4d55babd531a059e2c25649c56bd57c13a6a94d933--autogen-5.18.12.tar.xz
==> Downloading https://raw.githubusercontent.com/Homebrew/formula-patches/0de886b/autogen/allow-guile-2.2.diff
Already downloaded: /home/USER/.cache/Homebrew/downloads/c92ecf2bed3512b550a4f21ecadf268ba74a90ac0315ad672f55caa432828346--allow-guile-2.2.diff
==> Patching
==> Applying allow-guile-2.2.diff
File agen5/guile-iface.h is read-only; trying to patch anyway
patching file agen5/guile-iface.h
Hunk #2 succeeded at 16 with fuzz 2 (offset -8 lines).
patching file configure
Hunk #1 succeeded at 14198 (offset 7 lines).
==> ./configure --disable-silent-rules --prefix=/SERVER/home/USER/.linuxbrew/Cellar/autogen/5.18.12_1
==> make
Last 15 lines from /home/USER/.cache/Homebrew/Logs/autogen/02.make:
echo '#define  PKGDATADIR "/SERVER/home/USER/.linuxbrew/Cellar/autogen/5.18.12_1/share/autogen"' ; \
echo ; echo '#define  DEFINING 1' ; \
echo '#include "autoopts/project.h"' ; \
for f in xmlopts.c fork.c xml2ag.c ; \
do echo "#include \"$f\"" ; done
gcc-5 -DHAVE_CONFIG_H -I. -I..  -I.. -I../autoopts -I/usr/include/libxml2   -g -O2 -c -o x.o x.c
In file included from xmlopts.c:47:0,
                 from x.c:6:
xmlopts.h:238:27: fatal error: libxml/parser.h: No such file or directory
compilation terminated.
make[2]: *** [x.o] Error 1
make[2]: Leaving directory `/tmp/autogen-20181025-10321-1octjsv/autogen-5.18.12/xml2ag'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/autogen-20181025-10321-1octjsv/autogen-5.18.12'
make: *** [all] Error 2
sjackman commented 6 years ago

Please report issues with individual formula to Linuxbrew/core.

sjackman commented 6 years ago

Consider installing Linuxbrew in /home/linuxbrew/.linuxbrew/ if possible so that you can use precompiled binary packages (known as bottles) for non-relocatable formula like util-linux. Another possible workaround for you is brew install --force-bottle util-linux, but no promises.

If it's an option for you, you could open a ticket with your information systems department to ask that they create a linuxbrew role account with home directory /home/linuxbrew.

The precompiled binary bottles of non-relocatable bottles can only be used if you install in /home/linuxbrew/.linuxbrew, otherwise they have to be built from source. See the documentation below. On macOS the default installation directory is /usr/local. On Linux the default installation directory is /home/linuxbrew/.linuxbrew.

sjackman commented 6 years ago

Try brew edit emacs and add…

depends_on "libxml2" unless OS.mac?

and then brew install emacs. If that works for you, we'd appreciate you opening a pull request to fix the formulae.

sjackman commented 6 years ago

You can also try brew install emacs --without-libxml2. Note however that options are being deprecated and removed, so this work-around is only temporary.

ghost commented 6 years ago

This issue was moved by sjackman to Linuxbrew/homebrew-core#9995.