From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UF6sNqo7u2IwVAEAbAwnHQ (envelope-from ) for ; Tue, 28 Jun 2022 19:34:35 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UIfANao7u2IwUgEAG6o9tA (envelope-from ) for ; Tue, 28 Jun 2022 19:34:34 +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 602096D61 for ; Tue, 28 Jun 2022 19:34:34 +0200 (CEST) Received: from localhost ([::1]:54078 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o6F6f-0007de-Iw for larch@yhetil.org; Tue, 28 Jun 2022 13:34:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6F6A-0007bk-SR for bug-guix@gnu.org; Tue, 28 Jun 2022 13:34:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34117) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6F6A-0001gK-81 for bug-guix@gnu.org; Tue, 28 Jun 2022 13:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o6F6A-0004gz-5m for bug-guix@gnu.org; Tue, 28 Jun 2022 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56285: azpainter does not cross-compile Resent-From: zimoun Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 28 Jun 2022 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56285 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 56285@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.165643762118010 (code B ref -1); Tue, 28 Jun 2022 17:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Jun 2022 17:33:41 +0000 Received: from localhost ([127.0.0.1]:56247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6F5o-0004gO-1E for submit@debbugs.gnu.org; Tue, 28 Jun 2022 13:33:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:33300) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o6F5b-0004g6-Bw for submit@debbugs.gnu.org; Tue, 28 Jun 2022 13:33:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55866) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o6F5b-0007FH-53 for bug-guix@gnu.org; Tue, 28 Jun 2022 13:33:27 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:40692) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o6F5Z-0001et-Ei for bug-guix@gnu.org; Tue, 28 Jun 2022 13:33:26 -0400 Received: by mail-wr1-x429.google.com with SMTP id v9so3130863wrp.7 for ; Tue, 28 Jun 2022 10:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=Rq/COgf3JMd/X8cBvc56apr1AUGlDrYGBQGl5tNGZtM=; b=Y4dcRKnPvDaXn5t9bm2ZSdwv0B13N83e4t18KEnzvdku89xmZbCbyFdV/qvJn/SvmG nipEkENin43cOBKSP1ZWrogy5YiuA5uTKDGTXXmpN1jwkCRMkWB0tB5jQPg7OM8Tq/Gl zQ59QcR9sDeJjHo0uHvSLw/jxLg+WWBPnwZP+JfHLZRtGvz1cUWcQQJMeb5maILhEpcX XIttHclZJG4JC+2GSaXFJcEfXUNHBy4mGFiu/Kz9dAEfwks+46dqLxglu4+hR84XcSmG mDVLfSEDjBdwXuHD7IUzQ9yWtrfHL+iy7hW8wp9UapzfCTbZG3txTsIKS4eI4q6iEYZj Nung== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:user-agent :mime-version:content-transfer-encoding; bh=Rq/COgf3JMd/X8cBvc56apr1AUGlDrYGBQGl5tNGZtM=; b=GO1ewvMH3CNYDIeHhYpXZe8ict93JNrCJGAT4RQyS3TAVbZjdStnDSYseh13HmGt7e qDgmwnmVNeAo4B74I+11voBq12H6mqBAW59pDsX1hynoPBFZ7G9l2+/FTaN4Tyg39Ntd 9Aa+1ZZ96j+gYu0OkFC4Yz7UrlKWRmWMdT/ekcCtWsldV9lSF0VPG+mjaQvywtc16lX9 VU0XmMsoPWwixZMxmoKkCgDg1BbMGISwdfbBJkbbmgoDz2naTUTzmtF4Xme9Bh+RVIcg 6mDAhG0kosbhSmSZ+xLBYR1gMxcpYaJv1uVAllVnaDVHp1lh9AcLA7Q1gISIi7LbEB2l TjXQ== X-Gm-Message-State: AJIora/xFq8Zq3sRDFNGAYuTGGJAS4Tan0yl0b8STkpM+TVBctfTkuEl 16BWelZBwzSVJzWt8lEuq0tzssEA8Kj5YQ== X-Google-Smtp-Source: AGRyM1vS5LvYyoqwoJdupe0AecVka8iHDHA29BRIp1BAJbYrnjS8Jqvz5PNe5otYDrfh8vGjRyJOEQ== X-Received: by 2002:a05:6000:81:b0:21b:b090:5479 with SMTP id m1-20020a056000008100b0021bb0905479mr18388855wrx.151.1656437603852; Tue, 28 Jun 2022 10:33:23 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id e29-20020a5d595d000000b0021bc663ed67sm9001326wri.56.2022.06.28.10.33.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jun 2022 10:33:23 -0700 (PDT) From: zimoun Date: Tue, 28 Jun 2022 19:33:18 +0200 Message-ID: <861qv8elr5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=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=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=1656437674; 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: 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=Rq/COgf3JMd/X8cBvc56apr1AUGlDrYGBQGl5tNGZtM=; b=DwAK3U6swVRBtbQznej/AHtISaiwyc022E8toVzF1K3vY/m0bq6qSj+T6qrQm176Wir3xe VNFF77+F3lQR9h/+x00Oy9hTemZPpU3XziwgHzAVQZPve3ME+5uMZiqBxvml+MVZRDeMWq emsUwWJPy+Z7A81GBI4pgDr0qJb9hWPDXesKjFDFc3FvcXuTJ/vQ9jRgWs0jg5Aihcessa XGugze1zfyVpoKmDv/UclS0jc1sOnzvuJ/i1hnCMG+FOACfk5kbQRArd6M718wyhLOuihw KHkB3D/vHYk53LVJVRItYy9H5KMkhq57SHb1IU6I0J8RC6SAp4gTLxA9+bWMGA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656437674; a=rsa-sha256; cv=none; b=cr4D/p4lzZDJjtkr9z+7noNQ6+2AllldmPBaeEwHInhC7TzXxwsEYzhcKSb/grqYUNm9VM tU79eh4X+1pSZUUFf7PeqZ/2fKwzkIJUJOAirE7NNaNDWzWK3v9aVu99Yxi0CCdszUvLXx PoL0OF+/0WN+xP8eHJX4O8Z9LbH79uzWsK6lShUu5TMzeAnTFM0XwSC9wYhwOp35XhPmS3 UNO3LLudOXt0kaO6gXBczUyqN6WRgJmDbbLefZsphOt6DDrlPW31fAPc3x1caj1zkp+pmr qbbCLQ3T/j7jDiGkquNfiuzNr/BTiEzSE19ha5+o4bvRBZnfY0zgvwSA9Y3ZxA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Y4dcRKnP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" X-Migadu-Spam-Score: 4.25 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=Y4dcRKnP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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" X-Migadu-Queue-Id: 602096D61 X-Spam-Score: 4.25 X-Migadu-Scanner: scn0.migadu.com X-TUID: guVzefJS3rmd Hi, Following discussions [1,2], this report tracks issue when cross-compiling the package =E2=80=99azpainter=E2=80=99, if it would make s= ense to cross-compile such package. ;-) For the record, upstream [3] does not have a clear bug tracker where to report the issue. 1: 2: 3: Cheers, simon -------------------- Start of forwarded message -------------------- Subject: [bug#55541] [PATCH] gnu: Add azpainter. From: Maxime Devos Date: Fri, 20 May 2022 18:00:22 +0200 Tobias Kortkamp schreef op vr 20-05-2022 om 13:18 [+0200]: > +=C2=A0=C2=A0=C2=A0 (build-system gnu-build-system) ;actually a home grow= n build system > +=C2=A0=C2=A0=C2=A0 (arguments > +=C2=A0=C2=A0=C2=A0=C2=A0 (list #:tests? #f > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #:phases > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 #~(modify-p= hases %standard-phases > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 (replace 'configure > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 (lambda _ > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (invoke "./configure" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0 (string-append "--prefix=3D" > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 #$output)))) As-is, this home-grown build system is broken when cross-compiling: * When cross-compiling, TARGET-gcc needs to be used instead of gcc. Maybe do (setenv "CC" #$(cc-for-target)) first? * Likewise, TARGET-pkg-config instead of pkg-config (not 100% sure) * It tries to run binaries during ./configure. When cross-compiling, ./conftest will always fail (unless using emulation) and hence always detect =E2=80=98little endian=E2=80=99 but this is incorrect when cross-compiling for big-endian architectures. (Needs some fixes or work-arounds.) You can test with "guix build azpainter --target=3Daarch64-linux-gnu" or such. Also, some other problems. From mlk_studio.c int mFILEreadBE32(FILE *fp,void *buf) { uint8_t v[4]; if(fread(v, 1, 4, fp) < 4) return 1; else { *((uint32_t *)buf) =3D ((uint32_t)v[0] << 24) | (v[1] << 16) | (v[2] << 8) | v[3]; return 0; } } looks like a potential strict-aliasing violation to me, resulting in undefined behaviour -- what if buf is a pointer to an array of, say, doubles? =C2=A0Also a potential alignment problem, though maybe it's only called for sufficiently aligned 'buf'. The strict-aliasing problem can be worked around with -fno-strict-aliasing or maybe just -fno-ipa- strict-aliasing , though I don't know if that's sufficient. Greetings, Maxime. -------------------- End of forwarded message --------------------