From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id cOi8CGFQXmY+QwEAqHPOHw:P1 (envelope-from ) for ; Tue, 04 Jun 2024 01:23:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cOi8CGFQXmY+QwEAqHPOHw (envelope-from ) for ; Tue, 04 Jun 2024 01:23:13 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1717456993; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=+R6NJijBcWm+kvDEKo9WGKidFgCYX9u/1kpv4bTSi+E=; b=CRsyKbGHmaVlICaM4v+vfOhpOKsYQRnKJ677TCwggtyRBjAuPeIgkCX0aqQpNNdG/kAm6U vUbqOMBTRiDERmyc33m3yTNjTLOGYsKvnp3rSFnq0wGglk7KcmlsIUZ52n2D1rpnZLsRcK wlnv7qS1XBCC5lpMM03B9wDVRWz9QmMNbzRkVgZk94eDMQou8DJco9BKmKrpztEELittMj a2rsrvvhGKYuukdsd3PUBmz+JAvxHeOJx7beB97tuffMSMOmjeFISMp4sBzZvsnLkIOtXa YcvEch69ZkkRfdsUDCcRypm4TOJaJnspaREuD42VqeocfF3ipymjBxxp55K1VQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1717456993; a=rsa-sha256; cv=none; b=LiNbBLSDnGFgbG5tgPhPkYiNmb23SfhK2gx7kfmJi1qiaMf7wNx4qwpZ2ICkmy4MZfj2++ MAPk8S23hvKioow5rBJZvY4MKznxYqTLARsI+6GjsSbNf3W9xo9zwBCatwWM8ancFE/Dic Z8p7Vu7XnOGP/j/RyQ0N1lQWQATQTAU0BP3qKOF8kRlxZQLVZNozxPGcymX7+oNcJ19DsF 1EQjZMbudroSQVNp9xgf3HAVKeOXF0jtfuNCoc/g1u84VzvhaiLCrA2ruN8HFWm25wKP49 H4ZWHVvOs0+cUnprF5k4qGFaRChC/bwfUNmyWzAv6ncvODM2OXz5awo9X88AsQ== Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8B4CF6A70F for ; Tue, 4 Jun 2024 01:23:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sEH0d-0003Ek-P7; Mon, 03 Jun 2024 19:22:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEH0b-0003EP-L4; Mon, 03 Jun 2024 19:22:33 -0400 Received: from smtprelay05.ispgateway.de ([80.67.31.99]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sEH0Z-000705-79; Mon, 03 Jun 2024 19:22:33 -0400 Received: from [80.141.184.252] (helo=jim.voodoo.lan) by smtprelay05.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.97.1) (envelope-from ) id 1sEH0T-000000002wz-2yfM; Tue, 04 Jun 2024 01:22:25 +0200 Received: by jim.voodoo.lan (Postfix, from userid 1000) id 2D39260FA93; Tue, 04 Jun 2024 01:22:19 +0200 (CEST) From: Frank Terbeck To: tmarjeski@gmail.com Cc: help-guix@gnu.org, bug-guile-ncurses@gnu.org Subject: Re: guile-ncurses unicode support In-Reply-To: <87le3vsgqx.fsf@trevarch.mail-host-address-is-not-set> (tmarjeski@gmail.com's message of "Mon, 27 May 2024 13:15:18 +0300") References: <87le3vsgqx.fsf@trevarch.mail-host-address-is-not-set> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Tue, 04 Jun 2024 01:22:19 +0200 Message-ID: <87wmn5has4.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Df-Sender: NDMwNDQ0 Received-SPF: none client-ip=80.67.31.99; envelope-from=ft@bewatermyfriend.org; helo=smtprelay05.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -6.34 X-Migadu-Queue-Id: 8B4CF6A70F X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -6.34 X-TUID: vWd/48VSUe5r Hi! tmarjeski@gmail.com wrote: [=E2=80=A6] > I'm having issues running the game this way, and I suspect there is no > unicode support enabled on the guile-ncurses package build, even though > it says that there is. Everything is working fine on my Arch system > using guile and guile-ncurses from their package manager. > > When I run my game (which uses unicode characters), I only see "?" in > place of the unicode. I attempted to `guix build guile-ncurses > --no-substitutes` and install from there, but it did not work. > > Does this sound like an issue with guile-ncurses, or perhaps I am > missing something crucial for `guix shell` to work properly? I have just run into this as well, though I am using guix on top of De- bian. But that difference should not matter. I believe this is an issue with the guile-ncurses build in guix, that is caused by an issue in guile-ncurses' configure.ac, that seems to behave in unexpected ways with the "--with-ncursesw" option, that the guix build uses. To check I've put in this patch into guile-ncurses: diff --git a/configure.ac b/configure.ac index 51cc785..6615664 100644 --- a/configure.ac +++ b/configure.ac @@ -115,6 +115,8 @@ AC_ARG_WITH(ncursesw, [with_ncursesw=3Dno], [with_ncursesw=3Dcheck]) =20 +echo "DEBUG: ($with_ncursesw)" + AC_MSG_NOTICE([checking for ncurses]) =20 have_ncursesw_curses_h=3Dno I am using this guix-shell from a guile-ncurses git repository clone: % guix shell --pure ncurses coreutils grep sed gawk gcc-toolchain \ make autoconf automake libtool pkg-config guile \ texinfo With that, just calling the configure script: % ./configure =E2=80=A6 DEBUG: (check) configure: checking for ncurses checking for ncursesw/curses.h... no checking for ncurses/curses.h... no checking for curses.h... yes checking for library containing initscr... -lncursesw checking for library containing u32_strconv_from_locale... -lunistring checking for library containing new_menu... -lmenuw checking for library containing new_form... -lformw checking for library containing new_panel... -lpanelw =E2=80=A6 That looks very much like wide-character ncurses, and indeed if I build it and run a little test script I get this: % make =E2=80=A6 % ./tools/uninstalled-env guile -c '(use-modules (ncurses curses)) (format = #t "wide-ncurses? ~a~%" %wide-ncurses)' 2> /dev/null wide-ncurses? #t That looks good. Now with --with-ncursesw: % ./configure --with-ncursesw =E2=80=A6 DEBUG: (no) configure: checking for ncurses checking for ncurses/curses.h... no checking for curses.h... yes checking for library containing initscr... -lncurses checking for library containing new_menu... -lmenu checking for library containing new_form... -lform checking for library containing new_panel... -lpanel checking for library containing initscr... (cached) -lncurses =E2=80=A6 =E2=80=A6unexpected. Reading the configure.ac file looks to me like it is i= nten- ded, that with this option things should actually error out instead of falling back to the non-wide ncurses build, but this looks like it is a synonym for --without-ncursesw. Just to check, if I run my little test script: % make =E2=80=A6 % ./tools/uninstalled-env guile -c '(use-modules (ncurses curses)) (format = #t "wide-ncurses? ~a~%" %wide-ncurses)' 2> /dev/null wide-ncurses? #f Which confirms the suspicion. I think what is actually intended is this: diff --git a/configure.ac b/configure.ac index 51cc785..cd8b8d4 100644 --- a/configure.ac +++ b/configure.ac @@ -112,7 +112,7 @@ esac AC_ARG_WITH(ncursesw, [AS_HELP_STRING([--without-ncursesw], [Don't use ncursesw (wide character support)])= ], - [with_ncursesw=3Dno], + [with_ncursesw=3D$with_ncursesw], [with_ncursesw=3Dcheck]) =20 AC_MSG_NOTICE([checking for ncurses]) @@ -147,13 +147,15 @@ then [AC_MSG_FAILURE([curses.h could not be found])]) fi =20 -AS_IF([test "$with_ncursesw" =3D check], +AS_IF([test "$with_ncursesw" =3D check || test "$with_ncursesw" =3D yes], [AC_SEARCH_LIBS([initscr], [ncursesw], [AC_DEFINE([HAVE_NCURSESW], [1], [Define if you have libncursesw]) with_ncursesw=3Dyes], - [AC_MSG_FAILURE([--with-ncursesw was given, but, tes= t for ncursesw failed])])]) + [AS_IF([test "$with_ncursesw" =3D check], + [with_ncursesw=3Dno], + [AC_MSG_FAILURE([--with-ncursesw was given, b= ut, test for ncursesw failed])])])]) =20 AS_IF([test "$with_ncursesw" =3D no], [AC_SEARCH_LIBS([initscr], [ncurses], I am Cc:ing bug-guile-ncurses@gnu.org, which is the contact for the maintainer as per the guile-ncurses homepage. I am not an expert in autoconf, so this might not be the most idiomatic way of doing this. In the meantime, the guix build could just drop --without-ncursesw from their build instructions to make this work: Guix's ncurses has wide-cha- racter support and the default of guile-ncurses is to test for this, so it will succeed. A patch for that might look like this (untested): diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index 94417079c7..982b59efe7 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -2718,8 +2718,12 @@ (define-public guile-ncurses (guix build utils)) #:imported-modules ((guix build guile-build-system) ,@%gnu-build-system-modules) - #:configure-flags (list "--with-ncursesw" ; Unicode support - "--with-gnu-filesystem-hierarchy") + #:configure-flags (list + ;; This is currently commented out due to a bug + ;; in configure.ac of guile-ncurses, which makes + ;; this behave just like --without-ncurses. + ;;"--with-ncursesw" ; Unicode support + "--with-gnu-filesystem-hierarchy") #:phases (modify-phases %standard-phases (add-before 'build 'fix-libguile-ncurses-file-name Regards, Frank