From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id uCIRANP+TWW2hQAAauVa8A:P1 (envelope-from ) for ; Fri, 10 Nov 2023 10:58:43 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id uCIRANP+TWW2hQAAauVa8A (envelope-from ) for ; Fri, 10 Nov 2023 10:58:43 +0100 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 81DCB5AADB for ; Fri, 10 Nov 2023 10:58:42 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elenq.tech header.s=protonmail2 header.b=em21TeDz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=elenq.tech (policy=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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699610322; a=rsa-sha256; cv=none; b=FfDNpeVM83pPwqaPIHueLq8XXu2P1qpMOtIq6q7bbQbI6ITBDxOsByIZ1CPNKd/ei6sk6r qu2Uc1s6MuAUDh+cU9wQSaXEwT4eSxqm2sk0s8YnFT3FADV7CxEXN0fe/8XCLsBlQi5Ydv yrgip8zRCmrRY+CVJ5mhHv/LcQd24cZ7zL+GnO3Vm0wWeXxCYphJrtYrkJY955pz3+zhQ3 KGy75TUmLu2bkNoOJpz1DYxE3YitFfehpvYssOjLf7B9RR50CjPJuBAxoqze1/mC8UKRhx luvA7bos/zj7h3g9ghxbLvZkJuSRKWvizz3RJCFjHuRPC3PLNFrb+56ODJETaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699610322; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=V3UrfOaYekr2vfV2VioU4cm/aNa1/R+v6/xLRhLo6SA=; b=EfRjICeCAivRUHR03OOQ8RUfg/MXw3FyR9VPh/CGholH+Ru+TQwUUcAayng/u4CN2A7MDb TI/5onCYesMDyhFxcg7H0TOjXY4+phNphO4j/eTRKLphURhMpAkccKFpY7Mvf2UPzFD2Fg D7oTcWCuDdxiCSQfPjQSutWz2WyBXeH9Y1SgU/0aX1Gz4DiRUadvoOu7CNxB5Aw9qJeEKr pH3NOUA28SP4UT1McGRPOUDnMPa7PZW+mq4sLEgKKzdldR6ga8MjUVQBf26S08jjAP8eem A0yZXuPtADBV/jgGX8ylDtOsP0nwQI+ardRjhHh+JLwkVMkBa0U3Lgft6XcQVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=elenq.tech header.s=protonmail2 header.b=em21TeDz; dmarc=fail reason="SPF not aligned (relaxed)" header.from=elenq.tech (policy=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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r1OHS-0005r4-LX; Fri, 10 Nov 2023 04:58:26 -0500 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 1r1OHP-0005qm-NT for bug-guix@gnu.org; Fri, 10 Nov 2023 04:58:23 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r1OHO-0002qo-Jv for bug-guix@gnu.org; Fri, 10 Nov 2023 04:58:23 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r1OI1-0003je-QS for bug-guix@gnu.org; Fri, 10 Nov 2023 04:59:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#66699: zig: fail to link SDL2 Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 10 Nov 2023 09:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66699 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: =?UTF-8?Q?Nguy=E1=BB=85n?= Gia Phong Cc: 66699@debbugs.gnu.org Received: via spool by 66699-submit@debbugs.gnu.org id=B66699.169961032014319 (code B ref 66699); Fri, 10 Nov 2023 09:59:01 +0000 Received: (at 66699) by debbugs.gnu.org; 10 Nov 2023 09:58:40 +0000 Received: from localhost ([127.0.0.1]:49575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1OHg-0003it-5c for submit@debbugs.gnu.org; Fri, 10 Nov 2023 04:58:40 -0500 Received: from mail-4018.proton.ch ([185.70.40.18]:56029) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r1OHa-0003iX-Ad for 66699@debbugs.gnu.org; Fri, 10 Nov 2023 04:58:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=protonmail2; t=1699610267; x=1699869467; bh=V3UrfOaYekr2vfV2VioU4cm/aNa1/R+v6/xLRhLo6SA=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=em21TeDzeAmN8pPnOOtmNX/POMEFHubpqxSe4aKI6KFzO1FlGqj1DO7G5PlBRyEH9 KDqjj+koLmw1BRE2HqrXmP88LlJ6pLrv/WhoGn2QStDAtIlQs8cd9OUTVaIYxewor8 PqaHtBLxZ3RvrkljplGzOln55CUSdh4FWZ1MVPXllyjfa+oMEYDPIG0IGareVZV2hS b9/xbvDybXvteyMaHA6olZx/5Bjrnb9YseZc6/KH8KxBX1q4+rd80l/uzAk7UyP/P7 FWT8i/yleRo0VRO3/IgGfJ2ZZTaSRmd5tVYOwRQUk5zqGUraLGtYCJRNhaF1OFJ5wV P0modz5e2Xclw== Date: Fri, 10 Nov 2023 09:57:43 +0000 From: Ekaitz Zarraga Message-ID: In-Reply-To: References: Feedback-ID: 3263582:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: 2.89 X-Migadu-Queue-Id: 81DCB5AADB X-Migadu-Spam-Score: 2.89 X-TUID: z+yD7uoAJQ3u Hi, On Friday, November 10th, 2023 at 06:01, Nguy=E1=BB=85n Gia Phong wrote: > On 2023-11-01 at 20:52+00:00, Ekaitz Zarraga wrote: >=20 > > On Monday, October 23rd, 2023 at 09:34, Nguy=E1=BB=85n Gia Phong wrote: > >=20 > > > I am trying to package Mepo, an OpenStreetMap frontend written in Zig= . > > > The currently packaged Zig fails to find transitive dependencies of S= DL2: > > > https://paste.sr.ht/~cnx/db21e1ef9a6828f3ec898db43b790d71b5ef213a > >=20 > > The problem is not Zig specific, look: [...] > >=20 > > guix shell sdl2 sdl2-image gcc-toolchain glibc:static > >=20 > > And tried to build: [...] The list of errors are basically the same > > you have. Zig builds statically if I'm not mistaken > > so it's triggering the same problem GCC would for that case. > >=20 > > We need to research this further... > >=20 > > I don't have the Zig knowledge to know how does all this work, > > but I know it's not just the build-system's fault > > because it happens in GCC too, and also with a normal shell > > with `zig` available, and running the command by hand. > > The build-system just replicates that behavior. >=20 >=20 > Thanks, this clears it up for me. So far Zig does not offer a way > to prefer dynamic or static and just search alphabetically: > https://github.com/ziglang/zig/issues/14111 Maybe there are more flags for this, but I'm not sure. =20 > On 2023-05-23 at 17:11Z, Michael Dusan wrote: >=20 > > A workaround is if you are only using the zig cc driver, > > the syntax -l: will find the first fully-named library file > > that matches against search dirs. For example: > >=20 > > * -lz will search dirs, prefer lib.a over lib.so > > * -l:libz.so will search directly for libz.so > > and not care about any other name permutations >=20 >=20 > I do wonder though, if it's a generally good idea have separate > shared and static outputs for e.g. SDL2. Obviously Zig programs > would benefit from this, and specifying linkage preference > under GCC is via the same -l:lib*.* flag. I'm not very versed on this so I can't give you a proper answer. > On 2023-11-01 at 20:52+00:00, Ekaitz Zarraga wrote: >=20 > > I also checked Mepo, how do they manage to build directly? >=20 > Sorry, could you rephrase this question? > I don't get what you meant by directly here. Yes, it was pretty badly phrased. The question here was about how do the Mepo devs build mepo in other linux distributions... They should have a similar problem to what we have. Or other systems like Nix, how do they build? In Nix the problem should appear too. With *directly* I meant the Mepo repository doesn't contain the transitive dependencies so... It would never work for us, but it should be working for them. Reading your message before seems like they manage to link against the SDL .so so nothing of this happens... I'll try to check all this with the Zig people to see if we can fix. Thanks!