From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id eI4yCCwltmJYbgAAbAwnHQ (envelope-from ) for ; Fri, 24 Jun 2022 22:57:16 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QBo5CCwltmIZVwEAauVa8A (envelope-from ) for ; Fri, 24 Jun 2022 22:57:16 +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 77E5C2C8A8 for ; Fri, 24 Jun 2022 22:57:15 +0200 (CEST) Received: from localhost ([::1]:35306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o4qMb-0006ro-Qf for larch@yhetil.org; Fri, 24 Jun 2022 16:57:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53184) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4qMQ-0006rP-Ki for guix-patches@gnu.org; Fri, 24 Jun 2022 16:57:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49760) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o4qMQ-0007nA-5g for guix-patches@gnu.org; Fri, 24 Jun 2022 16:57:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o4qMQ-0008If-5H for guix-patches@gnu.org; Fri, 24 Jun 2022 16:57:02 -0400 Subject: bug#55541: [PATCH] gnu: Add azpainter. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-To: guix-patches@gnu.org Resent-Date: Fri, 24 Jun 2022 20:57:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 55541 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tobias Kortkamp Cc: 55541-done@debbugs.gnu.org Mail-Followup-To: 55541@debbugs.gnu.org, ludo@gnu.org, tobias.kortkamp@gmail.com Received: via spool by 55541-done@debbugs.gnu.org id=D55541.165610418231846 (code D ref 55541); Fri, 24 Jun 2022 20:57:01 +0000 Received: (at 55541-done) by debbugs.gnu.org; 24 Jun 2022 20:56:22 +0000 Received: from localhost ([127.0.0.1]:43656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4qLh-0008HU-5a for submit@debbugs.gnu.org; Fri, 24 Jun 2022 16:56:22 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o4qLe-0008HC-JF for 55541-done@debbugs.gnu.org; Fri, 24 Jun 2022 16:56:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:40308) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4qLZ-0007fr-9c; Fri, 24 Jun 2022 16:56:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=1IKQVK6g2I0x34cJ4iNxeUjHVhj9d0MA3J1YtQ6Or8c=; b=h9gPfG19/lzBDCqiE80C /LXX+eHuB6ApONUEOGK32Nw9y9QZD/FKSCkWEb1aBuyUpFCC2j8WMP2LuzsuOgdESEoUKYnWE+GaK DZrRwsSzXedm2lR0BpigcOoK4C9ztvqsQQE1l1QG5UBtBAKfC09Bc4O7rn51wuD7MbRAx8+NrLbkY PmGHotOSOYMbzOOPwJLM0ZBjv3S/SA/HusHJybnyFJ3iJP7hvqTIaOKgiE4xSgruok5rLufUzIJEq Lyqwp66yTswtsf+jHo+QOXBgOiozmzbM/WUwRCZJwTV/DisjIFYo5S3jDLLvq4EHwgCtiTVkpkd3U VoOwGpgikKelKw==; Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=33956 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o4qLY-0002VL-T7; Fri, 24 Jun 2022 16:56:09 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <6d31ff958ec0c75cbba8324a275315d195a54902.1653045472.git.tobias.kortkamp@gmail.com> Date: Fri, 24 Jun 2022 22:56:06 +0200 In-Reply-To: <6d31ff958ec0c75cbba8324a275315d195a54902.1653045472.git.tobias.kortkamp@gmail.com> (Tobias Kortkamp's message of "Fri, 20 May 2022 13:18:39 +0200") Message-ID: <87sfntu6ft.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (gnu/linux) 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: 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=1656104235; 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-to: 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=1IKQVK6g2I0x34cJ4iNxeUjHVhj9d0MA3J1YtQ6Or8c=; b=H1Hv4VscJZpG05E1WdKirNkCnVAxeUY0gvkTNRxyceP4VYSduYzAdEQ4gn1k0Wj2HkeqfM yFQ72WjM8+O4lf0x2uhT7WhCFv+Uzxba2f79s0A+k4hFqEqtgZ2aD7no4tToGtKTgCrE5Q ClIfK1dS2j8oAv0Jr8tYsEVjQYjmlz/Rev2s826y4WeaN1uWnMCcBTD59dINznuBZK0vKK r+Bc2w1i8X6gjS/ZW2kzVhI24vGSGwPtZgkzOmWUkNOg5VUHWlO5Zk2676XKc692f2pb8f cl+NsLSTljOtL9rWd4welZO+/s527zd9AIOqHHkEy1GXnqOdCSK7TtvEvCIMDw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1656104235; a=rsa-sha256; cv=none; b=kv6+fs0qEYjv9vHN9GBTzhiWq3ExhQHrXhJVnkU2cZTcSibbyY1WvCU0+9iiyKGQOqz6JU IVsaZBXE3cJKdTSUmSO9axbAJT/QsqAAuEVqPjhlD6mAojpag6VzLdOiQqeMh3Avu3BeGf ARpsNqROQdP1Nd6ZDQlzsxxO0YSgJlk8JXTU/P3aGIRM6ZESUkN5DRKWYytIlJ4wwsReUs xZBV0pY9Oubt7H4YF8GIymeY1gqEAM2bvZshbtCUyEqXhdpz1hqbCg+o499qysI4mRqF9Y fT8Y5H7ZyQGoCP/+P/HayU+KgV7hPgurIyrfaqGzGVsjns/qvppm5FFEKwgZPQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=h9gPfG19; dmarc=pass (policy=none) header.from=gnu.org; 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: -4.46 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=h9gPfG19; dmarc=pass (policy=none) header.from=gnu.org; 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: 77E5C2C8A8 X-Spam-Score: -4.46 X-Migadu-Scanner: scn0.migadu.com X-TUID: CY6IIJfK+Hvp Hi Tobias, Tobias Kortkamp skribis: > * gnu/packages/graphics.scm (azpainter): New variable. Applied, thanks! Maxime Devos skribis: > 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 w= hen > 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. These are all good points and I appreciate that you did such a thorough review (audit?) of the package! That said, I think it=E2=80=99s a bit too much to ask of a downstream packa= ger or user to address these issues. As I see it, these issues should be reported upstream and addressed upstream. I hope that makes sense! Thanks, Ludo=E2=80=99.