GNU bug report logs - #74217
Bootstrapping Zig with no Binary Blobs

Previous Next

Package: guix;

Reported by: Ekaitz Zarraga <ekaitz <at> elenq.tech>

Date: Tue, 5 Nov 2024 21:49:02 UTC

Owned by: Ekaitz Zarraga <ekaitz <at> elenq.tech>

Severity: normal

Done: Hilton Chain <hako <at> ultrarare.space>

Bug is archived. No further changes may be made.

Full log


Message #72 received at 74217 <at> debbugs.gnu.org (full text, mbox):

From: Hilton Chain <hako <at> ultrarare.space>
To: 74217 <at> debbugs.gnu.org
Cc: Motiejus Jakštys
 <motiejus <at> jakstys.lt>, Noé Lopez <noe <at> xn--no-cja.eu>,
 dan <i <at> dan.games>, Efraim Flashner <efraim <at> flashner.co.il>,
 Ekaitz Zarraga <ekaitz <at> elenq.tech>
Subject: Re: Bootstrapping Zig with no Binary Blobs
Date: Sat, 16 Nov 2024 14:54:55 +0800
On Fri, 15 Nov 2024 22:30:40 +0800,
Hilton Chain wrote:
>
> I have locally made the "use-system-paths" patch larger so that Zig can really
> honor "CROSS_" environment variables.
>
> The next issue is cross building with pkg-config.  Zig only invokes
> "pkg-config", but we don't have a "pkg-config" with search path for target
> inputs.  I can add a pkg-config-for-zig to workaround this, and then... It's
> dynamic linker path, I'll look into it soon.

Adding a file with content like the following and passing --libc <this file> to
zig works, RUNPATH is correct and no need to set CC then.

--8<---------------cut here---------------start------------->8---
include_dir=/gnu/store/dfx90sc16nphh6bd07sjyri6x4s51zni-glibc-cross-aarch64-linux-gnu-2.39/include
sys_include_dir=/gnu/store/dfx90sc16nphh6bd07sjyri6x4s51zni-glibc-cross-aarch64-linux-gnu-2.39/include
crt_dir=/gnu/store/dfx90sc16nphh6bd07sjyri6x4s51zni-glibc-cross-aarch64-linux-gnu-2.39/lib
msvc_lib_dir=
kernel32_lib_dir=
gcc_dir=
--8<---------------cut here---------------end--------------->8---

For cross builds interpreter path like /lib/ld-linux-aarch64.so.1 is used in
output binary, I'll find a way to fix it.

> Also for reproducibility, bin/zig is the only file differs and here's the diff,
> I don't know about this part so I currently have no idea on fixing it.

This seem to be an upstream issue, Zig is reproducible only on the same machine.
I'll verify it and report to upstream.




This bug report was last modified 193 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.