Hi everybody!

Below an analysis of lilypond-test problems. strace still is our friend ;-).


Lets start investigation ...
============================

        knut@golem:~/sources/gub> rm -f STRACE/* ; strace -v -f -ff -s 1024 -o 
STRACE/TP  bin/gub linux-64::lilypond-test
        calculating dependencies
        Checking for mf ... /usr/bin/mf
        Checking for xetex ... /usr/bin/xetex
        Checking for gcc ... /usr/bin/gcc
        Checking for mpost ... /usr/bin/mpost
        Checking for xelatex ... /usr/bin/xelatex
        Checking for g++ ... /usr/bin/g++
        must rebuild[linux-64]: system::gcc system::g++ system::mf 
system::mpost system::xetex system::xelatex lilypond-test
         *** Stage: pkg_install (cross/gcc-core, linux-64)
          cross/gcc conflicts with cross/gcc-core
            non-core cross/gcc already installed
              skipping request to install cross/gcc-core
          cross/gcc-doc conflicts with cross/gcc-core
            non-core cross/gcc already installed
              skipping request to install cross/gcc-core
          cross/gcc-runtime conflicts with cross/gcc-core
            non-core cross/gcc already installed
              skipping request to install cross/gcc-core

         *** Stage: pkg_install (glibc-core, linux-64)
          glibc conflicts with glibc-core
            non-core glibc already installed
              skipping request to install glibc-core
          glibc-doc conflicts with glibc-core
            non-core glibc already installed
              skipping request to install glibc-core

        building package: linux-64::lilypond-test
         *** Stage: download (lilypond-test, linux-64)
         *** Stage: compile (lilypond-test, linux-64)
        Command barfed: cd /home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master && ulimit -m 1048576 && ulimit -d 1048576 && ulimit -v 3145728 && LILYPOND_EXTERNAL_BINARY=/home/knut/sources/gub/target/linux-64/root/usr/bin/lilypond PATH=/home/knut/sources/gub/target/tools/root/usr/bin:/home/knut/sources/gub/target/linux-64/root/usr/bin:$PATH MALLOC_CHECK_=2 LD_LIBRARY_PATH=/home/knut/sources/gub/target/tools/root/usr/lib:/home/knut/sources/gub/target/linux-64/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} GS_FONTPATH=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/fonts:/home/knut/sources/gub/target/linux-64/root/usr/share/gs/fonts GS_LIB=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource/Init:/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource FONTCONFIG_FILE=/home/knut/sources/gub/target/linux-64/root/usr/etc/fonts-gub/fonts.conf FONTCONFIG_PATH=/home/knut/sources/gub/target/tools/root/usr/etc/fonts-gub make -j16  CPU_COUNT=8 MISSING_OPTIONAL=dblatex   test

        Tail of target/linux-64/log/lilypond-test.log >>>>>>>>
            -lilypond.git-master && ulimit -m 1048576 && ulimit -d 1048576 && ulimit -v 3145728 && LILYPOND_EXTERNAL_BINARY=/home/knut/sources/gub/target/linux-64/root/usr/bin/lilypond PATH=/home/knut/sources/gub/target/tools/root/usr/bin:/home/knut/sources/gub/target/linux-64/root/usr/bin:$PATH MALLOC_CHECK_=2 LD_LIBRARY_PATH=/home/knut/sources/gub/target/tools/root/usr/lib:/home/knut/sources/gub/target/linux-64/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} GS_FONTPATH=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/fonts:/home/knut/sources/gub/target/linux-64/root/usr/share/gs/fonts GS_LIB=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource/Init:/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource FONTCONFIG_FILE=/home/knut/sources/gub/target/linux-64/root/usr/etc/fonts-gub/fonts.conf FONTCONFIG_PATH=/home/knut/sources/gub/target/tools/root/usr/etc/fonts-gub make -j16  CPU_COUNT=8 MISSING_OPTIONAL=dblatex   test
        <<<<<<<< Tail of target/linux-64/log/lilypond-test.log

        *** Failed target: linux-64::lilypond-test

Let's have a look at target/linux-64/log/lilypond-test.log. That ends with
====================================================================================

        command failed: /home/knut/sources/gub/target/linux-64/root/usr/bin/lilypond -dbackend=eps --formats=ps,png,pdf -djob-count=8 -dinclude-eps-fonts -dgs-load-fonts --header=doctitle --header=doctitleca --header=doctitlecs --header=doctitlede --header=doctitlees --header=doctitlefr --header=doctitlehu --header=doctitleit --header=doctitleja --header=doctitlenl --header=doctitlezh --header=texidoc --header=texidocca --header=texidoccs --header=texidocde --header=texidoces --header=texidocfr --header=texidochu --header=texidocit --header=texidocja --header=texidocnl --header=texidoczh -dcheck-internal-types -ddump-signatures -danti-alias-factor=2 -dfont-export-dir=/home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master/out-fonts -O TeX-GS -I  "./"  -I "/home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master/input/regression/lilypond-book" -I "/home/knut/sources/gub/target/linux-64/src/lilypond-git.sv.gnu.org--lilypond.git-master/input/regression/lilypond-book" -deps-box-padding=3.000000  -dread-file-list -dno-strip-output-dir "/home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master/out/lybook-testdb/snippet-names--3368173372264547087.ly"
        Child returned 1
        Error ignored by lilylib
        Error trapped by lilypond-book

        Please see 
/home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master/out/lybook-testdb/snippet-names--3368173372264547087.log

        make[2]: *** [out-test/html-include-space-after-tag.html] Error 1
        make[2]: Leaving directory 
`/home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master/input/regression/lilypond-book'
        make[1]: *** [local-test] Error 2
        make[1]: Leaving directory 
`/home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master/input/regression/lilypond-book'
        make: *** [test] Error 2
        Command barfed: cd /home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master && ulimit -m 1048576 && ulimit -d 1048576 && ulimit -v 3145728 && LILYPOND_EXTERNAL_BINARY=/home/knut/sources/gub/target/linux-64/root/usr/bin/lilypond PATH=/home/knut/sources/gub/target/tools/root/usr/bin:/home/knut/sources/gub/target/linux-64/root/usr/bin:$PATH MALLOC_CHECK_=2 LD_LIBRARY_PATH=/home/knut/sources/gub/target/tools/root/usr/lib:/home/knut/sources/gub/target/linux-64/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} GS_FONTPATH=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/fonts:/home/knut/sources/gub/target/linux-64/root/usr/share/gs/fonts GS_LIB=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource/Init:/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource FONTCONFIG_FILE=/home/knut/sources/gub/target/linux-64/root/usr/etc/fonts-gub/fonts.conf FONTCONFIG_PATH=/home/knut/sources/gub/target/tools/root/usr/etc/fonts-gub make -j16  CPU_COUNT=8 MISSING_OPTIONAL=dblatex   test
        Traceback (most recent call last):
          File "bin/gub", line 233, in exceptional_build
            build (settings, options, files)
          File "bin/gub", line 229, in build
            b.build_source_packages (names)
          File "bin/../gub/buildrunner.py", line 334, in build_source_packages
            self.spec_build (spec_name)
          File "bin/../gub/buildrunner.py", line 262, in spec_build
            deferred_runner.execute_deferred_commands ()
          File "bin/../gub/runner.py", line 167, in execute_deferred_commands
            cmd.execute (self.logger)
          File "bin/../gub/commands.py", line 75, in execute
            ignore_errors=self.ignore_errors)
          File "bin/../gub/loggedos.py", line 93, in system
            raise misc.SystemFailed (m)
        SystemFailed: Command barfed: cd /home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master && ulimit -m 1048576 && ulimit -d 1048576 && ulimit -v 3145728 && LILYPOND_EXTERNAL_BINARY=/home/knut/sources/gub/target/linux-64/root/usr/bin/lilypond PATH=/home/knut/sources/gub/target/tools/root/usr/bin:/home/knut/sources/gub/target/linux-64/root/usr/bin:$PATH MALLOC_CHECK_=2 LD_LIBRARY_PATH=/home/knut/sources/gub/target/tools/root/usr/lib:/home/knut/sources/gub/target/linux-64/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} GS_FONTPATH=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/fonts:/home/knut/sources/gub/target/linux-64/root/usr/share/gs/fonts GS_LIB=/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource/Init:/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource FONTCONFIG_FILE=/home/knut/sources/gub/target/linux-64/root/usr/etc/fonts-gub/fonts.conf FONTCONFIG_PATH=/home/knut/sources/gub/target/tools/root/usr/etc/fonts-gub make -j16  CPU_COUNT=8 MISSING_OPTIONAL=dblatex   test

Have a look at 
/home/knut/sources/gub/target/linux-64/build/lilypond-git.sv.gnu.org--lilypond.git-master/out/lybook-testdb/snippet-names--3368173372264547087.log
==================================================================================================================================================================

        GNU LilyPond 2.21.0
        Processing `./snippet-map--3368173372264547087.ly'
        Parsing...
        Processing `./65/lily-bab68f98.ly'
        Parsing...
        Renaming input to: `include.ly'
        Interpreting music...
        Preprocessing graphical objects...
        Calculating line breaks...
        Drawing systems...
        Writing ./65/lily-bab68f98-1.signature
        Layout output to `./65/lily-bab68f98.eps'...
        Converting to `./65/lily-bab68f98.pdf'...
        warning: `(gs -q -dNOSAFER -dEPSCrop -dCompatibilityLevel=1.4 -dNOPAUSE 
-dBATCH -r1200 -sDEVICE=pdfwrite -dAutoRotatePages=/None -dPrinted=false 
-sOutputFile=./65/lily-bab68f98.pdf -c.setpdfwrite -f./65/lily-bab68f98.eps)' 
failed (256)

        fatal error: failed files: "65/lily-bab68f98.ly"

So lilypond fails because gs failed to convert 65/lily-bab68f98.ly. Search the 
relevant strace log using a reasonable pattern from the file above:
==================================================================================================================================================

        knut@golem:~/sources/gub> grep "Writing ./65/lily-bab68f98-1.signature" 
STRACE/*
        STRACE/TP.26267:write(2, "Writing ./65/lily-bab68f98-1.signature", 38) 
= 38

Ok, its STRACE/TP.26267 ... have a look at the lilypond strace log
==================================================================

As we execute gs we look for a clone() system call that is a required part of 
execution of a child process ...

        knut@golem:~/sources/gub> grep -A 10000 'clone(' STRACE/TP.26267
        clone(child_stack=NULL, 
flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0x148c3ed5de50) = 26268
        close(8)                                = 0
        close(10)                               = 0
        close(12)                               = 0
        read(7, "", 8)                          = 0
        close(7)                                = 0
        select(12, [9 11], NULL, NULL, NULL)    = 1 (in [11])
        read(11, "gs: /home/knut/sources/gub/target/tools/root/usr/lib/libz.so: no version information available (required by /usr/lib64/libcups.so.2)\ngs: /home/knut/sources/gub/target/tools/root/usr/lib/libz.so: no version information available (required by /usr/lib64/libpng16.so.16)\ngs: /home/knut/sources/gub/target/tools/root/usr/lib/libz.so: no version information available (required by /usr/lib64/libpng16.so.16)\n", 4096) = 403
        select(12, [9 11], NULL, NULL, NULL)    = 1 (in [11])
        read(11, "gs: /home/knut/sources/gub/target/tools/root/usr/lib/liblzma.so.5: 
no version information available (required by /usr/lib64/libsystemd.so.0)\n", 4096) 
= 141
        select(12, [9 11], NULL, NULL, NULL)    = 1 (in [9])
        read(9, "gs: Interpreter revision (926) does not match gs_init.ps revision 
(921).\n", 4096) = 73
        select(12, [9 11], NULL, NULL, NULL)    = 2 (in [9 11])
        --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26268, 
si_uid=1000, si_status=1, si_utime=0, si_stime=0} ---
        read(9, "", 4096)                       = 0
        close(9)                                = 0
        read(11, "", 4096)                      = 0
        close(11)                               = 0
        wait4(26268, [{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 26268
        write(2, "warning: `(gs -q -dNOSAFER -dEPSCrop -dCompatibilityLevel=1.4 
-dNOPAUSE -dBATCH -r1200 -sDEVICE=pdfwrite -dAutoRotatePages=/None -dPrinted=false 
-sOutputFile=./65/lily-bab68f98.pdf -c.setpdfwrite -f./65/lily-bab68f98.eps)' failed 
(256)\n\n", 237) = 237
        times({tms_utime=31, tms_stime=5, tms_cutime=1, tms_cstime=0}) = 
1752530758
        munmap(0x148c3ecc8000, 159744)          = 0
        times({tms_utime=33, tms_stime=6, tms_cutime=1, tms_cstime=0}) = 
1752530762
        times({tms_utime=33, tms_stime=6, tms_cutime=1, tms_cstime=0}) = 
1752530762
        write(2, "fatal error: failed files: \"65/lily-bab68f98.ly\"\n", 49) = 
49
        close(5)                                = 0
        close(6)                                = 0
        exit_group(1)                           = ?
        +++ exited with 1 +++

Here we see the PID of the child (26268) and we see an interesting error message: 
"gs: Interpreter revision (926) does not match gs_init.ps revision (921).\n"
==============================================================================================================================================================

The gs interpreter should not be 9.26. What files are opened during the gs run?

        knut@golem:~/sources/gub> grep '^open' STRACE/TP.26268
        openat(AT_FDCWD, "/proc/self/fd", 
O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 7
        open("/dev/null", O_RDONLY)             = 7
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/librestrict.so", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/tls/haswell/x86_64/libgs.so.9",
 O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/tls/haswell/libgs.so.9", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/tls/x86_64/libgs.so.9", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/tls/libgs.so.9", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/haswell/x86_64/libgs.so.9", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/haswell/libgs.so.9", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/x86_64/libgs.so.9", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgs.so.9", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, "/usr/lib64/libgs.so.9", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libc.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libtiff.so.5", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libcupsimage.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libcupsimage.so.2", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libcups.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libcups.so.2", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libpng16.so.16", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libpng16.so.16", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libjpeg.so.8", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libjpeg.so.8", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libm.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libm.so.6", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libdl.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libdl.so.2", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libfontconfig.so.1", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libfreetype.so.6", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libpthread.so.0", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libpthread.so.0", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/liblzma.so.5", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libjpeg.so.62", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libz.so", O_RDONLY|O_CLOEXEC) 
= 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgssapi_krb5.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libgssapi_krb5.so.2", O_RDONLY|O_CLOEXEC) 
= 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgnutls.so.30", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libgnutls.so.30", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libavahi-common.so.3", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libavahi-common.so.3", O_RDONLY|O_CLOEXEC) 
= 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libavahi-client.so.3", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libavahi-client.so.3", O_RDONLY|O_CLOEXEC) 
= 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libz.so.1", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libpng12.so.0", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libexpat.so.1", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libkrb5.so.3", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libkrb5.so.3", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libk5crypto.so.3", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libk5crypto.so.3", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libcom_err.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libcom_err.so.2", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libkrb5support.so.0", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libkrb5support.so.0", O_RDONLY|O_CLOEXEC) 
= 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libp11-kit.so.0", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libp11-kit.so.0", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libidn2.so.4", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libidn2.so.4", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libunistring.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libunistring.so.2", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libtasn1.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libtasn1.so.6", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libnettle.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libnettle.so.6", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libhogweed.so.4", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libhogweed.so.4", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgmp.so.10", 
O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libdbus-1.so.3", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libdbus-1.so.3", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgcc_s.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/tls/haswell/x86_64/libgcc_s.so.1",
 O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/tls/haswell/libgcc_s.so.1",
 O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/tls/x86_64/libgcc_s.so.1",
 O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/tls/libgcc_s.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/haswell/x86_64/libgcc_s.so.1",
 O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/haswell/libgcc_s.so.1",
 O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/x86_64/libgcc_s.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/../lib/libgcc_s.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgcc_s.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libgcc_s.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libkeyutils.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libkeyutils.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libresolv.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libresolv.so.2", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libselinux.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/libselinux.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libffi.so.7", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libffi.so.7", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libsystemd.so.0", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libsystemd.so.0", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libpcre.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libpcre.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/librt.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/lib64/librt.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/liblz4.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/liblz4.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libcap.so.2", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libcap.so.2", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libmount.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libmount.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgcrypt.so.20", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libgcrypt.so.20", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libblkid.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libblkid.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libgpg-error.so.0", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libgpg-error.so.0", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libuuid.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libuuid.so.1", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, "/proc/sys/crypto/fips_enabled", O_RDONLY) = -1 ENOENT 
(Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/etc/gcrypt/hwf.deny", O_RDONLY) = -1 ENOENT (Datei 
oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/proc/filesystems", O_RDONLY|O_CLOEXEC) = 3
        openat(AT_FDCWD, "/proc/sys/crypto/fips_enabled", O_RDONLY) = -1 ENOENT 
(Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/ghostscript/9.26", 
O_RDONLY|O_NONBLOCK|O_CLOEXEC|O_DIRECTORY) = 3
        openat(AT_FDCWD, "/usr/lib64/ghostscript/9.26/.", O_RDONLY|O_CLOEXEC) = 
4
        openat(AT_FDCWD, "/usr/lib64/ghostscript/9.26/..", O_RDONLY|O_CLOEXEC) 
= 4
        openat(AT_FDCWD, "/usr/lib64/ghostscript/9.26/X11.so", 
O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libXt.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, "/usr/lib64/libXt.so.6", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libSM.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libSM.so.6", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libICE.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libICE.so.6", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libXext.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libXext.so.6", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libX11.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libX11.so.6", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libxcb.so.1", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libxcb.so.1", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/tools/root/usr/lib/libXau.so.6", 
O_RDONLY|O_CLOEXEC) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
        openat(AT_FDCWD, "/usr/lib64/libXau.so.6", O_RDONLY|O_CLOEXEC) = 4
        openat(AT_FDCWD, 
"/home/knut/sources/gub/target/linux-64/root/usr/share/ghostscript/9.21/Resource/Init/gs_init.ps",
 O_RDONLY) = 3

Look at the top: here we see in which directories libgs.so.9 is searched. At 
last /usr/lib64/libgs.so.9 is used. That's wrong, gs should use it's own libgs. 
But the correct library directory is not searched.

Which gs is executed? Is there a suitable libgs.so.9?
=====================================================

        knut@golem:~/sources/gub> grep '^exec' STRACE/TP.26268
execve("/home/knut/sources/gub/target/linux-64/root/usr/bin/../bin/gs", ["gs", 
"-q" ....

        knut@golem:~/sources/gub> dir 
/home/knut/sources/gub/target/linux-64/root/usr/lib/libgs*
        lrwxrwxrwx 1 knut users       13 23. Jan 09:15 
/home/knut/sources/gub/target/linux-64/root/usr/lib/libgs.so -> libgs.so.9.21
        lrwxrwxrwx 1 knut users       13 23. Jan 09:15 
/home/knut/sources/gub/target/linux-64/root/usr/lib/libgs.so.9 -> libgs.so.9.21
        -rwxr-xr-x 1 knut users 10067128 23. Jan 09:15 
/home/knut/sources/gub/target/linux-64/root/usr/lib/libgs.so.9.21

Summary up to now:
===================

We build linux-64::lilypond-test, but target/linux-64/root/usr/bin/../bin/gs 
fails during it's initialization because it does not look for shared libraries 
in target/linux-64/root/usr/lib and uses system libraries instead.


Look at PATH and LD_* variables passed to lilypond and gs
=========================================================

In both TRACE/TP.26267 an TRACE/TP.26268 we have proper PATH and GS_LIBRARY_DIR 
entries in the environment ...


PATH=/home/knut/sources/gub/target/tools/root/usr/bin:/home/knut/sources/gub/target/linux-64/root/usr/bin:$PATH
LD_LIBRARY_PATH=/home/knut/sources/gub/target/tools/root/usr/lib:/home/knut/sources/gub/target/linux-64/root/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}

Interesting.
============

According to that PATH we should have executed target/tools/root/usr/bin/gs and not target/linux-64/root/usr/bin/../bin/gs. Well, it seems lilypond does not look for a gs in PATH but executes ../bin/gs relative to the directory where its own executable is located. I'll have to verify that in the sources lates. And obviously LD_LIBRARY_PATH is not obeyed.
What a mess.

A quick diagnostic fix could be:
================================

       knut@golem:~/sources/gub> mv target/linux-64/root/usr/bin/gs 
target/linux-64/root/usr/bin/_gs
       knut@golem:~/sources/gub> echo '#!/bin/sh' > 
target/linux-64/root/usr/bin/gs
       knut@golem:~/sources/gub> echo 
'LD_LIBRARY_PATH=$(workdir_prefix)/target/linux-64/root/usr/lib 
$(workdir_prefix)/target/linux-64/root/usr/bin/_gs "$@"'>> 
target/linux-64/root/usr/bin/gs

Let's see what happens with the fix in place:
=============================================

       knut@golem:~/sources/gub> bin/gub linux-64::lilypond-test
       calculating dependencies
       Checking for mf ... /usr/bin/mf
       Checking for xetex ... /usr/bin/xetex
       Checking for gcc ... /usr/bin/gcc
       Checking for mpost ... /usr/bin/mpost
       Checking for xelatex ... /usr/bin/xelatex
       Checking for g++ ... /usr/bin/g++
       must rebuild[linux-64]: system::gcc system::g++ system::mf system::mpost 
system::xetex system::xelatex lilypond-test
        *** Stage: pkg_install (cross/gcc-core, linux-64)
         cross/gcc conflicts with cross/gcc-core
           non-core cross/gcc already installed
             skipping request to install cross/gcc-core
         cross/gcc-doc conflicts with cross/gcc-core
           non-core cross/gcc already installed
             skipping request to install cross/gcc-core
         cross/gcc-runtime conflicts with cross/gcc-core
           non-core cross/gcc already installed
             skipping request to install cross/gcc-core

        *** Stage: pkg_install (glibc-core, linux-64)
         glibc conflicts with glibc-core
           non-core glibc already installed
             skipping request to install glibc-core
         glibc-doc conflicts with glibc-core
           non-core glibc already installed
             skipping request to install glibc-core

       building package: linux-64::lilypond-test
        *** Stage: download (lilypond-test, linux-64)
        *** Stage: compile (lilypond-test, linux-64)
        *** Stage: install (lilypond-test, linux-64)
        *** Stage: package (lilypond-test, linux-64)

       done

======================
Ok. Found the problem.
======================

Try building branch master (with diagnostic fix enabled):
=============================================

        rm -rf target/*/packages/lilypond*; make LILYPOND_BRANCH=master lilypond

