From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 IBuGNBa8h2JtCwEAbAwnHQ (envelope-from ) for ; Fri, 20 May 2022 18:04:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id iC55NBa8h2KFGAEA9RJhRA (envelope-from ) for ; Fri, 20 May 2022 18:04:38 +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 7787B2F8D6 for ; Fri, 20 May 2022 18:04:38 +0200 (CEST) Received: from localhost ([::1]:43008 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ns57F-0001ia-KL for larch@yhetil.org; Fri, 20 May 2022 12:04:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41852) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ns53q-0007Gj-Vq for guix-patches@gnu.org; Fri, 20 May 2022 12:01:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46060) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ns53l-0002kK-RG for guix-patches@gnu.org; Fri, 20 May 2022 12:01:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ns53l-00062B-PM for guix-patches@gnu.org; Fri, 20 May 2022 12:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55541] [PATCH] gnu: Add azpainter. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 20 May 2022 16:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55541 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Kortkamp , 55541@debbugs.gnu.org Received: via spool by 55541-submit@debbugs.gnu.org id=B55541.165306243521369 (code B ref 55541); Fri, 20 May 2022 16:01:01 +0000 Received: (at 55541) by debbugs.gnu.org; 20 May 2022 16:00:35 +0000 Received: from localhost ([127.0.0.1]:39957 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns53K-0005YL-IP for submit@debbugs.gnu.org; Fri, 20 May 2022 12:00:34 -0400 Received: from albert.telenet-ops.be ([195.130.137.90]:50502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ns53H-0005Tt-Kz for 55541@debbugs.gnu.org; Fri, 20 May 2022 12:00:33 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by albert.telenet-ops.be with bizsmtp id Z40V2700C4UW6Th0640VMU; Fri, 20 May 2022 18:00:29 +0200 Message-ID: From: Maxime Devos Date: Fri, 20 May 2022 18:00:22 +0200 In-Reply-To: <6d31ff958ec0c75cbba8324a275315d195a54902.1653045472.git.tobias.kortkamp@gmail.com> References: <6d31ff958ec0c75cbba8324a275315d195a54902.1653045472.git.tobias.kortkamp@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-r0TL4HaMiCIDAEx/PNbL" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1653062430; bh=jV6kBa1SIGvFrLCu7zK6PSX8YH3BxtuxnzPAanu4Uhk=; h=Subject:From:To:Date:In-Reply-To:References; b=l9Q4EoV9zlUsiTa5R5DOmYhe5WUGEAqXZyHe+YgttbFz/4Swhq4pS5ugQsT9xJqLa vElYuBrbilGJtyY3tUPc5hlLUn7gd/K/JLfWVJjvO5kaJEGrJO7PjfjMMULJ4fGjEC 7YEYZKzAOXK4gCyErxqFj8VH97GuNCVXOIvxDhfIAYtkZmShKt2XLzYWnk3z/EAVRT bDM/8nihmkY9mmMftlfmZHgmnj/d834MX4nGsjCfoSfFldbJQg3xL5Jngi9SJtDHEK PNTsEEwur1qhlnk4BHh49rMI0rEmj9zM/e3ckbhKBu/IFj4o6GxfqtuyvX60HJKxUc DDQ1gdEM9Wq6A== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" 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=1653062678; 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: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=jV6kBa1SIGvFrLCu7zK6PSX8YH3BxtuxnzPAanu4Uhk=; b=gpsfFpMqGzQbA1c7IxGHcIgGXU15JG2dpFN4qVmhzdLttVJTeQulndT/zCsOVFKhTrRVyH FwoSZhqs7rdjOMG4mt51Y5MQYQSYZ7lKNT4K5L52ZdVILH5w37D4r/M9gAv2JyvcTIItOW +J5dbFkLUhweb12pKNDLmt44Q3a7GXzcbFS6ng/HJLJzoJ+I02WGfIV8LBLXXM7RXLGDvx V0p6w7aNQ+Cah48j7vnceKJF69pwsXpT6jjkQX5+d3RCAv4OanZjqrQpHToRwfC+qvLcHV 8ak0d7A86uGJSmfbwB+0t7CGJg0obKgPGjY9KXeBmHOasrDRR8V089VumOo9cQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653062678; a=rsa-sha256; cv=none; b=GvaGbPINcX3udqvYKk6dd/PSzwqU07utz5fba0+iGrZ9C2AQ+KGFLuZnOdu+eOJ4WuteHP pap+tLqgCZBUZslWbvyEG0Y6DOOXIFTBTj2Lca747ng/sESxFsWhZrwiRlCWZUbb0rNpjR 3zwie2jksmZPzqMxDvXKcUJgJ66/5Xh/7UJ5c9wjyDiRSA92wkt2xUF8tKBA+TumJ9HWEB z5b9IcALoG4UrHPPCmyOx4riRyqsOILEKvIc2rRSI6tqffb9R/Qdl5v5YeNDK2ZDNx/p7h wMM49fMTaWuUIMF/tRVPrrhDjPj75+ayhiiNrcKpVrtMMSkJbvfjh8ofLHkGQg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=l9Q4EoV9; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 3.86 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=l9Q4EoV9; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 7787B2F8D6 X-Spam-Score: 3.86 X-Migadu-Scanner: scn1.migadu.com X-TUID: zFJV32GJ04fo --=-r0TL4HaMiCIDAEx/PNbL Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 whe= n 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. --=-r0TL4HaMiCIDAEx/PNbL Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYoe7FhccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7spFAQCg/LlcKpXlqChW7BNlWUMagjKV 54U7auZxytLb84ND8gEA7go3Cxt4h0AFVV6lufVshYbaCklne+fAbMgAwpdPqgo= =I712 -----END PGP SIGNATURE----- --=-r0TL4HaMiCIDAEx/PNbL--