openSUSE / daps

DocBook Authoring and Publishing Suite (DAPS)
https://openSUSE.github.io/daps
Other
62 stars 18 forks source link

~"Fatal error: ID "book.daps.user" has already been defined."~ assorted errors when building daps on NixOS #430

Open grahamc opened 6 years ago

grahamc commented 6 years ago

Problem description

When building Daps on NixOS, the make phase ends with:

touch build/.firstbuild
make[2]: Entering directory '/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src'
/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src/make/setfiles.mk:95: *** Fatal error: ID "book.daps.user" has already been defined.  Stop.
make[2]: Leaving directory '/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src'
make[1]: *** [Makefile:1839: doc/build/daps-user/single-html/daps-user/daps-user.html] Error 1
make[1]: Leaving directory '/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src'
make: *** [Makefile:1229: all-recursive] Error 1

I'm in the process of packaging daps for NixOS and would love any help you can provide. I'm also available to get on any IRC network if that would be easier.

Full Log (click to expand!) ``` [100] grahamc@Morbo> nix-build ./daps.nix -K ~/projects these derivations will be built: /nix/store/l31a5v9ckr93pg4f3x2q3qh7071igvw8-daps-20171116.drv building path(s) ‘/nix/store/c6yhpb4rqcc3bcrg9p0zf9qxagdzzmp0-daps-20171116’ unpacking sources unpacking source archive /nix/store/157y7i4hifbj8w629h9hk0qdryyl9f6y-daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src source root is daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src patching sources patching script interpreter paths in . ./autobuild/daps-autobuild.in: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./autogen.sh: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./contrib/preflight/daps-preflight: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./contrib/daps-xslt/daps-xslt: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./contrib/translation/extract_translators.sh: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./contrib/docbook-xsl-test/mypytest.py: interpreter directive changed from "/usr/bin/python" to "/nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python" ./contrib/docbook-xsl-test/tests/xhtml/article-title/test_root_element.py: interpreter directive changed from "/usr/bin/python" to "/nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python" ./contrib/bin/getdcfile: interpreter directive changed from "/usr/bin/env python3" to "/nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python3" ./contrib/bin/dtdparsing.py: interpreter directive changed from "/usr/bin/python" to "/nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python" ./contrib/bin/login2sf: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./contrib/bin/pdfdiff: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./contrib/suse-xsl-tests/suse-pytest.py: interpreter directive changed from "/usr/bin/python3" to "/nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python3" ./test/lib/009_builddir: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/036_package-html: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/000_source-validation: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/035_online-docs: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/005_profiling: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/030_package-src: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/007_images: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/033_locdrop: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/020_pdf: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/025_epub: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/common_functions: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/001_script: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/023_text: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/022_html: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/037_package-pdf: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/lib/010_filelists: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/run_tests.sh: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./test/xspec/xspec.sh: interpreter directive changed from "/bin/sh" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/sh" ./configure: interpreter directive changed from " /bin/sh" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/sh" ./missing: interpreter directive changed from " /bin/sh" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/sh" ./.travis-debug: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./bin/ccecho: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./bin/daps-init: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./bin/daps.in: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./bin/daps-check-deps: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./bin/daps-xmlformat.in: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/daps-migrate: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/xml_cat_resolver: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/entities-exchange.sh: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/daps-xslt: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/daps-xep: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/webhelpindexer: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/getentityname.py: interpreter directive changed from "/usr/bin/python3" to "/nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python3" ./libexec/daps-jing.debian: interpreter directive changed from "/bin/sh" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/sh" ./libexec/daps-jing.generic: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./libexec/daps-fop: interpreter directive changed from "/bin/bash" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash" ./debian/rules: interpreter directive changed from "/usr/bin/make -f" to "/nix/store/614rxvzn5c58s4vqllvkixiyc5zz01dg-gnumake-4.2.1/bin/make -f" ./install-sh: interpreter directive changed from "/bin/sh" to "/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/sh" ./packaging/builddaps4osc.py: interpreter directive changed from "/usr/bin/python" to "/nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python" ./packaging/debian/rules: interpreter directive changed from "/usr/bin/make -f" to "/nix/store/614rxvzn5c58s4vqllvkixiyc5zz01dg-gnumake-4.2.1/bin/make -f" ./configure.ac:dnl bash in this configure script (/bin/sh being a symlink to /bin/bash). Even ./debian/patches/remove-shebang.patch:-#!/bin/bash ./doc/xml/MAIN.DAPS.xml: ./doc/xml/daps_user_intro.xml: ./doc/xml/daps_user_concept.xml: <xi:include href="book_daps_user.xml" ./doc/xml/daps_user_concept.xml:ROOTID="book.daps.user" ./doc/xml/daps_user_concept.xml: In this example, book.daps.user is the root ID of ./doc/xml/book_daps_user.xml: ./doc/xml/book_daps_user.xml: (PDF) ./doc/DC-daps-user:ROOTID="book.daps.user" ./doc/presentation/linuxtag_2012/DC-daps-user:ROOTID="book.daps.user" ./doc/presentation/linuxtag_2012/DC-daps-all:#ROOTID="book.daps.user" configuring configure flags: --prefix=/nix/store/c6yhpb4rqcc3bcrg9p0zf9qxagdzzmp0-daps-20171116 checking whether to enable maintainer-specific portions of Makefiles... no configure: Configuring DAPS 2.4.0, the DocBook Authoring and Publishing Suite... checking for a BSD-compatible install... /nix/store/mhhb2r53yln5hqgphg7l0n90676nzzpx-coreutils-8.28/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /nix/store/mhhb2r53yln5hqgphg7l0n90676nzzpx-coreutils-8.28/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether ln -s works... yes checking for a sed that does not truncate output... /nix/store/gz9ng15mjin6fggwdvz8g1aaqm0f9gqj-gnused-4.4/bin/sed checking for grep that handles long lines and -e... /nix/store/p60kgxyvsg0xcviasvsq726zfxyf9zq9-gnugrep-3.1/bin/grep checking for bash version... 4.4.12(1)-release checking for make... /nix/store/614rxvzn5c58s4vqllvkixiyc5zz01dg-gnumake-4.2.1/bin/make checking for tar... /nix/store/nmzp1cn63l0r6a8zqr1qidc8rs81di9v-gnutar-1.29/bin/tar checking for bzip2... /nix/store/il7iiqn2n1yzlh31hsjsqjsml5ndhrns-bzip2-1.0.6.0.1-bin/bin/bzip2 checking for epubcheck... 0 checking for checkbot... 0 checking for remake... /nix/store/xlafdmgdn7yhdhidbr2h0114jw25s7gl-remake-4.1+dbg-1.1/bin/remake checking for w3m... /nix/store/mdxynzsndflv5szab6dqsszkv3w5dw16-w3m-0.5.3+git20161120/bin/w3m configure: ===== Checking for XML tools... checking for xmllint... /nix/store/8larx9v7fa3bdmzjs6wdgarj3g7ca4pm-libxml2-2.9.5-bin/bin/xmllint checking for xsltproc... /nix/store/9hb10j0jk11k2akpv6a9bjv8jp9lr8kn-libxslt-1.1.29-bin/bin/xsltproc checking for xmlcatalog... /nix/store/8larx9v7fa3bdmzjs6wdgarj3g7ca4pm-libxml2-2.9.5-bin/bin/xmlcatalog checking for fop... /nix/store/3vb4nw169d9hd5ahcn8l7wa1pgqgn9rb-fop-2.1/bin/fop checking for jing... /nix/store/d6732xgmclmjfm5pkwf2csz9gbbirzwz-jing-trang-20150603/bin/jing checking for trang... /nix/store/d6732xgmclmjfm5pkwf2csz9gbbirzwz-jing-trang-20150603/bin/trang checking for /nix/store/k2n0bnsagp49ply9yks0kv2xgyla9h92-catalog... yes configure: ===== Checking for Image conversion tools... checking for convert... /nix/store/y9wsqy6g4plbcwvi4ssjp0ylb0xkjrbi-imagemagick-6.9.9-21/bin/convert checking for dia... /nix/store/whjq9y1b62725xs02iwfmsig3qgj7irk-dia-0.97.3/bin/dia checking for exiftool... /nix/store/2dk5fmh4g06ys31kv73ckkwfmvsbjl6s-perl-Image-ExifTool-10.60/bin/exiftool checking for gs... /nix/store/dfb19qwjnqg976jq4y8r38xa7gwzhyll-ghostscript-9.20/bin/gs checking for inkscape... /nix/store/3q65xjsbxidcn5slayzar3br2qdbkz2f-inkscape-0.92.2/bin/inkscape checking for optipng... /nix/store/4nx56ra933wrhiqxp9ynlzdxsd7w2wz8-optipng-0.7.6/bin/optipng checking for pdffonts... /nix/store/czp9d3z1rmrp8h22186bnppgjfivx6fc-poppler-utils-0.56.0/bin/pdffonts checking for xfig... /nix/store/fa9dz5haz4xisdsq8pzplzmcgvp30a72-xfig-3.2.5b/bin/xfig checking for -//W3C//DTD SVG 1.0//EN... no checking for -//W3C//DTD SVG 1.1 Basic//EN... no configure: ===== Checking for Python modules... checking for a Python interpreter with version >= 2.6... python checking for python... /nix/store/k0c5spdm7g4lb9gkm3l20v81dbl93s0h-python3-3.6.3/bin/python checking for python version... 3.6 checking for python platform... linux checking for python script directory... ${prefix}/lib/python3.6/site-packages checking for python extension module directory... ${exec_prefix}/lib/python3.6/site-packages checking python module: xml... yes configure: ===== Checking for DocBook 4.x... checking for -//OASIS//DTD DocBook XML V4.1.2//EN... yes checking for -//OASIS//DTD DocBook XML V4.2//EN... yes checking for -//OASIS//DTD DocBook XML V4.3//EN... yes checking for -//OASIS//DTD DocBook XML V4.4//EN... yes checking for -//OASIS//DTD DocBook XML V4.5//EN... yes configure: ===== Checking for additional DocBook 4.5 identifiers (optional)... checking for -//OASIS//ELEMENTS DocBook Information Pool V4.5//EN... yes checking for -//OASIS//ENTITIES DocBook Character Entities V4.5//EN... yes checking for -//OASIS//ENTITIES DocBook Notations V4.5//EN... yes checking for -//OASIS//ENTITIES DocBook Additional General Entities V4.5//EN... yes checking for -//OASIS//ELEMENTS DocBook Document Hierarchy V4.5//EN... yes checking for -//OASIS//DTD DocBook CALS Table Model V4.5//EN... yes checking for -//OASIS//DTD XML Exchange Table Model 19990315//EN... yes configure: ===== Checking for ISO Entities identifiers... checking for ISO 8879:1986//ENTITIES Publishing//EN//XML... yes checking for ISO 8879:1986//ENTITIES Greek Letters//EN//XML... yes checking for ISO 8879:1986//ENTITIES Box and Line Drawing//EN//XML... yes checking for ISO 8879:1986//ENTITIES Greek Symbols//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Negated Relations//EN//XML... yes checking for ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML... yes checking for ISO 8879:1986//ENTITIES Alternative Greek Symbols//EN//XML... yes checking for ISO 8879:1986//ENTITIES Diacritical Marks//EN//XML... yes checking for ISO 8879:1986//ENTITIES Monotoniko Greek//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Arrow Relations//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Ordinary//EN//XML... yes checking for ISO 8879:1986//ENTITIES Russian Cyrillic//EN//XML... yes checking for ISO 8879:1986//ENTITIES General Technical//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Delimiters//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Latin 1//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Binary Operators//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Latin 2//EN//XML... yes checking for ISO 8879:1986//ENTITIES Added Math Symbols: Relations//EN//XML... yes checking for ISO 8879:1986//ENTITIES Non-Russian Cyrillic//EN//XML... yes configure: ===== Checking for DocBook 5.0... checking for http://docbook.org/xml/5.0/rng/docbookxi.rng... yes checking for http://docbook.org/xml/5.0/rng/docbookxi.rnc... yes checking for http://docbook.org/xml/5.0/rng/docbook.rng... yes checking for http://docbook.org/xml/5.0/rng/docbook.rnc... yes configure: ===== Checking for DocBook 5.1... checking for http://docbook.org/xml/5.1/rng/docbookxi.rng... no checking for http://docbook.org/xml/5.1/rng/docbookxi.rnc... no checking for http://docbook.org/xml/5.1/rng/docbook.rng... no checking for http://docbook.org/xml/5.1/rng/docbook.rnc... no checking for http://docbook.org/xml/5.1/rng/assembly.rng... no checking for http://docbook.org/xml/5.1/rng/assembly.rnc... no checking for http://docbook.org/xml/5.1/rng/dbits.rng... no checking for http://docbook.org/xml/5.1/rng/dbits.rnc... no configure: WARNING: Seems you do not have DocBook 5.1 installed. configure: ===== Checking for DocBook XSL Stylesheets... checking for http://docbook.sourceforge.net/release/xsl/current/common/common.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/epub/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/html/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/lib/lib.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/profiling/profile.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/common/common.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/epub/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/fo/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/html/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/html/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/lib/lib.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/manpages/docbook.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/profiling/profile.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/xhtml/chunk.xsl... yes checking for http://docbook.sourceforge.net/release/xsl-ns/current/xhtml/docbook.xsl... yes /nix/store/p60kgxyvsg0xcviasvsq726zfxyf9zq9-gnugrep-3.1/bin/grep: /etc/os-release: No such file or directory /nix/store/p60kgxyvsg0xcviasvsq726zfxyf9zq9-gnugrep-3.1/bin/grep: /etc/os-release: No such file or directory /nix/store/p60kgxyvsg0xcviasvsq726zfxyf9zq9-gnugrep-3.1/bin/grep: /etc/os-release: No such file or directory checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating doc/xml/entity-decl.ent DAPS 2.4.0 is configured as follows. Please verify that this configuration matches your expectations. Supported features ------------------ * DocBook 4/5 support * man pages output * HTML/single HTML output * webhelp output (experimental) * ePUB output * png and jpg images Optional features ----------------- Feature | Enabled | Action to enable .............................................................................. DocBook 5.0 support | yes | DocBook 5.1 support | no | install DocBook 5.1, the | | DocBook 5 XSL stylesheets, | | and jing Create ASCII txt output | yes | Create PDF output | yes | Support for .dia images | yes | Support for .svg images | no | install inkscape and/or the SVG DTD Support for .fig images | yes | Size optimization for .png | yes | Check links in XML sources | no | install checkbot Create distributable archives | yes | Validate generated ePUB files | no | install epubcheck Show fonts not embedded in PDFs | yes | Enhanced debugging | yes | Experimental features --------------------- Feature | Enabled | Action to enable .............................................................................. Support for .pdf and .eps images | yes | DAPS will be installed into the following paths: ------------------------------------------------ Executables : /nix/store/c6yhpb4rqcc3bcrg9p0zf9qxagdzzmp0-daps-20171116/bin System wide config files: /nix/store/c6yhpb4rqcc3bcrg9p0zf9qxagdzzmp0-daps-20171116/etc/daps Documentation : /nix/store/c6yhpb4rqcc3bcrg9p0zf9qxagdzzmp0-daps-20171116/share/doc/daps Everything else : /nix/store/c6yhpb4rqcc3bcrg9p0zf9qxagdzzmp0-daps-20171116/share/daps building build flags: SHELL=/nix/store/vxx626vd8vwbckqpm4xicdckwjc9gh8h-bash-4.4-p12/bin/bash make[1]: Entering directory '/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src' test -z "build" || /nix/store/mhhb2r53yln5hqgphg7l0n90676nzzpx-coreutils-8.28/bin/mkdir -p build touch build/.firstbuild make[2]: Entering directory '/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src' /tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src/make/setfiles.mk:95: *** Fatal error: ID "book.daps.user" has already been defined. Stop. make[2]: Leaving directory '/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src' make[1]: *** [Makefile:1839: doc/build/daps-user/single-html/daps-user/daps-user.html] Error 1 make[1]: Leaving directory '/tmp/nix-build-daps-20171116.drv-0/daps-b624f6dcf309cebee409f0d3c2fe89a9f03f7559-src' make: *** [Makefile:1229: all-recursive] Error 1 note: keeping build directory ‘/tmp/nix-build-daps-20171116.drv-1’ builder for ‘/nix/store/l31a5v9ckr93pg4f3x2q3qh7071igvw8-daps-20171116.drv’ failed with exit code 2 error: build of ‘/nix/store/l31a5v9ckr93pg4f3x2q3qh7071igvw8-daps-20171116.drv’ failed ```
Nix Expression (click to expand!) ```nix { p ? import {} }: let pkgs = import (p.fetchFromGitHub { owner = "nixos"; repo = "nixpkgs"; rev = "c19136c4c9fa1d448038023fdfedd22108a33981"; sha256 = "1vhb0s9zv3769bv0paj2dsnqgv45g9ijj07na9qphyx3c680i4wf"; }) {}; inherit (pkgs) stdenv fetchFromGitHub runCommand libxml2 libxslt w3m remake fop jing trang imagemagick python3 dia exiftool ghostscript inkscape optipng xfig poppler_utils docbook_xml_dtd_45 docbook_xml_dtd_44 docbook_xml_dtd_43 docbook_xml_dtd_42 docbook_xml_dtd_412 docbook5 docbook5_xsl getopt docbook_xsl_ns which xmlstarlet bash ; catalog = runCommand "catalog" { buildInputs = [ libxml2 ]; catalogs = [ docbook5 docbook5_xsl docbook_xml_dtd_45 docbook_xml_dtd_44 docbook_xml_dtd_43 docbook_xml_dtd_42 docbook_xml_dtd_412 docbook_xsl_ns ]; } '' xmlcat() { xmlcatalog --noout "$@" "$out" } # set -eux #find ${docbook5_xsl} #sleep 505 ## xmlcat --create ( echo ''; echo ''; echo ''; for p in $catalogs; do for d in $p/share/xml $p/xml/dtd $p/xml/xsl; do if [ -d "$d" ]; then for i in $(find $d -name catalog.xml); do echo ''; done fi done done echo '' ) > $out xmlcat --add rewriteURI \ "http://docbook.sourceforge.net/release/xsl/current/" \ "file://${docbook5_xsl}/share/xml/docbook-xsl-ns/" #sleep 5 ''; in stdenv.mkDerivation { name = "daps-20171116"; src = fetchFromGitHub { owner = "openSUSE"; repo = "daps"; rev = "b624f6dcf309cebee409f0d3c2fe89a9f03f7559"; sha256 = "086bz7xfnzn7ziq0piz9wyghk81n8y4x19xp1i1nhcd00q7y6wcq"; }; buildInputs = [ libxml2 libxslt w3m remake fop jing trang imagemagick python3 dia exiftool ghostscript inkscape optipng xfig poppler_utils getopt which xmlstarlet ]; postPatch = '' #echo substituteInPlace ./configure --replace /etc/xml/catalog "${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml" #substituteInPlace ./configure --replace /etc/xml/catalog ${catalog} patchShebangs . for f in $(find . -type f); do substituteInPlace "$f" \ --replace "/usr/bin/xsltproc" "${libxslt.bin}/bin/xsltproc" \ --replace /etc/xml/catalog ${catalog} \ --replace /usr/bin/make $(which make) done for f in "./lib/daps_functions" "./make/common_variables.mk" "./bin/daps-auto.pl"; do substituteInPlace "$f" \ --replace "/bin/bash" "${bash}/bin/bash" done grep -r "/bin/bash" . | grep -v "${bash}/bin/bash" grep -r book.daps.user . ''; } ```

