Subject: bug#43513: json-c build failure (on armhf-linux) while trying to build u-boot

From: Danny Milosavljevic <[email-masked]>
Date: Sat, 26 Sep 2020 12:53:20 +0200

Hi Ludo,

On Fri, 25 Sep 2020 18:25:42 +0200
Danny Milosavljevic <[email-masked]> wrote:

> On Fri, 25 Sep 2020 18:00:05 +0200
> Ludovic Courtès <[email-masked]> wrote:
> 
> > You’re listed in overdrive.scm in maintenance.git, so you must have
> > access to overdrive1.guixsd.org:52522.  
> 
> Indeed, I do.
> 
> Thanks!

I'd like to test what happens if one builds json-c on an aarch64 host
for i686.

Could we enable qemu-binfmt for i686 on an aarch64 host for me to test it?

One machine is enough--I'd just run

  guix environment -s i686-linux gcc-toolchain -- gcc -o a00 -D_FILE_OFFSET_BITS=xxx a00.c

and then later

  guix build -s i686-linux json-c

on it.

a00.c:

#include <stdio.h>
#include <errno.h>
#include <assert.h>
#include <dirent.h>
#if defined( __ILP32__ )
#warning ILP32
#endif

int main() {
        DIR* d;
        struct dirent* ent;
        d = opendir("tmp");
        errno = 0;
        assert(sizeof(ent->d_off) == sizeof(off_t));
        while ((ent = readdir(d)) != NULL) {
                printf("off=%llX, ino=%llX\n", (unsigned long long) ent->d_off, (unsigned long long) ent->d_ino);
        }
        if (errno)
                perror("readdir");
        return sizeof(off_t);
}