[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error when compiling code on armv7hl
From: |
Erik Auerswald |
Subject: |
Re: Error when compiling code on armv7hl |
Date: |
Sat, 8 Jan 2022 05:06:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
Hello Jiri,
On 07.01.22 12:37, Jiri Hladky wrote:
Hello Assaf,
I'm not Assaf, but I'll try to help anyway.
I'm a datamash package maintainer for Fedora. I have tried to compile
version 1.7, but I'm getting an error when compiling decorate.c for armv7hl
architectures (all other arches compile just fine).
Could you please have a look? It seems to be an integer type mismatch.
The problem seems to be that the "%zu" format specifier is used,
but that is specific to "size_t". I would expect that "size_t"
often is practically identical to "intmax_t", so this often works.
From the error message I would assume that on armv7hl
sizeof(size_t) != sizeof(intmax_t).
It seems to me as if line src/decorate.c:445 should use either
"%jd" or "%"PRIdMAX instead of "%zu".
Since PRIuMAX is already used in datamash, use of PRIdMAX may be
preferable.
The two attached patches against git HEAD work on my x86-64
GNU/Linux system, perhaps they work for your Fedora builds, too?
You only need one or the other patch, not both, depending if you
prefer "%jd" or "%"PRIdMAX.
HTH,
Erik
datamash-decorate-possible_armv7hl_build_fix-variant_1.patch
Description: Text Data
datamash-decorate-possible_armv7hl_build_fix-variant_2.patch
Description: Text Data