Expected behavior

I expected the installation to continue and complete.

Steps to reproduce the behavior

  1. Save the provided nix expression as daps.nix
  2. Run nix-build ./daps.nix

grahamc commented 6 years ago

It seems I needed to patch a hard-coded path to xmlstarlet:

      substituteInPlace "$f" \
        --replace "/usr/bin/xsltproc" "${libxslt.bin}/bin/xsltproc" \
        --replace /etc/xml/catalog ${catalog} \
        --replace /usr/bin/make $(which make) \
        --replace /usr/bin/xmlstarlet ${xmlstarlet}/bin/xmlstarlet

but still investigating

grahamc commented 6 years ago

That seemed to fix that particular issue. If you don't mind, I'd like to abuse this thread for a different one though:

Could not resolve URN "urn:x-daps:xslt:profiling:docbook45-profile.xsl" with xmlcatalog via catalog file "/nix/store/lm07z2q883152qwl5zzbhzsmxqxpfb09-catalog.xml"

however this catalog contains:

  <nextCatalog catalog="/nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/catalog.xml"/>

and that catalog contains:

<?xml version="1.0"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
  <system systemId="urn:x-daps:xslt:profiling:docbook41-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/docbook41-profile.xsl"/>
  <system systemId="urn:x-daps:xslt:profiling:docbook42-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/docbook42-profile.xsl"/>
  <system systemId="urn:x-daps:xslt:profiling:docbook43-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/docbook43-profile.xsl"/>
  <system systemId="urn:x-daps:xslt:profiling:docbook44-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/docbook44-profile.xsl"/>
  <system systemId="urn:x-daps:xslt:profiling:docbook45-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/docbook45-profile.xsl"/>
  <system systemId="urn:x-daps:xslt:profiling:docbook50-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/docbook50-profile.xsl"/>
  <system systemId="urn:x-daps:xslt:profiling:docbook51-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/docbook51-profile.xsl"/>
  <system systemId="urn:x-daps:xslt:profiling:novdoc-profile.xsl" uri="file:///nix/store/0fb0w45ya1krvhqldb58gmw73gk73irk-daps-catalog/share/xml/daps-xslt/profiling/novdoc-profile.xsl"/>
</catalog>

any tips on debugging this one?

fsundermeyer commented 6 years ago

Hi,

regarding the issue you reported first: Seems we need to do a better job using the stuff configure gives us - I will look into it. This is supposed to work without using hardcoded paths.

Regarding the catalog issue: Try using xmlcatalog -v <MASTER_CATALOG> <URN>. It gives you a list of catalogs it parses and should enable you to find out where it fails. On openSUSE it looks like this (shortened by a lot of "Free catalaog entry" lines that are of no importance here):

    ~> xmlcatalog -v /etc/xml/catalog urn:x-daps:xslt:profiling:docbook45-profile.xsl
    Resolve sysID urn:x-daps:xslt:profiling:docbook45-profile.xsl
    -1365461248 Parsing catalog /etc/xml/catalog
    /etc/xml/catalog added to file hash
    /etc/xml/catalog-d.xml not found in file hash
    -1365461248 Parsing catalog /etc/xml/catalog-d.xml
    /etc/xml/catalog-d.xml added to file hash
    /etc/xml/suse-catalog.xml not found in file hash
    -1365461248 Parsing catalog /etc/xml/suse-catalog.xml
    /etc/xml/suse-catalog.xml added to file hash
    Found system match urn:x-daps:xslt:profiling:docbook45-profile.xsl, using file:///usr/share/daps/daps-xslt/profiling/docbook45-profile.xsl
    file:///usr/share/daps/daps-xslt/profiling/docbook45-profile.xsl
grahamc commented 6 years ago

By the time I'm done, (if I finish) I'll have a good list of hardcoded paths :) none of them will work for NixOS (except for /bin/sh and /usr/bin/env)

re xmlcatalog: Interesting! Here is what I get:

Found system match urn:x-daps:xslt:profiling:docbook45-profile.xsl, using /nix/store/3fvq45fiw35flgzc00wrnybk0apkijfv-daps-catalog/share/xml/daps-xslt/profiling/docbook45-profile.xsl

I suspect I found a case of a hard-coded catalog path, I'll keep spelunking...!

grahamc commented 6 years ago

It turned out to be a hard-coded ref to /usr/bin/xmlcatalog. I managed to get it to install! Time to give it some exercise, and try the tool on for size :) Thank you for the hints.

grahamc commented 6 years ago

BTW for those who may find this and kick me for not posting the nix expression:

{ p ? import <nixpkgs> {} }:

let

  pkgs = import (p.fetchFromGitHub {
    owner = "nixos";
    repo = "nixpkgs";
    rev = "c19136c4c9fa1d448038023fdfedd22108a33981";
    sha256 = "1vhb0s9zv3769bv0paj2dsnqgv45g9ijj07na9qphyx3c680i4wf";
  }) {};

  inherit (pkgs) stdenv fetchurl fetchFromGitHub runCommand libxml2
    libxslt w3m remake fop jing trang imagemagick python3 dia exiftool
    ghostscript inkscape optipng xfig poppler_utils docbook_xml_dtd_45
    docbook_xml_dtd_44 docbook_xml_dtd_43 docbook_xml_dtd_42
    docbook_xml_dtd_412 docbook5 docbook5_xsl getopt docbook_xsl_ns
    which xmlstarlet bash autoreconfHook
  ;

  daps-src = fetchFromGitHub {
    owner = "openSUSE";
    repo = "daps";
    rev = "b624f6dcf309cebee409f0d3c2fe89a9f03f7559";
    sha256 = "086bz7xfnzn7ziq0piz9wyghk81n8y4x19xp1i1nhcd00q7y6wcq";
  };

  daps-catalog = runCommand "daps-catalog" {}
    ''
      mkdir -p $out/share/xml/
      cp ${daps-src}/etc/catalog.generic $out/share/xml/catalog.xml
      cp -r ${daps-src}/daps-xslt $out/share/xml/

      substituteInPlace $out/share/xml/catalog.xml \
        --replace "../daps-xslt/" "$out/share/xml/daps-xslt/"
    '';

  svg = fetchurl {
    url = "https://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";
    sha256 = "0kvf5bfr55flg4p5yrn5vrbph77ikl6bdrblmpysbj2d5zkrhmbl";
  };

  catalog = runCommand "catalog.xml"
    {
      buildInputs = [ libxml2 ];
      catalogs = [
        docbook5 docbook5_xsl
        docbook_xml_dtd_45 docbook_xml_dtd_44 docbook_xml_dtd_43
        docbook_xml_dtd_42 docbook_xml_dtd_412 docbook_xsl_ns

        daps-catalog
      ];
    }
    ''
      xmlcat() {
        xmlcatalog --noout "$@" "$out"
      }

     (
       echo '<?xml version="1.0"?>';
       echo '<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">';
       echo '<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">';

      for p in $catalogs; do
        for d in $p/share/xml $p/xml/dtd $p/xml/xsl; do
          if [ -d "$d" ]; then
            for i in $(find $d -name catalog.xml); do
              echo '<nextCatalog catalog="'$i'" />';
            done
          fi
        done
      done

      echo '</catalog>'

      ) > $out

      xmlcat --add rewriteURI \
        "http://docbook.sourceforge.net/release/xsl/current/" \
        "file://${docbook5_xsl}/share/xml/docbook-xsl-ns/"

      xmlcat --add rewriteSystem \
        "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" \
        "file://${svg}"

      xmlcatalog -v $out "urn:x-daps:xslt:profiling:docbook45-profile.xsl"

      #sleep 5
    '';
