Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails on macOS Sierra (a2x, xsltproc) #939

Closed
elzii opened this issue Nov 24, 2016 · 14 comments
Closed

Build fails on macOS Sierra (a2x, xsltproc) #939

elzii opened this issue Nov 24, 2016 · 14 comments

Comments

@elzii
Copy link

elzii commented Nov 24, 2016

Here is a full log from brew

Relevant bit (I think):

a2x --no-xmllint -f manpage ../doc/kak.1.txt
a2x --no-xmllint -f manpage ../doc/manpages/commands.asciidoc
a2x --no-xmllint -f manpage ../doc/manpages/execeval.asciidoc
a2x --no-xmllint -f manpage ../doc/manpages/expansions.asciidoc
a2x --no-xmllint -f manpage ../doc/manpages/faces.asciidoc
a2x --no-xmllint -f manpage ../doc/manpages/faq.asciidoc
a2x --no-xmllint -f manpage ../doc/manpages/highlighters.asciidoc
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161124-72283-jl9yhi/doc/manpages/faces.xml" returned non-zero exit status 5
make: *** [../doc/manpages/faces.gz] Error 1
make: *** Waiting for unfinished jobs....
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161124-72283-jl9yhi/doc/kak.1.xml" returned non-zero exit status 5
make: *** [../doc/kak.1.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161124-72283-jl9yhi/doc/manpages/execeval.xml" returned non-zero exit status 5
make: *** [../doc/manpages/execeval.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161124-72283-jl9yhi/doc/manpages/faq.xml" returned non-zero exit status 5
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161124-72283-jl9yhi/doc/manpages/expansions.xml" returned non-zero exit status 5
make: *** [../doc/manpages/faq.gz] Error 1
make: *** [../doc/manpages/expansions.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161124-72283-jl9yhi/doc/manpages/highlighters.xml" returned non-zero exit status 5
make: *** [../doc/manpages/highlighters.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161124-72283-jl9yhi/doc/manpages/commands.xml" returned non-zero exit status 5
make: *** [../doc/manpages/commands.gz] Error 1

As per #579 here are some of the outputs requested:

~ which a2x
/usr/local/bin/a2x
~ which a2x.py
/usr/local/bin/a2x.py
~ make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
~ printf 'all:\n\techo $(shell which a2x)' | make -f -
echo /usr/local/bin/a2x
/usr/local/bin/a2x
~ printf 'all:\n\techo $(shell which a2x.py)' | make -f -
echo /usr/local/bin/a2x.py
/usr/local/bin/a2x.py
~ printf 'all:\n\techo $$PATH' | make -f -
/Users/elzi/.rvm/bin:
/Users/elzi/.rvm/gems/ruby-2.3.1/bin:
/Users/elzi/.rvm/gems/ruby-2.3.1@global/bin:
/Users/elzi/.rvm/rubies/ruby-2.3.1/bin:
/Users/elzi/.nvm/versions/node/v5.0.0/bin:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/opt/X11/bin:
/usr/local/go/bin:
/usr/local/bin:
/usr/bin:
/usr/sbin:
/usr/local/sbin:
@elzii
Copy link
Author

elzii commented Nov 24, 2016

Update:

Compiling manually with

make install PREFIX=/usr/local

succeeded. I have no experience with asciidoc or a2x but the process took a long time when running them. Ex:

a2x --no-xmllint -f manpage ../doc/manpages/commands.asciidoc
sed -i -r -e "s,^\.TH .+,.TH KAKOUNE 1 \"\" \"\" \"commands\"," \
	-e "/^\.SH \"NAME\"/{N;d;}" ../doc/manpages/commands.1
gzip -f ../doc/manpages/commands.1
mv -f ../doc/manpages/commands.1.gz ../doc/manpages/commands.gz
a2x --no-xmllint -f manpage ../doc/manpages/execeval.asciidoc
sed -i -r -e "s,^\.TH .+,.TH KAKOUNE 1 \"\" \"\" \"execeval\"," \
	-e "/^\.SH \"NAME\"/{N;d;}" ../doc/manpages/execeval.1
gzip -f ../doc/manpages/execeval.1

Unsure how that might relate to a2x failing via brew install

@lenormf
Copy link
Contributor

lenormf commented Nov 25, 2016

Could you try installing Kakoune using contrib/kakoune.rb, with the following patch applied:

diff --git a/contrib/kakoune.rb b/contrib/kakoune.rb
index 018774d..260b74f 100644
--- a/contrib/kakoune.rb
+++ b/contrib/kakoune.rb
@@ -6,6 +6,7 @@ class Kakoune < Formula
 
   depends_on 'boost'
   depends_on 'asciidoc' => :build
+  depends_on 'docbook-xsl' => :build
 
   def install
     cd 'src' do

@casimir
Copy link
Contributor

casimir commented Nov 25, 2016

Also the xml catalog path is not set by default, you have to export XML_CATALOG_FILES=/usr/local/etc/xml/catalog to build the doc without problem.

% brew info asciidoc
asciidoc: stable 8.6.9 (bottled), HEAD
Formatter/translator for text files to numerous formats. Includes a2x.
http://asciidoc.org/
/usr/local/Cellar/asciidoc/8.6.9_1 (217 files, 2.6M) *
  Built from source on 2016-09-26 at 13:24:19 with: --with-docbook-xsl
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/asciidoc.rb
==> Dependencies
Required: docbook ✔
Optional: docbook-xsl ✔
==> Options
--with-docbook-xsl
       	Install DTDs to generate manpages
--HEAD
       	Install HEAD version
==> Caveats
If you intend to process AsciiDoc files through an XML stage
(such as a2x for manpage generation) you need to add something
like:

  export XML_CATALOG_FILES=/usr/local/etc/xml/catalog

to your shell rc file so that xmllint can find AsciiDoc's
catalog files.

See `man 1 xmllint' for more.

@lenormf
Copy link
Contributor

lenormf commented Nov 25, 2016

@casimir would something like the following work?

diff --git a/contrib/kakoune.rb b/contrib/kakoune.rb
index 018774d..260b74f 100644
--- a/contrib/kakoune.rb
+++ b/contrib/kakoune.rb
@@ -6,6 +6,7 @@ class Kakoune < Formula
 
   depends_on 'boost'
   depends_on 'asciidoc' => :build
+  depends_on 'docbook-xsl' => :build
 
   def install
     cd 'src' do
diff --git a/src/Makefile b/src/Makefile
index 966582d..87dfa4d 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -37,6 +37,7 @@ mandir := $(DESTDIR)$(PREFIX)/share/man/man1
 os := $(shell uname)
 
 ifeq ($(os),Darwin)
+    XML_CATALOG_FILES=/usr/local/etc/xml/catalog
     LIBS += -lncurses -lboost_regex-mt
     CPPFLAGS += -I/usr/local/opt/ncurses/include
     LDFLAGS += -L/usr/local/opt/ncurses/lib

@casimir
Copy link
Contributor

casimir commented Nov 25, 2016

It will if you use the brew version of asciidoc (with --with-docbook-xsl) at least. This could be a sensible default.

The command I use to reinstall kakoune every day is this one:

XML_CATALOG_FILES=/usr/local/etc/xml/catalog \
PKG_CONFIG_PATH=/usr/local/opt/ncurses/lib/pkgconfig \
brew reinstall --HEAD https://raw.githubusercontent.com/mawww/kakoune/master/contrib/kakoune.rb

@lenormf
Copy link
Contributor

lenormf commented Nov 28, 2016

User @jjthrash reportedly managed to install Kakoune using the following patch (the asciidoc might have to be removed beforehand):

diff --git a/contrib/kakoune.rb b/contrib/kakoune.rb
index 018774d..326b89d 100644
--- a/contrib/kakoune.rb
+++ b/contrib/kakoune.rb
@@ -5,7 +5,8 @@ class Kakoune < Formula
   head "https://github.com/mawww/kakoune.git"
 
   depends_on 'boost'
-  depends_on 'asciidoc' => :build
+  depends_on 'docbook-xsl' => :build
+  depends_on 'asciidoc' => [:build, 'with-docbook-xsl']
 
   def install
     cd 'src' do

lenormf added a commit to lenormf/kakoune that referenced this issue Nov 28, 2016
The `xsltproc` utility is missing some xsl files, which are now
installed on the system by the `docbook-xsl` package.

Fixes mawww#939
@nonphoto
Copy link

I'm having issues on Sierra even after the patch:

==> make install PREFIX=/usr/local/Cellar/kakoune/HEAD-e441295
Last 15 lines from /Users/xxxxx/Library/Logs/Homebrew/kakoune/01.make:
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161212-53682-1wc7llx/doc/manpages/faq.xml" returned non-zero exit status 5
make: *** [../doc/manpages/faq.gz] Error 1
make: *** Waiting for unfinished jobs....
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161212-53682-1wc7llx/doc/manpages/highlighters.xml" returned non-zero exit status 5
make: *** [../doc/manpages/highlighters.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161212-53682-1wc7llx/doc/manpages/execeval.xml" returned non-zero exit status 5
make: *** [../doc/manpages/execeval.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161212-53682-1wc7llx/doc/manpages/commands.xml" returned non-zero exit status 5
make: *** [../doc/manpages/commands.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161212-53682-1wc7llx/doc/manpages/expansions.xml" returned non-zero exit status 5
make: *** [../doc/manpages/expansions.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161212-53682-1wc7llx/doc/kak.1.xml" returned non-zero exit status 5
make: *** [../doc/kak.1.gz] Error 1
a2x: ERROR: "xsltproc"  --stringparam callout.graphics 0 --stringparam navig.graphics 0 --stringparam admon.textlabel 1 --stringparam admon.graphics 0  "/usr/local/Cellar/asciidoc/8.6.9_1/etc/asciidoc/docbook-xsl/manpage.xsl" "/private/tmp/kakoune-20161212-53682-1wc7llx/doc/manpages/faces.xml" returned non-zero exit status 5
make: *** [../doc/manpages/faces.gz] Error 1

Building manually from the repository does not succeed either:

In file included from color.cc:5:
./regex.hh:8:10: fatal error: 'boost/regex.hpp' file not found
#include <boost/regex.hpp>
         ^

Boost is installed with Homebrew:

boost: stable 1.62.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.62.0 (12,405 files, 396.4M) *
  Poured from bottle on 2016-12-12 at 19:49:33
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Optional: icu4c ✔
==> Requirements
Optional: mpi ✘
==> Options
--c++11
	Build using C++11 mode
--universal
	Build a universal binary
--with-icu4c
	Build regexp engine with icu support
--with-mpi
	Build with MPI support
--without-single
	Disable building single-threading variant
--without-static
	Disable building static library variant
--HEAD
	Install HEAD version

@nemtsov
Copy link

nemtsov commented Dec 13, 2016

Similar issue:

In file included from color.cc:5:
./regex.hh:8:10: fatal error: 'boost/regex.hpp' file not found
#include <boost/regex.hpp>
         ^
1 warning and 1 error generated.
make: *** [.color.debug.o] Error 1
➜  brew info boost
boost: stable 1.62.0 (bottled), HEAD
Collection of portable C++ source libraries
https://www.boost.org/
/usr/local/Cellar/boost/1.62.0 (12,405 files, 396.4M) *
  Poured from bottle on 2016-12-13 at 09:14:16
From: https://github.com/Homebrew/homebrew-core/blob/master/Formula/boost.rb
==> Dependencies
Optional: icu4c ✘
==> Requirements
Optional: mpi ✘
==> Options
--c++11
	Build using C++11 mode
--universal
	Build a universal binary
--with-icu4c
	Build regexp engine with icu support
--with-mpi
	Build with MPI support
--without-single
	Disable building single-threading variant
--without-static
	Disable building static library variant
--HEAD
	Install HEAD version

@lenormf
Copy link
Contributor

lenormf commented Dec 13, 2016

Please forward your comments on #954, the newly created issue about this problem.

@nonphoto
Copy link

#954 takes care of the issues when installing via Homebrew, but not when installing manually. Should I create a new issue for this?

@lenormf
Copy link
Contributor

lenormf commented Dec 14, 2016

@nonphoto yes please, the environment variable needs to be exported into the Makefile as well.

@nemtsov
Copy link

nemtsov commented Dec 14, 2016

@lenormf FYI, I just tested on the latest and #954 (and the #966 fix) did not fix the boost issue above.

@lenormf
Copy link
Contributor

lenormf commented Dec 14, 2016

Unfortunately the fixes regarding those issues are not related, maybe we need to declare boost as a build dependency as well ?

diff --git a/kakoune.rb b/kakoune.rb
index 6c6860f..e4b5f44 100644
--- a/kakoune.rb
+++ b/kakoune.rb
@@ -4,7 +4,7 @@ class Kakoune < Formula
   homepage "https://github.com/mawww/kakoune"
   head "https://github.com/mawww/kakoune.git"
 
-  depends_on 'boost'
+  depends_on 'boost' => :build
   depends_on 'docbook-xsl' => :build
   depends_on 'asciidoc' => [:build, 'with-docbook-xsl']
 

@nonphoto
Copy link

I created #987 for the Boost-related errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants