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

From: Maxim Cournoyer <[email-masked]>
Date: Mon, 07 Mar 2022 20:47:08 -0500

Hi Maxime,

Maxime Devos <[email-masked]> writes:

> 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'.

Good catch, you are right:

--8<---------------cut here---------------start------------->8---
$ file /gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1/lib/libck.so.0.7.1 
/gnu/store/n6ipif548pxk0319kpchpxa7h5z6pzcm-ck-0.7.1/lib/libck.so.0.7.1: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, not stripped
--8<---------------cut here---------------end--------------->8---

I'll be sending a V2 once I've fixed cross-compilation.  Another -1 for
custom/borked configure script, eh!

Thanks,

Maxim