unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Mark H Weaver <mhw@netris.org>
To: ludo@gnu.org (Ludovic Courtès)
Cc: bug-guile@gnu.org
Subject: Re: build errors: 9172 Broken pipe and 9173 Segmentation fault
Date: Mon, 18 Apr 2011 19:45:03 -0400	[thread overview]
Message-ID: <8739lf3z0g.fsf@netris.org> (raw)
In-Reply-To: <8739lf8dly.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 18 Apr 2011 23:16:09 +0200")

[-- Attachment #1: Type: text/plain, Size: 1494 bytes --]

ludo@gnu.org (Ludovic Courtès) writes:
>> Douglas and I did some investigation over this over IRC, and discovered
>> that this problem is not within Guile.  On his platform (uClibc on
>> PowerPC, using GCC 4.6.0 and libunistring-0.9.3) u32_conv_from_encoding
>> does not work correctly, as demonstrated by the attached minimal C
>> program, which is not linked with Guile.
>
> Great.  Did you report it on bug-libunistring?

Further investigation revealed that his libunistring was built with
HAVE_ICONV undefined.  Apparently it is possible to build and install
libunistring without iconv, in which case most (all?) attempts to
convert between encodings will fail.

Therefore, it seems that there is no bug here at all.  After Douglas
rebuilt libunistring, his guile-2.0 build proceeded further than ever
before: into byte-compiling *.scm files at least, and possibly all the
way to completion, I'm not sure.

Ideally, guile's configure script should check that libunistring is able
to convert between encodings, instead of failing with an obscure error
far into the build.

I've never worked with autoconf, so I'm uncertain of how best to add
this check.  If you'd like to add it, the attached C program would be a
suitable test program.  It will return a non-zero exit status if
libunistring conversion fails, which most likely indicates that
libunistring was built without iconv.  In this case I think the build
should be aborted.

   Thanks,
     Mark



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libunistring iconv test --]
[-- Type: text/x-csrc, Size: 240 bytes --]

#include <uniconv.h>
#include <unistring/iconveh.h>

int
main (int argc, char *argv[])
{
  size_t result_size;
  
  return (NULL == u32_conv_from_encoding ("ASCII", iconveh_question_mark,
					  "a", 1,
					  NULL, NULL, &result_size));
}

  reply	other threads:[~2011-04-18 23:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24  1:05 build errors: 9172 Broken pipe and 9173 Segmentation fault Douglas Mencken
2011-03-24  1:45 ` Neil Jerram
     [not found]   ` <AANLkTindvcPaJ4qYr7OCvWbitFCzb2oALNO1ya6x0_Y4@mail.gmail.com>
2011-03-29 17:07     ` Douglas Mencken
2011-04-01  9:08       ` Andy Wingo
2011-04-16 11:19         ` Douglas Mencken
2011-04-16 16:01           ` Andy Wingo
2011-04-17  2:34           ` Mark H Weaver
2011-04-18 21:16             ` Ludovic Courtès
2011-04-18 23:45               ` Mark H Weaver [this message]
2011-04-21 10:28                 ` Andy Wingo
2011-04-17  2:38           ` Mark H Weaver

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=8739lf3z0g.fsf@netris.org \
    --to=mhw@netris.org \
    --cc=bug-guile@gnu.org \
    --cc=ludo@gnu.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).