From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iPxGG7WrQWL53AAAgWs5BA (envelope-from ) for ; Mon, 28 Mar 2022 14:36:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id YGqpGLWrQWKyXwEA9RJhRA (envelope-from ) for ; Mon, 28 Mar 2022 14:36:05 +0200 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 090FFC5AA for ; Mon, 28 Mar 2022 14:36:05 +0200 (CEST) Received: from localhost ([::1]:59128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nYo5m-0001fl-N8 for larch@yhetil.org; Mon, 28 Mar 2022 08:03:27 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36336) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYo4R-0001dV-3R for bug-guix@gnu.org; Mon, 28 Mar 2022 08:02:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:35296) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nYo4Q-0000GY-PR for bug-guix@gnu.org; Mon, 28 Mar 2022 08:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nYo4Q-0005YQ-Mp for bug-guix@gnu.org; Mon, 28 Mar 2022 08:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#54607: ncurses attrset colour pair ignored in favour of bkgd Resent-From: Roman Riabenko Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 28 Mar 2022 12:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54607 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 54607@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164846886521276 (code B ref -1); Mon, 28 Mar 2022 12:02:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Mar 2022 12:01:05 +0000 Received: from localhost ([127.0.0.1]:57424 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYo3U-0005X5-UL for submit@debbugs.gnu.org; Mon, 28 Mar 2022 08:01:05 -0400 Received: from lists.gnu.org ([209.51.188.17]:56784) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nYo3T-0005Wy-KE for submit@debbugs.gnu.org; Mon, 28 Mar 2022 08:01:03 -0400 Received: from eggs.gnu.org ([209.51.188.92]:36068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYo3T-0001Tj-41 for bug-guix@gnu.org; Mon, 28 Mar 2022 08:01:03 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:52077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYo3Q-0008WO-Fx for bug-guix@gnu.org; Mon, 28 Mar 2022 08:01:02 -0400 Received: (Authenticated sender: roman@riabenko.com) by mail.gandi.net (Postfix) with ESMTPSA id F01311BF205 for ; Mon, 28 Mar 2022 12:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=riabenko.com; s=gm1; t=1648468854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=WtPj3SpFnuIvxYNou+EEaxOypsHs48t40IvX++tqUdc=; b=ZrMXQ8h2p3BEhYsCQ5lSKRdxN8n8i1K+o17Tpmy90TIuh4IvCtAytDXr91im98fubDMkYf TzA+Xn7NTYLkB4+E68IPALnxzmTvFKIMCIP3hLnbIQP4Qff4WHJOhd7zsSUdMMcGQZpkSS NJNQoFCZ1Ca/v1cIjN2PeSFCSeFZLCBSX+b78L2sn96ZezShqYazrPq1PCkuXWMg+uiKoz 4G1b+/a4s9HadS5kETRjnCAwyk2J6NeZhVDwB2kud1fqgj1Mi4ERZkbuPb+eIS2NXwlGsB 1NuVwEo3Ntsd7h+n2d536XScHKSc0Rt+hSd6tauiEhfxN32+H8HzgQpMOUVDsA== Message-ID: From: Roman Riabenko Date: Mon, 28 Mar 2022 15:00:52 +0300 Content-Type: multipart/mixed; boundary="=-wmmPSiH+BQOY3k/VXN8l" User-Agent: Evolution 3.42.1 MIME-Version: 1.0 Received-SPF: pass client-ip=217.70.183.201; envelope-from=roman@riabenko.com; helo=relay8-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1648470965; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=WtPj3SpFnuIvxYNou+EEaxOypsHs48t40IvX++tqUdc=; b=TgpjFlNTCcLGaBWRWuXEiXvnoKW4hJHhBNYLLv7gITw/SDekrHa77F7OFH9Y0k0Nn6BmTQ HXKRc2zu5TZr9tV5nXN7H3G/OiiBu7gbXhCUu4uthuvqe+EWlTrxofhOaTAlMDkx77z6sF kqR0wruJUeaHJCF0FyDtWayez3ELXyEKrAfRhSGFVejwMFngF7ePJ/HtUbkMOxRvYYHdSt SStMzB9E4y61C+CWSUKn34LQMxGTTZsQVj2IjXLrqNAeUYtGloGiajr99oxpLpvjjzXIT+ p6uifWYTBxwOzHid9euQEzNwpkbBKq7CATNNrQBCPMEpLZm9TGMXCg4GllvQwg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1648470965; a=rsa-sha256; cv=none; b=EEyjcj/yAU30HTkvN9f5vXAfkOeSsNH1a7yHKo52DvwrkDqmBnvZHQbk2MuhbZ9jdmdfxf dUVM10BwmTa6N2gDx1VkTAmciQrTWVqbL3J9fjKPkBlpuQcHcqO9hmg42egwEkErO3Xty9 MFfF58xEglLKM5vy4mXyv61IQH7c51aRpjrsD8czLU9yQHnagO0zEv4m5ZrFAEJ2oalFnM 69wv6BC2dzzf4PaxMzNmI2osm45Wt6WahdBTapPhaJRalf2Drg1oxaHhArLC+POx42k+kz /hjw8OAqxpIVXMh6NPVsaboh++HJ4mCODxXgjTw6UuWa9+HVNeqMl1iUtlzh6w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riabenko.com header.s=gm1 header.b=ZrMXQ8h2; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 4.83 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riabenko.com header.s=gm1 header.b=ZrMXQ8h2; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 090FFC5AA X-Spam-Score: 4.83 X-Migadu-Scanner: scn1.migadu.com X-TUID: pQQq8j3uMl6i --=-wmmPSiH+BQOY3k/VXN8l Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Hello With ncurses, the "attrset" colour pair is ignored when the background colour pair is set with "bkgd". I ran into this issue when compiling robotfindskitten, but it is not specific to that program and can be reproduced with the attached small test code. When compiled with "gcc test.c -lncurses", "./a.out" is expected to display the sample text in yellow (the brownish curses equivalent of yellow), which is set with "attrset". It does so when compiled as usual without guix. If compiled in guix, the sample text is blue instead, which is set with "bkgd" for background and for some reason is not overridden by "attrset". If the "bkgd" line is removed, "attrset" works as usual. This affects software compiled in a guix shell (guix environment), or on a guix system, or with "guix build" and "guix install". It does not seem to be caused by the terminal properties or environment variables because it can be reproduced on the same Debian machine after compiling (1) with guix (in a guix environment) and (2) without guix. I tried compiling with guix having ncurses 6.2.20210619 (current guix) and 6.2.20200212 (from the older guix image from the website and in Debian bullseye). I tried compiling without guix on Debian with development packages for ncurses 6.2+20201114-2 (bullseye) and 6.3-2 (bookworm) and on Fedora with its development package for ncurses 6.2.20210508. I was pointed in a forum to "render_char" function in lib_addch.c, [1] which defines how colour is applied. But there seem to be no modifications to that in guix as far as I can see. [1]: https://github.com/ThomasDickey/ncurses-snapshots/blob/6b3112c16ee04882a512f9aa967e34dba5e362e1/ncurses/base/lib_addch.c#L57 Roman --=-wmmPSiH+BQOY3k/VXN8l Content-Disposition: attachment; filename="test.c" Content-Type: text/x-csrc; name="test.c"; charset="UTF-8" Content-Transfer-Encoding: base64 I2luY2x1ZGUgPG5jdXJzZXMuaD4KCmludCBtYWluKCkgewogICAgICAgCWluaXRzY3IoKTsKCXN0 YXJ0X2NvbG9yKCk7Cglpbml0X3BhaXIgKCAxLCBDT0xPUl9CTFVFLCBDT0xPUl9CTEFDSyApOwoJ aW5pdF9wYWlyICggMiwgQ09MT1JfWUVMTE9XLCBDT0xPUl9CTEFDSyApOwoJYmtnZCAoIChjaHR5 cGUpIENPTE9SX1BBSVIoMSkgKTsKCWF0dHJzZXQgKCBDT0xPUl9QQUlSKDIpICk7CglwcmludHcg KCAiTk8gV0FSISIgKTsKCXJlZnJlc2goKTsKCWdldGNoKCk7CgllbmR3aW4oKTsKCXJldHVybiAw Owp9Cg== --=-wmmPSiH+BQOY3k/VXN8l--