From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id qNACB8oaemQTXQEASxT56A (envelope-from ) for ; Fri, 02 Jun 2023 18:37:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SHkuBsoaemQETQAAG6o9tA (envelope-from ) for ; Fri, 02 Jun 2023 18:37:30 +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 C7C7A386B8 for ; Fri, 2 Jun 2023 18:37:29 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q57lw-00052L-Da; Fri, 02 Jun 2023 12:37:04 -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 1q57lu-00051r-QB for bug-guix@gnu.org; Fri, 02 Jun 2023 12:37:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q57lu-0005pg-Hh for bug-guix@gnu.org; Fri, 02 Jun 2023 12:37:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q57lu-00065v-AC for bug-guix@gnu.org; Fri, 02 Jun 2023 12:37:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63853: Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros Resent-From: =?UTF-8?Q?Rapha=C3=ABl_?= =?UTF-8?Q?M=C3=A9lotte?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 02 Jun 2023 16:37:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63853 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 63853@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168572381423411 (code B ref -1); Fri, 02 Jun 2023 16:37:02 +0000 Received: (at submit) by debbugs.gnu.org; 2 Jun 2023 16:36:54 +0000 Received: from localhost ([127.0.0.1]:40775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q57ll-00065W-V5 for submit@debbugs.gnu.org; Fri, 02 Jun 2023 12:36:54 -0400 Received: from lists.gnu.org ([209.51.188.17]:49976) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q57li-00065N-7p for submit@debbugs.gnu.org; Fri, 02 Jun 2023 12:36:51 -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 1q57li-00050r-0w for bug-guix@gnu.org; Fri, 02 Jun 2023 12:36:50 -0400 Received: from mail-io1-xd2f.google.com ([2607:f8b0:4864:20::d2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q57lf-0005jC-H7 for bug-guix@gnu.org; Fri, 02 Jun 2023 12:36:49 -0400 Received: by mail-io1-xd2f.google.com with SMTP id ca18e2360f4ac-7748edd6c87so54031839f.0 for ; Fri, 02 Jun 2023 09:36:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1685723805; x=1688315805; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=AxZ26y2p4mbRKSLssWcVRgX4SoCqy0VAhiropdfOwaM=; b=ignEhqI2hltFh4wMqH5aYAZxST7m0j46UtkNZxQ4/2od0NBnPuV/orK0HKGHn7mgLQ g/OIFMcwyh7K3Q/V3Zp0FDfcq5tdWF+8wFMbgtymxMfbMWbMVpNl0aFu4wX+RzZvz4Bv aQPbHvzhkCB3PF5SqSgRJxHrDBsl20xSgr/NpM5NEY+dTMBUO9swVdQkTxsbU8wrW8kC RDNqn7l0UiZiCdFLEWV4c8gWQNhTU/MhqKvPJssRqoIwfncN0sJoycUcaQfcFMnIuzQA as0/Osdn/iV0RFRb1YxWIvSa05dmI0IEU9WmVyNQaRvMTtYHWVyUa1CHgE0E3s/Dp7F3 u8jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685723805; x=1688315805; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=AxZ26y2p4mbRKSLssWcVRgX4SoCqy0VAhiropdfOwaM=; b=XNjJGpZZ8PyzhQ0a2sI7yRZPbHTeoEKAZpe2GjXcle7hkeD54Pxcm0qv7kXPOnAlWW 7+k+9ciwSjADxNuBn4MAOj2c+kv/brihza2JPUqgdxtNkVBaavNxQcPdtCuW/bY4Tr5m HgdlCc0EZ8xgh/0xLTYqZ2u0Z7BubkbIldmCAlMH6BRfZZEhqPyvliO0PSZm+Gncqxn8 h7YzF/mnpyZa5tHEs8SV5gUHlB1UDl7eHNy4qi1T4HekGBGVncxzaKL/aUyA92VyBjJq Xn/ZoGWJibp11clX0Abayb9MsasRp6AznwdYQyI1fEZQBd9we4Hb55cVHQmMNSTfK9EZ ZosA== X-Gm-Message-State: AC+VfDzAgl6brpDZUCOOzGp/h85fFowFcvGE8gQt8e2e0biSIKS0AS3m DRGb7LTxg0wL9AqXxSSI2lsCWwtPIBiW88y4ZNag7s1DmReUduZcpIXhsQ== X-Google-Smtp-Source: ACHHUZ6VZwPxhH9F+3sFyvlAn/yQ+esxx+5Bc4b6CgoAZtSA3rRxILzkH1p7MABqb5qcmgsz8Xpn/7+0LZRnUFsNBsI= X-Received: by 2002:a5e:a517:0:b0:774:91f6:9530 with SMTP id 23-20020a5ea517000000b0077491f69530mr2279549iog.9.1685723805221; Fri, 02 Jun 2023 09:36:45 -0700 (PDT) MIME-Version: 1.0 Date: Fri, 2 Jun 2023 18:36:34 +0200 Message-ID: Content-Type: multipart/alternative; boundary="00000000000099a14b05fd282857" Received-SPF: pass client-ip=2607:f8b0:4864:20::d2f; envelope-from=raphael.melotte@essensium.com; helo=mail-io1-xd2f.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Reply-to: =?UTF-8?Q?Rapha=C3=ABl_?= =?UTF-8?Q?M=C3=A9lotte?= From: raphael.melotte--- via Bug reports for GNU Guix Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1685723849; a=rsa-sha256; cv=none; b=DWa/+68rGFfKB9lmXQQlNlXFPN68aYo4eK9jvQhwj2x+OuHGDuyy5VwShBdD/ZCK2Hfw2L 3cwV8hPCYy8pyNeXoMrY+EZYICG0xEhLElZ49LFXXcZ0eGKeWd+Pv8e5Lm0+2SZCHyJRJK ClDhl+haQ4GoYe05WNHvyaHmhA6HgQ5lVqbtKet8SqI8Oghoqd5xF/jnKPHOlZhdSqw3Mb IWtG3gme1i+JJPApT8KXlrrSZmv5WVI8ZdN7GSuxxKz3yZreoo76lOXgMpsGbPkU+O/TXV OrC1xfZCPKvAYccxjXXs7Yn2h4qWeSbWpTc9wM3Kl4ijAqNJTeSmjPAflE3URg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mind.be header.s=google header.b=ignEhqI2; dmarc=pass (policy=none) header.from=gnu.org; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1685723849; h=from:from:sender:sender:reply-to: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=AxZ26y2p4mbRKSLssWcVRgX4SoCqy0VAhiropdfOwaM=; b=EcVItoJLGdJQiTcPWA5ws0MwzXs4YIuwm9kPbg/cs5XfaqFA74qxc9bqP/dTyijQ0hvTw+ ViQCatadTAyVdzNIZATC0vMxnayTa/++QY98A1HzJaQ4QDTfEqQpXdOrqOoVoYmFicX7vY xhVN+7enYTUiAAD8MoNwd9xL6XnlI5D5J5uY9/dnST4Iz47THU8wo2/T+MSjAFeIbxgW/g xGTw/Wh3Ea97XY3VzfsyAC5ixsGrFnYIXdsD9bQ6uQt11yUH6hB0cAN212cPPJjAtrDJEe /ORH8CgGkYtk3UuxxaDHJ0kf8iQu5No6rUOzGZxCMfGj5I1Kk0YdZekF8auAHg== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mind.be header.s=google header.b=ignEhqI2; dmarc=pass (policy=none) header.from=gnu.org; 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-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.47 X-Spam-Score: -4.47 X-Migadu-Queue-Id: C7C7A386B8 X-TUID: cSBf/EDhdd7d --00000000000099a14b05fd282857 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, When running an application that uses gdk-pixbuf as a library, the GDK_PIXBUF_MODULE_FILE environment variable takes precedence over build-time defaults (see for example [1]). If a Guix user on a foreign distro installs in their main profile an application that sets GDK_PIXBUF_MODULE_FILE, the variable will be used for all applications, not only the ones installed by Guix (because it's exported in the profile environment). See for example when running Thunderbird on Debian when GDK_PIXBUF_MODULE_FILE is set in the main Guix profile environment file (note how it loads libgdk_pixbuf provided by Debian, but the PNG loader provided by Guix): """ $ strace thunderbird 2>&1 | grep -E '^open(at)?\(.*\.so' | grep pixbuf openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0", O_RDONLY|O_CLOEXEC) =3D 4 openat(AT_FDCWD, "/gnu/store/5m25ni3hfvmqlsszvbkbz243avz78cb2-gdk-pixbuf-2.42.4/lib/gdk-pixb= uf-2.0/2.10.0/loaders/libpixbufloader-png.so", O_RDONLY|O_CLOEXEC) =3D 35 """ This was not so much of a problem until the bump of gdk-pixbuf to version 2.42.8 (see commit 8b0565c07740167982e9cef3fc37359b25340d1b). In gdkpixbuf 2.42.8, the support for PNG and JPEG is builtin (it's linked statically, and not as shared libraries like it was the case in 2.42.4). This also means that the shared libraries to be able to load such files are not generated nor install by Guix at all anymore. Applications that use the newer version of gdk-pixbuf will have no issue as the gdk-pixbuf library already provides support for loading PNG files. For non-Guix applications that have been linked against (or dlopen) a previous version however, this becomes problematic as the support for PNG files is not builtin anymore, so they will rely on loading the shared library for it by looking at GDK_PIXBUF_MODULE_FILE, which no longer contains the path to the lib for PNG files. An example of such an application is Thunderbird when running on Debian: with gdk-pixbuf 2.42.8 installed in the main Guix profile, it crashes everytime the dialog to open a file is opened. There could be multiple ways to solve it: - Make sure the library for PNG support (and JPEG) is built as a shared library again with the current gdk-pixbuf version. This would fix the crashing apps, but is arguably more a workaround than a solution (do we have any guarantee that the shared libraries are compatible with any gdk-pixbuf version the foreign distro might have?). - Set the GDK_PIXBUF_MODULE_FILE variable for all Guix applications that need it, but do not export it for the whole profile. Since many other variables are similarly exported in the profile environment I imagine there is a good reason for it, so this might not be possible. - Document as a limitation to not install applications that set GDK_PIXBUF_MODULE_FILE in the main profile on foreign distros. - Does anyone have any other idea? Note that as a temporary fix for anyone affected by this issue, another possiblity is to unset the GDK_PIXBUF_MODULE_FILE variable in a terminal before starting the affected application. Kind regards, Rapha=C3=ABl [1]: https://developer-old.gnome.org/gtk4/stable/gtk-running.html#id-1.9.4.2.10 --00000000000099a14b05fd282857 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

When running an application that uses gdk-pi= xbuf as a library, the GDK_PIXBUF_MODULE_FILE environment variable takes pr= ecedence over build-time defaults (see for example [1]).
If a Guix user = on a foreign distro installs in their main profile an application that sets= GDK_PIXBUF_MODULE_FILE, the variable will be used for all applications, no= t only the ones installed by Guix (because it's exported in the profile= environment).

See for example when running Thunderbird on Debian wh= en GDK_PIXBUF_MODULE_FILE is set in the main Guix profile environment file = (note how it loads libgdk_pixbuf provided by Debian, but the PNG loader pro= vided by Guix):
"""
$ strace thunderbird 2>&1 |= grep -E '^open(at)?\(.*\.so' | grep pixbuf
openat(AT_FDCWD, &qu= ot;/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0", O_RDONLY|O_CLOEXEC) = =3D 4
openat(AT_FDCWD, "/gnu/store/5m25ni3hfvmqlsszvbkbz243avz78cb2= -gdk-pixbuf-2.42.4/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so= ", O_RDONLY|O_CLOEXEC) =3D 35
"""

This was no= t so much of a problem until the bump of gdk-pixbuf to version 2.42.8 (see = commit 8b0565c07740167982e9cef3fc37359b25340d1b).

In gdkpixbuf 2.42.= 8, the support for PNG and JPEG is builtin (it's linked statically, and= not as=C2=A0 shared libraries like it was the case in 2.42.4).
This als= o means that the shared libraries to be able to load such files are not gen= erated nor install by Guix at all anymore.
Applications that use the new= er version of gdk-pixbuf will have no issue as the gdk-pixbuf library alrea= dy provides support for loading PNG files.
For non-Guix applications tha= t have been linked against (or dlopen) a previous version however, this bec= omes problematic as the support for PNG files is not builtin anymore, so th= ey will rely on loading the shared library for it by looking at GDK_PIXBUF_= MODULE_FILE, which no longer contains the path to the lib for PNG files.
An example of such an application is Thunderbird when running on Debia= n: with gdk-pixbuf 2.42.8 installed in the main Guix profile, it crashes ev= erytime the dialog to open a file is opened. =C2=A0
There could be multi= ple ways to solve it:

- Make sure the library for PNG support (and J= PEG) is built as a shared library again with the current gdk-pixbuf version= . This would fix the crashing apps, but is arguably more a workaround than = a solution (do we have any guarantee that the shared libraries are compatib= le with any gdk-pixbuf version the foreign distro might have?).
- Set th= e GDK_PIXBUF_MODULE_FILE variable for all Guix applications that need it, b= ut do not export it for the whole profile. Since many other variables are s= imilarly exported in the profile environment I imagine there is a good reas= on for it, so this might not be possible.
- Document as a limitation to = not install applications that set GDK_PIXBUF_MODULE_FILE in the main profil= e on foreign distros.
- Does anyone have any other idea?

Note tha= t as a temporary fix for anyone affected by this issue, another possiblity = is to unset the GDK_PIXBUF_MODULE_FILE variable in a terminal before starti= ng the affected application.

Kind regards,
--00000000000099a14b05fd282857--