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 IBaiLIfGLGQvagAASxT56A (envelope-from ) for ; Wed, 05 Apr 2023 02:53:27 +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 6G/gK4fGLGRaEwEAG6o9tA (envelope-from ) for ; Wed, 05 Apr 2023 02:53:27 +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 1866ECE92 for ; Wed, 5 Apr 2023 02:53:26 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pjrOb-0000Tt-9x; Tue, 04 Apr 2023 20:53:05 -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 1pjrOZ-0000Tj-4X for bug-guix@gnu.org; Tue, 04 Apr 2023 20:53:03 -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 1pjrOY-00071b-MU for bug-guix@gnu.org; Tue, 04 Apr 2023 20:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pjrOY-0006lV-2O for bug-guix@gnu.org; Tue, 04 Apr 2023 20:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#62672: Unexpected interaction between gobject-introspection and grafts Resent-From: "Collin J. Doering" Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 05 Apr 2023 00:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62672 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 62672@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168065597225985 (code B ref -1); Wed, 05 Apr 2023 00:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 5 Apr 2023 00:52:52 +0000 Received: from localhost ([127.0.0.1]:50502 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjrON-0006l2-Uo for submit@debbugs.gnu.org; Tue, 04 Apr 2023 20:52:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:42498) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pjrOL-0006ku-LS for submit@debbugs.gnu.org; Tue, 04 Apr 2023 20:52:50 -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 1pjrOL-0000Rg-4p for bug-guix@gnu.org; Tue, 04 Apr 2023 20:52:49 -0400 Received: from out-42.mta0.migadu.com ([91.218.175.42]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pjrOI-0006vy-9J for bug-guix@gnu.org; Tue, 04 Apr 2023 20:52:48 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rekahsoft.ca; s=key1; t=1680655960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h6Kz9tBz9QfXRwE1c1nZ0btppplhzRN435VG4ZVu2Ro=; b=E8/PD5mvlMybCi2y5dVZfMcDOQe2jKOZRxv/brmk84GSjoaKHRC6rT26A7hgdJlvhohVID CQNGX+pML0vp834dSFi+YvlkK5Q2QhnMeSm9Vuwa81odogkuV8hZhTXWEzbbixgZwXahgp ztW6rKHXgfmYQ7lwIejlb0k+x6SA7bk= Date: Tue, 04 Apr 2023 20:04:00 -0400 Message-ID: <87bkk3m9pm.fsf@rekahsoft.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=91.218.175.42; envelope-from=collin@rekahsoft.ca; helo=out-42.mta0.migadu.com X-Spam_score_int: -4 X-Spam_score: -0.5 X-Spam_bar: / X-Spam_report: (-0.5 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_SBL=1.623 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: "Collin J. Doering" From: "Collin J. Doering" 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=1680656007; a=rsa-sha256; cv=none; b=ZgMS4W+gCilSyj8fhHwxGhp+L7jR1vC1JJUykzC7WsChpnk465PPyS3u98p1VZJ+uv2KCp We4AKA7JYVvAVrVO6aYcetishRjupL96G+mIByBiUGaEpmuSVxF06038ZXlMrZm16/lrfn MMe3aO3BDMvoyitExCs0UYZ7WLiQydocUw+cj0LPwv4IOLt0/Kv0UGw+ghJnbNJyoiJ9LN j2bYWHY1TTdF4NiNvJEoGGD85wduhfu/RFk1Em76dO2FMI0/49GToldWebz59b8cWhG8Kl 8fWpGIPX91B/H3lpw4L5v/dPU/FQb7FQXL2ritxS46fe+krVVM+nxgqMLZNJ+g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rekahsoft.ca header.s=key1 header.b="E8/PD5mv"; 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=1680656007; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=h6Kz9tBz9QfXRwE1c1nZ0btppplhzRN435VG4ZVu2Ro=; b=aNBr2qjMtGIcmdTRfAZNoZm0lCC7onyZvESoGNrMKLh0EYB8ZNS+2r2dNNRV3OV5oBrm6B AgUfYKROyUjW0iXLbFWuqY3hORwJk7/BLjsbW3ccD/Tum1XE0Vm6sGvz7sidGSr4nDaypH NaFsNVp+vj8+vkUGJYbdak8oT2xg7NNpBeSBGWVnIRTjC7LNZt8MOukudOl+6G78OMzuXQ vuTA+yIBUVLmRUhchxlAGSRGgPWE1Q7HOWJ7pxfk0AwUJjbtrW1ypC87rdEPGEwMKxViSn m+TzTyE7h2cs7CdppfA4cz+/o0w5eTDMkQ5DW5oUCCh7E2TDcB4sbuDts6m9Ow== X-Migadu-Spam-Score: -3.91 X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=rekahsoft.ca header.s=key1 header.b="E8/PD5mv"; 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-Spam-Score: -3.91 X-Migadu-Queue-Id: 1866ECE92 X-TUID: Bk8deuL/tH/M Hi team Guix! I was working on packaging taffybar (https://github.com/taffybar/taffybar),= which depends on haskell-gi (https://github.com/haskell-gi/haskell-gi) - h= askell bindings for goject-introspection capable libraries. While packaging= gi-gdk, I hit this error: --8<---------------cut here---------------start------------->8--- ** (process:23): WARNING **: 00:09:56.407: Failed to load shared library '/= gnu/store/91ar3zh59n19rdn00png5r9hxp3k0y13-gtk-4.8.1/lib/libgtk-4.so.1' ref= erenced by the typelib: libgtk-4.so.1: cannot open shared object file: No s= uch file or directory Could not resolve symbol "gdk_device_pad_get_type" in namespace "Gdk-4.0" CallStack (from HasCallStack): error, called at lib/Data/GI/CodeGen/LibGIRepository.hs:202:16 in haskell= -gi-0.26.4-HCp1omjln8S5hdZ8Oexk5N:Data.GI.CodeGen.LibGIRepository error: in phase 'configure': uncaught exception: --8<---------------cut here---------------end--------------->8--- However, confusingly enough the shared library that is referenced by the ty= pelib exists in my store (and is also included via the gtk package as a dep= endency, so I would expect its available during the build). It took me a bi= t to realize that the un-grafted gtk package is being used in the typelib, = but really the grafted one is needed. --8<---------------cut here---------------start------------->8--- =E2=9E=9C guix build --no-grafts gtk=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20 ... /gnu/store/91ar3zh59n19rdn00png5r9hxp3k0y13-gtk-4.8.1 =E2=9E=9C guix build gtk=20=20=20=20=20=20=20=20=20=20=20=20 ... /gnu/store/sz90zf6yynsymb1a74zai87f2yi3da82-gtk-4.8.1 --8<---------------cut here---------------end--------------->8--- In the manual "Debugging Build Failures" (https://guix.gnu.org/manual/devel= /en/html_node/Debugging-Build-Failures.html#Debugging-Build-Failures), it n= otes that the build environment can be mimicked using guix shell (explicitl= y specifying the '--no-grafts' options). Entering this environment and look= ing more closely at the gtk package in use, it appears that its typelib for= libgtk references the .so appropriately. --8<---------------cut here---------------start------------->8--- =E2=9E=9C guix shell --no-grafts -L . -C -D ghc-gi-gdk binutils [env]$ readlink -f $GUIX_ENVIRONMENT/lib/girepository-1.0/Gtk-4.0.typelib /gnu/store/91ar3zh59n19rdn00png5r9hxp3k0y13-gtk-4.8.1/lib/girepository-1.0/= Gtk-4.0.typelib [env]$ strings $GUIX_ENVIRONMENT/lib/girepository-1.0/Gtk-4.0.typelib | gre= p libgtk /gnu/store/91ar3zh59n19rdn00png5r9hxp3k0y13-gtk-4.8.1/lib/libgtk-4.so.1 --8<---------------cut here---------------end--------------->8--- So this all to say that I'm not sure whats going wrong with my build, but I= suspect it has something to do with grafting. Any help appreciated. Here is my definition of ghc-gi-gtk (the package that causes this build fai= lure to become apparent): --8<---------------cut here---------------start------------->8--- (define-public ghc-gi-gdk (package (name "ghc-gi-gdk") (version "4.0.5") (source (origin (method url-fetch) (uri (hackage-uri "gi-gdk" version)) (sha256 (base32 "1pa8vbm931xq3rb9xr441sccga9h1y03lzf6hp2rwkhyhs006hax")))) (build-system haskell-build-system) (properties '((upstream-name . "gi-gdk"))) (inputs (list gtk gdk-pixbuf ghc-haskell-gi-base ghc-haskell-gi ghc-haskell-gi-overloading ghc-gi-cairo ghc-gi-pango ghc-gi-gio ghc-gi-gdkpixbuf ghc-gi-gobject ghc-gi-glib)) (native-inputs (list pkg-config gobject-introspection-cairo)) ; for GI repository = files (.gir files) (home-page "https://github.com/haskell-gi/haskell-gi") (synopsis "Gdk bindings") (description "Bindings for Gdk, autogenerated by haskell-gi.") (license license:lgpl2.1))) --8<---------------cut here---------------end--------------->8--- I did not include other dependencies that are not yet packaged upstream (eg= . ghc-gi-*, ...), but am happy to provide them if they are useful for repro= duction of this issue. PS: If you noticed I'm using the package 'gobject-introspection-cairo', thi= s is because I found that the cairo typelibs are not included in the cairo = package, or gobject-introspection. I worked around this using the aforement= ioned variant, which is defined like so: --8<---------------cut here---------------start------------->8--- (define-public gobject-introspection-cairo (package (inherit gobject-introspection) (name "gobject-introspection") (inputs (cons* (list "cairo" cairo) (package-inputs gobject-introspecti= on))) (arguments `(#:phases (modify-phases %standard-phases (add-before 'configure 'patch-cairo-gir (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (cairo (assoc-ref inputs "cairo"))) (substitute* '("gir/cairo-1.0.gir.in") (("@CAIRO_SHARED_LIBRARY@") (string-append cairo "/lib/@CAIRO_SHARED_LIBRARY@"))) #t)))))))) --8<---------------cut here---------------end--------------->8--- Note: this adjustment to gobject-introspection should likely make it upstre= am (and was inspired by a similar change to nix (described https://github.c= om/NixOS/nixpkgs/pull/34081)). --=20 Collin J. Doering http://rekahsoft.ca http://blog.rekahsoft.ca http://git.rekahsoft.ca