in
stdenv.mkDerivation {
  name = "daps-20171116";

  src = daps-src;

  buildInputs = [
    autoreconfHook
    libxml2 libxslt w3m remake fop jing trang imagemagick python3 dia
    exiftool ghostscript inkscape optipng xfig poppler_utils getopt
    which xmlstarlet
  ];

  configureFlags = [
    "--enable-edit-rootcatalog=no"
  ];

  postPatch = ''
    patchShebangs .
    for f in $(find . -type f); do
      substituteInPlace "$f" \
        --replace "/usr/bin/xsltproc" "${libxslt.bin}/bin/xsltproc" \
        --replace /etc/xml/catalog ${catalog} \
        --replace /usr/bin/make $(which make) \
        --replace /usr/bin/xmlstarlet ${xmlstarlet}/bin/xmlstarlet \
        --replace /usr/bin/xmlcatalog ${libxml2}/bin/xmlcatalog
    done

    for f in "./lib/daps_functions" "./make/common_variables.mk" "./bin/daps-auto.pl"; do
      substituteInPlace "$f" \
        --replace "/bin/bash" "${bash}/bin/bash"
    done

    echo "post sub"

    grep -r "catalog" . || true

    echo "xml/catalog"
  '';
}
fsundermeyer commented 6 years ago

