bug#74217: Bootstrapping Zig with no Binary Blobs

2024-12-31 Thread Hilton Chain
On Thu, 28 Nov 2024 19:08:09 +0800, Hilton Chain wrote: > > I think this is mostly ready ( again :) ). If there's nothing else missing, > I'll post the current status and call for packages to test the build system on > guix-devel. Applied Zig bootstrap as 40b9f33066...42e32d52c3. I'll delete wip

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-12-07 Thread Hilton Chain
On Thu, 05 Dec 2024 14:27:14 +0800, Hilton Chain wrote: > > On Mon, 02 Dec 2024 13:11:53 +0800, > Hilton Chain wrote: > > > > On Thu, 28 Nov 2024 19:08:09 +0800, > > Hilton Chain wrote: > > > > > > Made "#:zig-inputs" a private keyword, its value will be passed to inputs > > > like > > > cargo-bui

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-12-04 Thread Hilton Chain
On Mon, 02 Dec 2024 13:11:53 +0800, Hilton Chain wrote: > > On Thu, 28 Nov 2024 19:08:09 +0800, > Hilton Chain wrote: > > > > Made "#:zig-inputs" a private keyword, its value will be passed to inputs > > like > > cargo-build-system (the build system doesn't extract the whole closure for > > now, t

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-12-01 Thread Efraim Flashner
On Sun, Dec 01, 2024 at 09:32:01PM +0200, Motiejus Jakštys wrote: > On Fri, Nov 29, 2024 at 2:25 PM Hilton Chain wrote: > > > > On Fri, 29 Nov 2024 04:53:57 +0800, > > Motiejus Jakštys wrote: > > > > > > [1 ] > > > On Thu, Nov 28, 2024 at 5:20 PM Hilton Chain wrote: > > > > Thanks! Then I'll ke

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-12-01 Thread Hilton Chain
On Thu, 28 Nov 2024 19:08:09 +0800, Hilton Chain wrote: > > Made "#:zig-inputs" a private keyword, its value will be passed to inputs like > cargo-build-system (the build system doesn't extract the whole closure for > now, this can be added in the future depending on how Zig ecosystem develops). J

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-12-01 Thread Motiejus Jakštys
On Fri, Nov 29, 2024 at 2:25 PM Hilton Chain wrote: > > On Fri, 29 Nov 2024 04:53:57 +0800, > Motiejus Jakštys wrote: > > > > [1 ] > > On Thu, Nov 28, 2024 at 5:20 PM Hilton Chain wrote: > > > Thanks! Then I'll keep abilists removed before we can reproduce one :) > > > > OK here it is for 0.11:

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-29 Thread Hilton Chain via Bug reports for GNU Guix
On Fri, 29 Nov 2024 20:25:43 +0800, Hilton Chain wrote: > > Just realised the weekend is coming, I'll send to guix-devel soon. ;) https://lists.gnu.org/archive/html/guix-devel/2024-11/msg00271.html

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-29 Thread Hilton Chain via Bug reports for GNU Guix
On Fri, 29 Nov 2024 04:53:57 +0800, Motiejus Jakštys wrote: > > [1 ] > On Thu, Nov 28, 2024 at 5:20 PM Hilton Chain wrote: > > Thanks! Then I'll keep abilists removed before we can reproduce one :) > > OK here it is for 0.11: > > 1. check out glibc-abi-tool 13576b1ea957882be7ff2c99f4cdc274549302

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-28 Thread Motiejus Jakštys
On Thu, Nov 28, 2024 at 5:20 PM Hilton Chain wrote: > Thanks! Then I'll keep abilists removed before we can reproduce one :) OK here it is for 0.11: 1. check out glibc-abi-tool 13576b1ea957882be7ff2c99f4cdc27454930219 2. rm -fr glibc/2.3{5,6,7,8} 3. apply the attached patch. 4. /path/to/zig-0.1

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-28 Thread Motiejus Jakštys
On Thu, Nov 28, 2024 at 5:20 PM Hilton Chain wrote: > > On Thu, 28 Nov 2024 20:41:10 +0800, > Motiejus Jakštys wrote: > > > > On Thu, Nov 28, 2024 at 1:08 PM Hilton Chain wrote: > > > > > > <...> together with the concern on generated files. > > > > Hi Hilton, > > > > The only remaining, to my kn

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-28 Thread Motiejus Jakštys
On Thu, Nov 28, 2024 at 10:12 PM Motiejus Jakštys wrote: > > On Thu, Nov 28, 2024 at 5:20 PM Hilton Chain wrote: > > Thanks! Then I'll keep abilists removed before we can reproduce one :) Ahh, now I realized you probably meant removed in 0.11. Sorry for the noise! Motiejus

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-28 Thread Hilton Chain via Bug reports for GNU Guix
On Thu, 28 Nov 2024 20:41:10 +0800, Motiejus Jakštys wrote: > > On Thu, Nov 28, 2024 at 1:08 PM Hilton Chain wrote: > > > > <...> together with the concern on generated files. > > Hi Hilton, > > The only remaining, to my knowledge, binary file is `abilists`, which, > once you have `zig` binary, ca

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-28 Thread Motiejus Jakštys
On Thu, Nov 28, 2024 at 1:08 PM Hilton Chain wrote: > > <...> together with the concern on generated files. Hi Hilton, The only remaining, to my knowledge, binary file is `abilists`, which, once you have `zig` binary, can be generated this way: git clone https://github.com/ziglang/glibc-abi-too

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-28 Thread Hilton Chain via Bug reports for GNU Guix
I started to learn Zig these days and adjusted patches for Zig a bit. Other than this, I have added a install-source? argument to zig-build-system, it can now install package source to "/src/-". "-Dtarget" is used in zig-build-system's native builds as well, same as Zig for reproducibility. Made

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-21 Thread Hilton Chain via Bug reports for GNU Guix
On Tue, 19 Nov 2024 21:13:50 +0800, Hilton Chain wrote: > > I'll take a look at Zig package manager support. Added support for Zig package manager (build.zig.zon) and switched default Zig to zig-0.13, please see the two DRAFT commits. I have also updated and added some packages as examples. Sinc

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-19 Thread Hilton Chain via Bug reports for GNU Guix
On Sun, 17 Nov 2024 22:51:48 +0800, Hilton Chain wrote: > > Thanks, I have ported all patches and pushed. GUIX_ZIG_LIBC_DIR is changed to > GUIX_ZIG_GLIBC_LINKER and is set as full path in Guix side because I don't > want > mess with strings in Zig side... Reworked this, patched Zig to search dy

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-18 Thread Hilton Chain via Bug reports for GNU Guix
On Sun, 17 Nov 2024 22:51:48 +0800, Hilton Chain wrote: > > The reproducibility issue is related to kernel version from target ("native" > by > default) information, to address this we need to specify a target for native > builds too. Specifying a target makes Zig behave like in cross-compilation

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-17 Thread Hilton Chain via Bug reports for GNU Guix
On Sun, 17 Nov 2024 15:16:13 +0800, Efraim Flashner wrote: > > [1 ] > On Fri, Nov 15, 2024 at 10:30:40PM +0800, Hilton Chain wrote: > > On Fri, 15 Nov 2024 11:29:10 +0800, > > Hilton Chain wrote: > > > > > > Good news: Thanks to this diff, I know how to add libc to RUNPATH now :) > > > > > > Anot

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-16 Thread Efraim Flashner
On Fri, Nov 15, 2024 at 10:30:40PM +0800, Hilton Chain wrote: > On Fri, 15 Nov 2024 11:29:10 +0800, > Hilton Chain wrote: > > > > Good news: Thanks to this diff, I know how to add libc to RUNPATH now :) > > > > Another forced push, I have ensured consistent behavior for > > (CROSS_)?LIBRARY_PATH an

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-16 Thread Hilton Chain via Bug reports for GNU Guix
On Sat, 16 Nov 2024 14:54:55 +0800, Hilton Chain wrote: > > > 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

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-16 Thread Hilton Chain via Bug reports for GNU Guix
On Sun, 17 Nov 2024 01:03:59 +0800, Efraim Flashner wrote: > > [1 ] > On Sat, Nov 16, 2024 at 02:54:55PM +0800, Hilton Chain wrote: > > 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 > >

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-16 Thread Efraim Flashner
On Sat, Nov 16, 2024 at 02:54:55PM +0800, Hilton Chain wrote: > 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 wi

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-16 Thread Hilton Chain via Bug reports for GNU Guix
On Sat, 16 Nov 2024 15:13:40 +0800, Motiejus Jakštys wrote: > > On Sat, Nov 16, 2024 at 8:55 AM Hilton Chain wrote: > > > > On Fri, 15 Nov 2024 22:30:40 +0800, > > Hilton Chain wrote: > > > > > > Also for reproducibility, bin/zig is the only file differs and here's the > > > diff, > > > I don't

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-15 Thread Hilton Chain via Bug reports for GNU Guix
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"

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-15 Thread Motiejus Jakštys
On Sat, Nov 16, 2024 at 8:55 AM Hilton Chain wrote: > > On Fri, 15 Nov 2024 22:30:40 +0800, > Hilton Chain wrote: > > > > 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

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-15 Thread Hilton Chain via Bug reports for GNU Guix
On Fri, 15 Nov 2024 11:29:10 +0800, Hilton Chain wrote: > > Good news: Thanks to this diff, I know how to add libc to RUNPATH now :) > > Another forced push, I have ensured consistent behavior for > (CROSS_)?LIBRARY_PATH and added libc RUNPATH without restoring the behavior > passing '-lc' to linke

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-14 Thread Motiejus Jakštys
On Thu, Nov 14, 2024 at 11:22 AM Hilton Chain wrote: > > On Thu, 14 Nov 2024 14:05:52 +0800, > Hilton Chain wrote: > I also have concern for Zig's relying on /usr/bin/env (Zig uses an ELF file to > find dynamic linker, env is chosen for it's well-known). We have patched this > reference, not sure

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-14 Thread Hilton Chain via Bug reports for GNU Guix
On Thu, 14 Nov 2024 17:41:04 +0800, Efraim Flashner wrote: > > [1 ] > On Thu, Nov 14, 2024 at 05:22:17PM +0800, Hilton Chain wrote: > > 2. Pass libc to Zig's linker > > This was the behavior in 0.9, but changed due to issue on macOS[1]. (btw, > > our > > CPLUS_INCLUDE_PATH also has issue with ma

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-14 Thread Efraim Flashner
On Thu, Nov 14, 2024 at 05:22:17PM +0800, Hilton Chain wrote: > On Thu, 14 Nov 2024 14:05:52 +0800, > Hilton Chain wrote: > > > > Currently I'm 1. modifying each-lib-rpath option of 'zig build'. 2. passing > > libc to linker. I'll write details on this when succeed. > > 1. Modification about eac

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-14 Thread Hilton Chain via Bug reports for GNU Guix
On Thu, 14 Nov 2024 14:05:52 +0800, Hilton Chain wrote: > > Currently I'm 1. modifying each-lib-rpath option of 'zig build'. 2. passing > libc to linker. I'll write details on this when succeed. 1. Modification about each-lib-rpath. --8<---cut here---start->8-

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-13 Thread Hilton Chain via Bug reports for GNU Guix
On Thu, 14 Nov 2024 09:05:41 +0800, Hilton Chain wrote: > > On Thu, 14 Nov 2024 07:40:05 +0800, > Hilton Chain wrote: > > > > I thought Zig was using lld as a library for linking. Just looked at > > src/link/Elf.zig, this is not true, it invokes ld.lld. > > > > I have more time today. I'll test t

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-13 Thread Hilton Chain via Bug reports for GNU Guix
On Thu, 14 Nov 2024 07:40:05 +0800, Hilton Chain wrote: > > On Thu, 14 Nov 2024 02:10:44 +0800, > Efraim Flashner wrote: > > > > > I think this is due to Zig's implemention of its own linking logic, which > > > bypasses our ld-wrapper. > > > > I wonder if switching from lld to make-lld-wrapper woul

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-13 Thread Hilton Chain via Bug reports for GNU Guix
On Thu, 14 Nov 2024 02:10:44 +0800, Efraim Flashner wrote: > > > I think this is due to Zig's implemention of its own linking logic, which > > bypasses our ld-wrapper. > > I wonder if switching from lld to make-lld-wrapper would make a > difference here. Thanks for mentioning! This should do the

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-13 Thread Efraim Flashner
On Thu, Nov 14, 2024 at 12:46:59AM +0800, Hilton Chain wrote: > Hello everyone, > > With a new forced push (and new rebuilds, sorry), wip-zig-bootstrap is mostly > ready (for me) now. Please take a look at the first few commits, as I'm > changing Zig's behavior there, here are some additional not

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-13 Thread Hilton Chain via Bug reports for GNU Guix
Hello everyone, With a new forced push (and new rebuilds, sorry), wip-zig-bootstrap is mostly ready (for me) now. Please take a look at the first few commits, as I'm changing Zig's behavior there, here are some additional notes: To Efraim: Can adding pkg-config to native-inputs avoid the ncdu

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-11 Thread Efraim Flashner
On Mon, Nov 11, 2024 at 07:56:30PM +0800, Hilton Chain wrote: > Hi Efraim, > > On Mon, 11 Nov 2024 19:42:25 +0800, > Efraim Flashner wrote: > > > > Ok, you've convinced me. I guess I finally need to get zig@0.10 > > building correctly on riscv64. > > > > Expect plenty of FIXUP and SQUASH commits

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-11 Thread Hilton Chain via Bug reports for GNU Guix
Hi Efraim, On Mon, 11 Nov 2024 19:42:25 +0800, Efraim Flashner wrote: > > Ok, you've convinced me. I guess I finally need to get zig@0.10 > building correctly on riscv64. > > Expect plenty of FIXUP and SQUASH commits in the future. I have something to fix with a force-push on wip-zig-bootstrap,

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-11 Thread Efraim Flashner
On Thu, Nov 07, 2024 at 09:19:23AM +0800, Hilton Chain wrote: > Hi Ekaitz, > > On Wed, 06 Nov 2024 05:47:48 +0800, > Ekaitz Zarraga wrote: > > > > Hi, > > > > In order to include modern versions of Zig (Zig 0.12+) in Guix, we need to > > remove the binary blobs. > > > > I open this issue to track

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-07 Thread Ekaitz Zarraga
Hi I can try to make the first few steps as packages tomorrow, WDYT? Sure! Send the patches to this issue and I'll review when I have time. Thanks for the energy!

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-07 Thread Noé Lopez via Bug reports for GNU Guix
>Excited to know Zig developers are willing to help with bootstrapping! We >shouldn't miss this chance :) > >I'll look into replicating the current progress this weekend. Anyone reading >this mail wants to join in? Hey Hilton and Ekaitz, I’m interested in this :) From what I can see the current

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-06 Thread Hilton Chain via Bug reports for GNU Guix
Hi Ekaitz, On Wed, 06 Nov 2024 05:47:48 +0800, Ekaitz Zarraga wrote: > > Hi, > > In order to include modern versions of Zig (Zig 0.12+) in Guix, we need to > remove the binary blobs. > > I open this issue to track this effort and store information about the > process. > > Some Guix user is trying

bug#74217: Bootstrapping Zig with no Binary Blobs

2024-11-05 Thread Ekaitz Zarraga
Hi, In order to include modern versions of Zig (Zig 0.12+) in Guix, we need to remove the binary blobs. I open this issue to track this effort and store information about the process. Some Guix user is trying to achieve the same goal: https://git.jakstys.lt/motiejus/zig-repro And discussi