Received: (at submit) by debbugs.gnu.org; 28 Jun 2022 17:33:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jun 28 13:33:40 2022
Received: from localhost ([127.0.0.1]:56247 helo=debbugs.gnu.org)
by debbugs.gnu.org with esmtp (Exim 4.84_2)
(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
id 1o6F5o-0004gO-1E
for submit <at> 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 <zimon.toutoune@HIDDEN>) id 1o6F5b-0004g6-Bw
for submit <at> 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 <zimon.toutoune@HIDDEN>)
id 1o6F5b-0007FH-53
for bug-guix@HIDDEN; 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 <zimon.toutoune@HIDDEN>)
id 1o6F5Z-0001et-Ei
for bug-guix@HIDDEN; Tue, 28 Jun 2022 13:33:26 -0400
Received: by mail-wr1-x429.google.com with SMTP id v9so3130863wrp.7
for <bug-guix@HIDDEN>; 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 <bug-guix@HIDDEN>
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 28 Jun 2022 10:33:23 -0700 (PDT)
From: zimoun <zimon.toutoune@HIDDEN>
To: bug-guix@HIDDEN
Subject: azpainter does not cross-compile
Date: Tue, 28 Jun 2022 19:33:18 +0200
Message-ID: <861qv8elr5.fsf@HIDDEN>
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@HIDDEN; 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-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>,
<mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)
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: <http://issues.guix.gnu.org/issue/55541>
2: <https://yhetil.org/guix/87r13aifi3.fsf_-_@HIDDEN>
3: <https://gitlab.com/azelpg/azpainter>
Cheers,
simon
-------------------- Start of forwarded message --------------------
Subject: [bug#55541] [PATCH] gnu: Add azpainter.
From: Maxime Devos <maximedevos@HIDDEN>
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 --------------------
zimoun <zimon.toutoune@HIDDEN>:bug-guix@HIDDEN.
Full text available.bug-guix@HIDDEN:bug#56285; Package guix.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.