Sorry for not coming back to you earlier...I was pretty busy.

I have a few questions questions:

  1. Can I safely assume that NixOS recognises not only /bin/sh but other shebang lines like

    #!/bin/bash
    #!/usr/bin/python3
    ##!/usr/bin/perl
    ....

??

  1. Is there a common default $bindir in NixOS (like /usr/bin on other distributions) and is it recognized by configure if not explicitly set on the command line?

  2. Being not familiar with NixOS at all: can I assume that the paths ./configure gives me, are stable? If so, it will be easy to set paths via make using the results configure gives me.

  3. Because it makes testing DAPS very easy our approach is to develop DAPS in a way that the github checkout works like a full DAPS installation (the only thing you have to do is to set $DAPSROOT). This is, of course, a bit more complicated if I cannot used fixed paths anymore (and I am reluctant to rely on $PATH). Any tips for me, how I can achieve this on NixOS?

jtojnar commented 6 years ago
  1. No, sh is the only thing in /bin. You can also expect env to be installed in /usr/bin, allowing you to use the programs on PATH in shebangs, but nothing else will be there.
  2. No. Well, there is one but it is only available to NixOS; the build environment is usually sandboxed and can only run programs explicitly listed as a dependency (will be added to PATH).
  3. Yes. As long as some installed package references them, they will be kept in the store.
  4. Relying on PATH is the right approach on NixOS. What are the reasons you would not want to do that? Alternately, you could use something like the following Meson code (I am not very familiar with autotools but there is probably something similar) find_program('/usr/bin/xmlcatalog', 'xmlcatalog'), preferring the absolute path but falling back to PATH lookup. Edit: looks like you actually rely on PATH, at least for xmlstarlet lookup in daps-init
grahamc commented 6 years ago

./configure will provide stable paths, and it would be preferable in this case to use those paths directly instead of depending upon them being in the PATH.