unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: DNS <dns@rbose.org>
Cc: 12887@debbugs.gnu.org
Subject: bug#12887: Broken pipe while generating guile-procedures.texi
Date: Fri, 07 Dec 2012 22:59:55 +0100	[thread overview]
Message-ID: <877goto750.fsf@gnu.org> (raw)
In-Reply-To: <50C2279A.7050600@rbose.org> (dns@rbose.org's message of "Fri, 07 Dec 2012 18:30:02 +0100")

Hi,

Thanks for your feedback!

DNS <dns@rbose.org> skribis:

> sorry for my late reply, and thx a lot for your help.
> i was compiling 2.0.7 and had the same issue, then i was finally lookin
> at the log and figured out that it is because of a "umlaut" char in the
> parent directory-name where i tried to build guile.
> The directory was called "Arbeitsfläche" ("desktop" in german) and in
> the log i saw the files could not be found because the dir-name was not
> correctly converted (into UTF-8 i guess). The dir name was shown as
> "Arbeitsf??che"...

Ooh, I see.  This is related to commit ed4c3739 (see
<http://lists.gnu.org/archive/html/guile-devel/2011-12/msg00160.html>).

What happens is that the directory name may be correctly decoded when
passed as an argument:

--8<---------------cut here---------------start------------->8---
[ludo@pluto:~/tmp/Courtès]$ strace -f -o ,,s ~/src/guile/meta/guile -L $PWD -c '(set-port-encoding! (current-output-port) "UTF-8")(pk %load-path)'

;;; (("/home/ludo/tmp/Courtès" ...))
--8<---------------cut here---------------end--------------->8---

But then ‘scm_stat’ calls ‘scm_to_locale_string’, which uses the wrong
encoding at this point, leading to this:

--8<---------------cut here---------------start------------->8---
[ludo@pluto:~/tmp/Courtès]$ strace -f -o ,,s ~/src/guile/meta/guile -L $PWD -c '(use-modules (t))'

[...]

ERROR: In procedure scm-error:
ERROR: no code for module (t)

[ludo@pluto:~/tmp/Courtès]$ grep Court ,,s | head -10
24237 execve("/home/ludo/src/guile/meta/guile", ["/home/ludo/src/guile/meta/guile", "-L", "/home/ludo/tmp/Court\303\250s", "-c", "(use-modules (t))"], [/* 74 vars */]) = 0
24237 stat("/home/ludo/tmp/Court\303\250s", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
24237 execve("/home/ludo/src/guile/meta/uninstalled-env", ["/home/ludo/src/guile/meta/uninst"..., "/home/ludo/src/guile/libguile/gu"..., "-L", "/home/ludo/tmp/Court\303\250s", "-c", "(use-modules (t))"], [/* 73 vars */]) = 0
24237 stat("/home/ludo/tmp/Court\303\250s", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
24237 execve("/home/ludo/src/guile/libguile/guile", ["/home/ludo/src/guile/libguile/gu"..., "-L", "/home/ludo/tmp/Court\303\250s", "-c", "(use-modules (t))"], [/* 78 vars */]) = 0
24237 stat("/home/ludo/tmp/Court\303\250s", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
24256 read(3, "ludo\0x\0Ludovic Courtes\0/home/lud"..., 70) = 70
24237 execve("/home/ludo/src/guile/libguile/.libs/guile", ["/home/ludo/src/guile/libguile/.l"..., "-L", "/home/ludo/tmp/Court\303\250s", "-c", "(use-modules (t))"], [/* 80 vars */]) = 0
24237 stat("/home/ludo/tmp/Court?s/t.scm", 0x7fff16fda150) = -1 ENOENT (No such file or directory)
24237 stat("/home/ludo/tmp/Court?s/t", 0x7fff16fda150) = -1 ENOENT (No such file or directory)
--8<---------------cut here---------------end--------------->8---

The problem is even worse when the directory is passed through an
environment variable, because in that case even the input decoding is
broken:

--8<---------------cut here---------------start------------->8---
[ludo@pluto:~/tmp/Courtès]$ GUILE_LOAD_PATH=$PWD:... ~/src/guile/meta/guile -c '(set-port-encoding! (current-output-port) "UTF-8")(pk %load-path)'

;;; (("/home/ludo/src/guile/guile-readline" "/home/ludo/src/guile/module" "/home/ludo/tmp/Court??s"))
--8<---------------cut here---------------end--------------->8---

Ouch!

So, as mentioned in the thread above, 2.2 will not have this problem.
But for 2.0, I can’t even imagine an ugly hack that would help.

Thoughts?

Ludo’.





  reply	other threads:[~2012-12-07 21:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-14 19:44 bug#12887: Broken pipe while generating guile-procedures.texi DNS
2012-11-14 23:10 ` Ludovic Courtès
2012-12-07 17:30   ` DNS
2012-12-07 21:59     ` Ludovic Courtès [this message]
2013-03-05 17:40       ` Andy Wingo
2013-03-05 20:49         ` Ludovic Courtès
2013-03-07 10:04           ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877goto750.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=12887@debbugs.gnu.org \
    --cc=dns@rbose.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).