From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 02 12:36:54 2023 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 From: =?UTF-8?B?UmFwaGHDq2wgTcOpbG90dGU=?= Date: Fri, 2 Jun 2023 18:36:34 +0200 Message-ID: Subject: Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros To: bug-guix@gnu.org 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-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --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-- From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 27 09:29:29 2023 Received: (at 63853) by debbugs.gnu.org; 27 Sep 2023 13:29:30 +0000 Received: from localhost ([127.0.0.1]:50867 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlUbZ-0004VF-Ey for submit@debbugs.gnu.org; Wed, 27 Sep 2023 09:29:29 -0400 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]:61723) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlUbV-0004V0-JK for 63853@debbugs.gnu.org; Wed, 27 Sep 2023 09:29:27 -0400 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2c15463ddd4so122348731fa.3 for <63853@debbugs.gnu.org>; Wed, 27 Sep 2023 06:29:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mind.be; s=google; t=1695821346; x=1696426146; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id:from :to:cc:subject:date:message-id:reply-to; bh=kJWTEUYfqKpgGAfKRR4H6RwiKl05YUP4nep/pdvlaCo=; b=OIkeKO/18ZGKDjN9VOoxBPLX/shrMdCwnpoTKUY0op6myacYCtq1j5bZbrqAxrzQsy vWGFGTDVSxj12X2tSx/ursyt4EiaFQa5oPS+Ae/RFC0WahWVJk2u8DCYV5QTP63QbEzn v9Nf9cWtC7+AjSwhmxJn8L84fE13K13Zbvs1e7d+pHu4QP3QZWAEUO+jHjTipn7qL1d/ o2gjDL+Kw4oxTpFpGVZ/AKRUSG3crVi7kKbfW72UZNEGHvryeftTmJL6mWfq1RoyNce6 S+UttnATGlb1yO/LyjjTufRhqFL41jJLt/Nha2u77HIkcmdOQJUnGLacSK40hLtzDVWy DJNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695821346; x=1696426146; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=kJWTEUYfqKpgGAfKRR4H6RwiKl05YUP4nep/pdvlaCo=; b=oAQa8i9+TLsXciSoxLdnBZ43NS/qU52A/fxKp0HsV/Pq9ivBpdfacTHPuVwRnIBuGV cimxoMy16Q9qPj21zmWg7+DnWMj2U/Yy2aRc8EebZVsaiV0IvIt+sHhEHcpwZ6JBPJqJ 0sUTb/yFINa/1Na8gmPrTePLHwfXGNukiZE64UbJV2D1g/NLoRtouko+ykgTbiHU68+Y RF8RWhGXcRk/jbXJnwqa5kzgfWSfOFqW/coJne6WQF/hWWQ2Kb0cxq4xSnxp55R+w/SV QdljqxHn5NZk9LgYaSj6HhxzDsYzjHTcgScXMSL1oRxROKMlI02gr7TKfKAzsKlFnV6f 4LUA== X-Gm-Message-State: AOJu0Yz3QBnVQZNHFB1FZz9+bk1454Wtlg8+Ais+Cv4dAigU4NCtbEJW MvSHuFOTBzJb0kSCG/XeeMhwCPCE3f9ffbmSBAf2jg== X-Google-Smtp-Source: AGHT+IF9Cue7ss1lSnNgRNdlZZcXRKAPvuKLXGBIh4JCVWUA44/amV8uG3cbCK40WawvfWKXqk5Z/w== X-Received: by 2002:a2e:9f0c:0:b0:2b6:df71:cff1 with SMTP id u12-20020a2e9f0c000000b002b6df71cff1mr2062779ljk.52.1695821345132; Wed, 27 Sep 2023 06:29:05 -0700 (PDT) Received: from [10.1.0.150] (ip-188-118-3-185.reverse.destiny.be. [188.118.3.185]) by smtp.gmail.com with ESMTPSA id t21-20020a170906179500b00988e953a586sm9358811eje.61.2023.09.27.06.29.04 for <63853@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 27 Sep 2023 06:29:04 -0700 (PDT) Message-ID: <66aeb75e-04dd-14ed-297c-561a9d13c433@mind.be> Date: Wed, 27 Sep 2023 15:29:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.15.1 Subject: Re: bug#63853: Acknowledgement (Missing shared libraries for gdk-pixbuf break non-Guix applications on foreign distros) To: 63853@debbugs.gnu.org References: Content-Language: en-US From: =?UTF-8?B?UmFwaGHDq2wgTcOpbG90dGU=?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.2 (-) X-Debbugs-Envelope-To: 63853 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.2 (--) Note that on Debian specifically, this is not so much of an issue after updating to Bookworm (Debian 12), as it itself ships gdk-pixbuf 2.42.10, which has the expected loaders builtin.