https://codereview.appspot.com/320360043/ (new Reitveld owned by Hosoda-san)
http://codereview.appspot.com/319400043 (original Rietveld - no longer used)
Report: http://lists.gnu.org/archive/html/bug-lilypond/2017-01/msg00023.html
LilyPond failed to build on GNU Hurd because Hurd does not have PATH_MAX.
Fortunately, a workaround is available thanks to the combined effort of
Debian developers Don Armstrong (Debian package maintainer for LilyPond)
and Petter Reinholdtsen (Debian Hurd guru).
Petter expressed his wish to send this patch upstream to be included in
future releases of LilyPond, hence this bug report with the attached patch!
:-)
A little bit of history:
2013-05-13, Don Armstrong <don AT="" debian.org="">:
Changelog for LilyPond Debian package version 2.16.2-2:
2014-09-10, Petter Reinholdtsen <pere AT="" hungry.com="">, <pere AT="" debian.org="">:
https://bugs.debian.org/761036
Hi. The lilypond package do not build on hurd, even with a hurd patch
in place. The cause seem to be a typo in the file
debian/patches/hurd_file_name_support, checking for GNU_SOURCE
instead of _GNU_SOURCE (at least that is what the getcwd() manual page
claim to look for).
Attached is an updated patch, fixing that bug, a memory leak
forgetting to release the memory allocated by get_current_dir_name(),
and adding the same code in the test code.
Please replace the patch in the current source with this new one, and
consider sending it upstream. :)
2016-07-18, Dr. Tobias Quathamer <toddy AT="" debian.org="">:
Reviewed and committed the patch to the debian-experimental branch
(intended for an experiment with LilyPond 2.19.x and Guile-2.x)
in the LilyPond deb packaging git repository:
2017-01-27, me:
Discovered the above, and cherry-picked Dr. Tobias's commit onto the
"debian" (stable) branch with 2.18.2.
Many thanks!
Anthony
foka AT debian.org
Diff:
Fix build failure on GNU Hurd
Issue 5077
LilyPond failed to build on
GNU Hurd because Hurd does
not have PATH_MAX.
The cause seem to be a typo
in the file
debian/patches/hurd_file_name_support,
checking for GNU_SOURCE
instead of _GNU_SOURCE
(at least that is what
the getcwd() manual page
claim to look for).
http://codereview.appspot.com/319400043
Diff:
This passes make and a full make doc, but I cannot run the usual pattern of
make,
make test-baseline
apply patch
make clean
make
make check
make doc
It fails on the second 'make' (after make clean) ..
--snip---
tml
mkdir -p ./out
touch ./out/dummy.dep
echo '*' > ./out/.gitignore
For tracking crashes: use
make --no-builtin-rules -C input/regression out=test local-test
make[1]: Entering directory '/home/jlowe/lilypond-git/build/input/regression'
mkdir -p ./out-test
touch ./out-test/dummy.dep
echo '' > ./out-test/.gitignore
rm -f ./out-test/collated-files.html
if test -d /home/jlowe/lilypond-git/.git ; then \ echo -e 'HEAD is:\n\n\t' ; \ (cd /home/jlowe/lilypond-git && git log --max-count=1 --pretty=oneline ) ;\ echo -e '\n\n\n' ; \ (cd /home/jlowe/lilypond-git && git diff ) ; \ fi > ./out-test/tree.gittxt
make LILYPOND_BOOK_LILYPOND_FLAGS="-dbackend=eps --formats=ps -djob-count=4 -dseparate-log-files -dinclude-eps-fonts -dgs-load-lily-fonts --header=texidoc -I /home/jlowe/lilypond-git/Documentation/included/ -ddump-profile -dcheck-internal-types -ddump-signatures -danti-alias-factor=1" LILYPOND_BOOK_WARN= ./out-test/collated-files.html LYS_OUTPUT_DIR=/home/jlowe/lilypond-git/build/out/lybook-testdb
make[2]: Entering directory '/home/jlowe/lilypond-git/build/input/regression'
/usr/bin/python -tt /home/jlowe/lilypond-git/scripts/build/create-version-itexi.py > out-test/version.itexi
/usr/bin/python -tt /home/jlowe/lilypond-git/scripts/build/create-weblinks-itexi.py > out-test/weblinks.itexi
/home/jlowe/lilypond-git/build/scripts/build/out/lys-to-tely --name=./out-test/collated-files.tely --title="LilyPond Regression Tests" --author="Han-Wen Nienhuys and Jan Nieuwenhuizen" --input-filename=out-test/collated-files.list
/bin/sh: 1: /home/jlowe/lilypond-git/build/scripts/build/out/lys-to-tely: not found
/home/jlowe/lilypond-git/./make/lysdoc-rules.make:19: recipe for target 'out-test/collated-files.tely' failed
make[2]: [out-test/collated-files.tely] Error 127
make[2]: Waiting for unfinished jobs....
Traceback (most recent call last):
File "/home/jlowe/lilypond-git/scripts/build/create-weblinks-itexi.py", line 15, in <module>
import langdefs
ImportError: No module named langdefs
/home/jlowe/lilypond-git/stepmake/stepmake/texinfo-rules.make:95: recipe for target 'out-test/weblinks.itexi' failed
make[2]: [out-test/weblinks.itexi] Error 1
make[2]: Leaving directory '/home/jlowe/lilypond-git/build/input/regression'
/home/jlowe/lilypond-git/./make/lysdoc-targets.make:12: recipe for target 'local-test' failed
make[1]: [local-test] Error 2
make[1]: Leaving directory '/home/jlowe/lilypond-git/build/input/regression'
/home/jlowe/lilypond-git/GNUmakefile.in:308: recipe for target 'test' failed
make: ** [test] Error 2
Is this something that is bound to happen and cannot be tested normally or is this something that the patch submitter didn't take into account on our side or something else such as a specific configuration environment that isn't universal?
Federico et al, I am going to need some help here with regard to Felix's reply in the Rietveld in terms of how to 'test' this patch and perhaps how to add the information he gave into the patch to make it pass the tests. I just don't have the knowledge to do this.
Thanks.
Thank you for showing your error message.
It looks the same as mine.
I've created a patch for fixing
make check
error only.Would you try it?
This patch has worked in Cygwin (non-glibc) environment.
It also might work in Linux (of course glibc) environment.
(Sorry, I've not tried it.)
However, portability that Felix says is not considered.
If this patch works in your environment, I would like to consider a more portable way.
Hello Hosoda-san, This patch works - passes make, make check and a full make doc.
Do you want to 'own' this issue? Or should I update Reitveld issue I created for tihs tracker with your patch?
I'll try to own this issue and upload my patch.
Thank you.
I cannot upload the patch to Reitveld.
Issue creation errors: {'user': ["You (trueroad) don't own this issue (319400043)"]}
"Masamichi Hosoda" trueroad@users.sf.net writes:
You'll have to create your own Rietveld issue. A known limitation of
that tool.
--
David Kastrup
I've created new Rietveld issue.
Thank you.
Issue 5077: Fix build failure on GNU Hurd
LilyPond failed to build on GNU Hurd
because Hurd does not have PATH_MAX.
This commit is based on the following patch by Debian.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761036
http://codereview.appspot.com/320360043
Fix
make check
http://codereview.appspot.com/320360043
Improbe portability
http://codereview.appspot.com/320360043
I've uploaded patches to Rietveld issue.
http://codereview.appspot.com/320360043
Patch Set 1: From Debian
It is the patch that was uploaded to the previous Rietveld issue.
That is, it is a patch created by debian developers.
Patch Set 2: Fix
make check
It is the patch that I uploaded to this issue yesterday.
Patch Set 3: Improbe portability
It is new patch that improves portability.
Diff:
Here's commit messages for Patch Set 3.
Issue 5077/2: Improve portability of get_working_directory()
We used
getcwd()
withPATH_MAX
to get the current directory.However,
PATH_MAX
does not exist in environments such as GNU Hurd.Debian developers avoided
PATH_MAX
by using
get_current_dir_name()
instead ofgetcwd()
.It needed to protected with
#ifdef _GNU_SOURCE
since
get_current_dir_name()
is glibc specific.So
PATH_MAX
was still required in non-glibc environments.There is a
getcwd()
extention that can avoidPATH_MAX
by setting the first argument to NULL.
The extension can be used in many environments, including glibc,
but POSIX does not recommend it in conforming applications.
This commit improves portability
by obtaining the current directory
with a method conforming to the standard.
Issue 5077/1: Fix build failure on GNU Hurd
LilyPond failed to build on GNU Hurd
because Hurd does not have PATH_MAX.
This commit is based on the following patch by Debian.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=761036
However, the patch raises an error on
make check
.This commit has been fixed so that the error does not raise.
Diff:
Passes make, make check and a full make doc.