[From nobody Sat Aug  1 09:55:04 2026
Received: (at submit) by bugs.debian.org; 5 Nov 2022 08:24:11 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
 (2021-04-09) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.6 required=4.0 tests=BAYES_00,FOURLA,
 FSL_HELO_NON_FQDN_1,HAS_PACKAGE,HELO_LOCALHOST,MURPHY_DRUGS_REL8,
 RDNS_NONE,SPF_SOFTFAIL autolearn=ham autolearn_force=no
 version=3.4.6-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 36; hammy, 150; neutral, 122; spammy,
 0. spammytokens: hammytokens:0.000-+--armhf, 0.000-+--bookworm, 
 0.000-+--libgmp10, 0.000-+--0xffffffff, 0.000-+--libtinfo6
Return-path: &lt;pdr@piglet.ch&gt;
Received: from [2a04:ee41:6:70cd:dea6:32ff:fee0:b52d] (port=46230
 helo=localhost) by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.94.2) (envelope-from &lt;pdr@piglet.ch&gt;) id 1orETL-00CC2G-4J
 for submit@bugs.debian.org; Sat, 05 Nov 2022 08:24:11 +0000
Received: from pdr by localhost with local (Exim 4.96)
 (envelope-from &lt;pdr@piglet.ch&gt;) id 1orDup-00034Y-30;
 Sat, 05 Nov 2022 08:48:31 +0100
Date: Sat, 5 Nov 2022 08:48:31 +0100
From: Pete Ryland &lt;pdr@piglet.ch&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: elm-compiler: Core package library fails to build on Raspberry Pi
 (armv7l)
Message-ID: &lt;Y2YVTxDLLtOy3nxJ@piglet.ch&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 11.5.1
X-Greylist: delayed 2135 seconds by postgrey-1.36 at buxtehude;
 Sat, 05 Nov 2022 08:24:10 UTC
Delivered-To: submit@bugs.debian.org

Package: elm-compiler
Version: 0.19.1-2
Severity: important
Tags: upstream

Dear Maintainer,

On some platforms, 0xFFFFFFFF does not parse in elm.  This is likely due to the
number parser using Haskell's Int type to represent numbers [1], which is only
guaranteed to be at least 30 bits.  On a 32-bit platform, Int is a signed
32-bit integer, so cannot hold 0xFFFFFFFF as a positive integer.  Oddly,
replacing 0xFFFFFFFF with its decimal equivalent does actually parse correctly.

This alone wouldn't be so bad, however the main problem is that there is an
instance of this in every version of the core library, in src/Array.elm, line
102 [2].  In any case, libraries are normally downloaded on demand, so a fix
would need to be in the aforementioned parser anyway.

A workaround is to let the first compilation with elm fail, then patch the
downloaded library (in ~/.elm/0.19.1/packages/elm/core/1.0.*/src/Array.elm) by
replacing 0xFFFFFFFF with 4294967295 and all subsequent compilations should
then succeed.

[1] https://sources.debian.org/src/elm-compiler/0.19.1-2/compiler/src/Parse/Number.hs/
[2] https://sources.debian.org/src/elm-compiler/0.19.1-2/packages/elm/core/1.0.2/src/Array.elm/#L102

Regards,
Pete

-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: armhf (armv7l)

Kernel: Linux 5.15.74-v7l+ (SMP w/4 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_AU.UTF-8), LANGUAGE=en_AU.UTF-8
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages elm-compiler depends on:
ii  libc6      2.35-4
ii  libffi8    3.4.4-1
ii  libgmp10   2:6.2.1+dfsg1-1.1
ii  libtinfo6  6.3+20220423-2
ii  zlib1g     1:1.2.11.dfsg-4.1

elm-compiler recommends no packages.

elm-compiler suggests no packages.

-- no debconf information
]