That succeeds!


Now try building stable/2.20 (with diagnostic fix enabled):
==============================================
        rm -rf target/*/packages/lilypond*; make LILYPOND_BRANCH=stable/2.20 
lilypond

That failed:

        invoking rm -rf 
/home/knut/sources/gub/uploads/webtest/v2.21.0-1/compare-v2.19.81-1
        mkdir 
/home/knut/sources/gub/uploads/webtest/v2.21.0-1/compare-v2.19.81-1
        mkdir 
/home/knut/sources/gub/uploads/webtest/v2.21.0-1/compare-v2.19.81-1/v2.21.0-1
        mkdir 
/home/knut/sources/gub/uploads/webtest/v2.21.0-1/compare-v2.19.81-1/v2.19.81-1
        v2.19.81-1/rest-positioning.ly -> 
/home/knut/sources/gub/uploads/webtest/v2.21.0-1/compare-v2.19.81-1/v2.19.81-1/rest-positioning.ly
        v2.21.0-1/rest-positioning.ly -> 
/home/knut/sources/gub/uploads/webtest/v2.21.0-1/compare-v2.19.81-1/v2.21.0-1/rest-positioning.ly
        invoking gs -sDEVICE=png16m -dGraphicsAlphaBits=4 -dTextAlphaBits=4 -slilypond-datadir=v2.19.81-1/share/lilypond/current   -r101 -dAutoRotatePages=/None -sOutputFile=/home/knut/sources/gub/uploads/webtest/v2.21.0-1/compare-v2.19.81-1/v2.19.81-1/rest-positioning.png -dNOSAFER -dEPSCrop -q -dNOPAUSE  v2.19.81-1/rest-positioning.eps -c quit
        Error: /undefinedfilename in --file--
        Operand stack:
(share/lilypond/current/fonts/otf/emmentaler-20.otf)   (r)
        Execution stack:
           %interp_exit   .runexec2   --nostringval-- --nostringval--   --nostringval--   2   %stopped_push --nostringval--   --nostringval--   --nostringval--   false   1 %stopped_push   1999   1   3   %oparray_pop   1998   1   3 %oparray_pop   --nostringval--   1982   1   3   %oparray_pop 1868   1   3   %oparray_pop   --nostringval--   %errorexec_pop .runexec2   --nostringval--   --nostringval--   --nostringval-- 2   %stopped_push   --nostringval--
        Dictionary stack:
           --dict:1214/1684(ro)(G)--   --dict:0/20(G)-- --dict:82/200(L)--
        Current allocation mode is local
        Last OS error: No such file or directory


Now try building stable/2.20 (with diagnostic fix enabled):
==============================================

        rm -rf target/*/packages/lilypond*; make LILYPOND_BRANCH=staging 
lilypond

That succeeds.


===========
SUMMARY
===========

We have two problems.

-> I suspect that stable/2.20 fails because patch 
2c7277e0014b8d1d22ef5a1caa69a2f86bcfb964 is missing ...

-> We either need to change lilypond's code in a way that PATH is respected and 
LD_LIBRARY_PATH is passed to the gs
   or we need to implement some other kind of hack to make sure that gs uses 
the correct libraries during lilypond-test.
   LD_PRELOAD might be an option, changing (build_system)::ghostscript to 
permanently implement the diagnostic hack
  is not an option as we don't want to promote it to the distributed code.

No time left for today, TBC.

Knut

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to