Subject: Re: [bug#54235] [PATCH 2/3] gnu: Add ck.

From: Maxime Devos <[email-masked]>
Date: Mon, 07 Mar 2022 21:57:35 +0100

Maxim Cournoyer schreef op ma 07-03-2022 om 13:57 [-0500]:
> It seems to be handled alright as it is; at least I was able to build
> with:
> 
> ./pre-inst-env guix build --target=arm-linux-gnueabihf ck
> [...]
> done with offloaded '/gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv'
> successfully built /gnu/store/m1gv4a1q9cv3ig9v4bymb9wd9l6g93y3-ck-0.7.1.drv
> /gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1

Unfortunately, that is a rather unreliable check.
This only checks that 'ck' could be compiled, but it does not check
that 'ck' was actually compiled for arm-linux-gnueabihf instead of
(%current-system).  It might still be the case that 'gcc' is used
instead of '$TARGET-gcc'

Could you run 'file' against /gnu/store/[...]/bin/* to verify things?
On my x86-64-linux-gnu system, for a native binary, I get:

a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically
linked, interpreter /gnu/store/5h2w4qi9hk1qzzgi1w83220ydslinr4s-glibc-
2.33/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

I'm not sure what you would get for an arm-linux-gnueabihf but it
probably should not include '64-bit' or 'x86-64'.

Assuming you have QEMU emulation _disabled_, you can also try running
the binary on your (presumably non-arm) system and verify that it fails
to start.

Greetings,
Maxime.