From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mark H Weaver Newsgroups: gmane.lisp.guile.bugs Subject: bug#17399: Fwd: Re: bug#17399: compilation bugs when making guile-2.0.11 Date: Wed, 15 Oct 2014 20:30:15 -0400 Message-ID: <8738ao7t60.fsf@yeeloong.lan> References: <5386332E.4080707@psu.edu> <53868EA4.8050208@psu.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1413419492 13891 80.91.229.3 (16 Oct 2014 00:31:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 16 Oct 2014 00:31:32 +0000 (UTC) Cc: 17399@debbugs.gnu.org, request@debbugs.gnu.org To: Ed Green Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Thu Oct 16 02:31:26 2014 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1XeYyR-0003x4-Sv for guile-bugs@m.gmane.org; Thu, 16 Oct 2014 02:31:24 +0200 Original-Received: from localhost ([::1]:47500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeYyR-0003eK-4F for guile-bugs@m.gmane.org; Wed, 15 Oct 2014 20:31:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51678) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeYyG-0003cv-FI for bug-guile@gnu.org; Wed, 15 Oct 2014 20:31:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XeYy8-0003zX-Lm for bug-guile@gnu.org; Wed, 15 Oct 2014 20:31:12 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XeYy8-0003zR-Ix for bug-guile@gnu.org; Wed, 15 Oct 2014 20:31:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1XeYy7-0007oh-Ug for bug-guile@gnu.org; Wed, 15 Oct 2014 20:31:04 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Thu, 16 Oct 2014 00:31:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17399 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 17399-submit@debbugs.gnu.org id=B17399.141341946230038 (code B ref 17399); Thu, 16 Oct 2014 00:31:03 +0000 Original-Received: (at 17399) by debbugs.gnu.org; 16 Oct 2014 00:31:02 +0000 Original-Received: from localhost ([127.0.0.1]:45012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeYy5-0007oC-Es for submit@debbugs.gnu.org; Wed, 15 Oct 2014 20:31:02 -0400 Original-Received: from world.peace.net ([96.39.62.75]:40948) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XeYy2-0007ny-MT; Wed, 15 Oct 2014 20:30:59 -0400 Original-Received: from c-24-62-95-23.hsd1.ma.comcast.net ([24.62.95.23] helo=yeeloong.lan) by world.peace.net with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1XeYxv-0006mj-5A; Wed, 15 Oct 2014 20:30:51 -0400 In-Reply-To: <53868EA4.8050208@psu.edu> (Ed Green's message of "Wed, 28 May 2014 21:34:28 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7618 Archived-At: retitle 17399 Problems building guile-2.0.11 with libunistring 0.9.0 thanks Hi Ed, I finally looked into this test failure that you experienced when compiling guile-2.0.11 from source code on Ubuntu 12.04. I see that you've since updated to Ubuntu 14.04, which includes guile-2.0.11, so your problems are happily solved, but I'm still curious to learn what happened here. To summarize, your problems all stemmed from a very old GNU libunistring that you had installed in /usr/local. It was quite a bit older than the minimum required version (0.9.3) which was packaged in Ubuntu 12.04. The configure script identified the installed version as 0.9.0. You should probably remove that old version of libunistring, as it will likely cause problems with other software you build from source. The rest of this email is primarily aimed at other Guile developers. * * * First, we should improve our configure script to bail out if the libunistring is too old. After Ed had manually edited the old "unistr.h" to fix the compilation problem, he encountered this test failure: ERROR: ports.test: unicode byte-order marks (BOMs): Don't read from the port unless user asks to - arguments: ((decoding-error "scm_from_stringn" "input locale conversion error" 84 #vu8(254 255))) Here's the relevant section of test code in ports.test: --8<---------------cut here---------------start------------->8--- (pass-if "Don't read from the port unless user asks to" (let* ((p (make-soft-port (vector (lambda (c) #f) ; write char (lambda (s) #f) ; write string (lambda () #f) ; flush (lambda () (throw 'fail)) ; read char (lambda () #f)) "rw"))) (set-port-encoding! p "UTF-16") (display "abc" p) (set-port-encoding! p "UTF-32") (display "def" p) #t)) --8<---------------cut here---------------end--------------->8--- The error occurred within 'sf_write' in vports.c while writing the BOM to the soft port (before writing "abc"). The problem is that soft ports are fundamentally based on strings, and anything written to them is first converted to a string (using the locale encoding) within 'sf_write', in order to pass to the string to the user-provided "write" procedure. Attempting to convert the UTF-16-encoded-BOM (0xFE 0xFF) to the locale encoding failed, unsurprisingly. I believe the locale should have been "C", because of the call (setlocale LC_ALL "C") in test-suite/guile-test. I'm actually surprised that this has ever worked, and it warrants further investigation. Mark