[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10742: further information
From: |
Ludovic Courtès |
Subject: |
bug#10742: further information |
Date: |
Thu, 16 Feb 2012 23:12:18 +0100 |
User-agent: |
Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) |
Hi Alírio,
Sorry for the delay!
Alírio Eyng <address@hidden> skribis:
> bash-4.1# meta/guile -c '(setlocale LC_ALL "") (pk (fluid-ref
> %default-port-encoding))'
> Backtrace:
> In ice-9/boot-9.scm:
> 149: 2 [catch #t #<catch-closure 81d9580> ...]
> 157: 1 [#<procedure 80c92a8 ()>]
> In unknown file:
> ?: 0 [catch-closure]
>
> ERROR: In procedure catch-closure:
> ERROR: Throw to key `decoding-error' with args `("scm_from_stringn" "input
> locale conversion error" 22 #vu8(40 115 101 116 108 111 99 97 108 101 32 76
> 67 95 65 76 76 32 34 34 41 32 40 112 107 32 40 102 108 117 105 100 45 114 101
> 102 32 37 100 101 102 97 117 108 116 45 112 111 114 116 45 101 110 99 111 100
> 105 110 103 41 41))'.
Hmm. 22 here is EINVAL, returned by u32_conv_from_encoding, and
probably coming from iconv_open(3) or iconv(3).
Can you try this patch and tell us what gets written?
diff --git a/libguile/script.c b/libguile/script.c
index 83daf8a..3d22923 100644
--- a/libguile/script.c
+++ b/libguile/script.c
@@ -388,6 +388,7 @@ locale_arguments_to_string_list (int argc, char **const
argv)
const char *encoding;
encoding = environ_locale_charset ();
+ printf ("encoding: `%s'\n", encoding);
for (i = argc - 1, lst = SCM_EOL;
i >= 0;
i--)
Can you show the output of ‘ldd --version’?
Finally, can you try the program below? Compile it as indicated in the
file, and run it as:
$ LD_PRELOAD=iconv.so guile -c 1
It will print the series of iconv_open(3) calls that are made, and
hopefully the one that fails.
Thanks,
Ludo’.
/* Display looked up environment variables.
Compile as shown at the bottom of this file.
Run with:
$ LD_PRELOAD=./iconv_open.so some-program
Written by Ludovic Courtès <ludo-mXXj517/address@hidden>. Hereby placed
under the
LGPLv3+.
*/
#include <stdio.h>
#include <gnu/lib-names.h>
#include <dlfcn.h>
#include <errno.h>
static void *glibc;
static char * (*glibc_iconv_open) (const char *, const char *);
static void load_glibc (void) __attribute__ ((__constructor__));
static void
load_glibc (void)
{
glibc = dlopen (LIBC_SO, RTLD_LAZY);
glibc_iconv_open = dlsym (glibc, "iconv_open");
}
char *
iconv_open (const char *to, const char *from)
{
char *result;
errno = 0;
result = glibc_iconv_open (to, from);
printf ("iconv_open (\"%s\", \"%s\") = %p (%m)\n",
to, from, result);
return result;
}
/*
Local Variables:
compile-command: "gcc -Wall -shared -fPIC -o iconv.so iconv.c"
End:
*/
- bug#10742: The resulting output is as follows, which I think is wrong., Alírio Eyng, 2012/02/07
- bug#10742: The resulting output is as follows, which I think is wrong., Ludovic Courtès, 2012/02/07
- bug#10742: further information, Alírio Eyng, 2012/02/07
- bug#10742: further information, Alírio Eyng, 2012/02/08
- bug#10742: further information,
Ludovic Courtès <=
- bug#10742: It's creativity demanding to find a good title, Alírio Eyng, 2012/02/17
- bug#10742: the workaround works, but I can't find the commit, Alírio Eyng, 2012/02/18
- bug#10742: invalidating last e-mail, Alírio Eyng, 2012/02/24