unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* zig-build DNS issue (ghostty build)
@ 2025-01-03  2:56 Benjamin Slade
  2025-01-03  5:08 ` Carlo Zancanaro
  2025-01-03 11:33 ` Murilo
  0 siblings, 2 replies; 5+ messages in thread
From: Benjamin Slade @ 2025-01-03  2:56 UTC (permalink / raw)
  To: help-guix

Hi Guix,

I've got the start of a Guix package build for the new [Ghostty terminal emulator], but it gets stuck when the zig-build tries fetch some dependencies, with what I think is a DNS (!) issue:
,----
|     ....
|       starting phase `patch-generated-file-shebangs'
|   phase `patch-generated-file-shebangs' succeeded after 0.0 seconds
|   starting phase `build'
|   running: ("zig" "build" "--prefix" "" "--prefix-lib-dir" "lib" "--prefix-exe-dir" "bin" "--prefix-include-dir" "include" "--verbose" "-Dtarget=x86_64-linux-gnu" "-j8")
|   /tmp/guix-build-ghostty-1.0.1.drv-0/source/build.zig.zon:8:20: error: unable to connect to server: TemporaryNameServerFailure
|   /tmp/guix-build-ghostty-1.0.1.drv-0/source/build.zig.zon:17:20: error: unable to connect to server: TemporaryNameServerFailure
|   /tmp/guix-build-ghostty-1.0.1.drv-0/source/build.zig.zon:21:20: error: unable to connect to server: TemporaryNameServerFailure
|   /tmp/guix-build-ghostty-1.0.1.drv-0/source/build.zig.zon:25:20: error: unable...
|   [a number of similar errors]
|   error: in phase 'build': uncaught exception:
| %exception #<&invoke-error program: "zig" arguments: ("build" "--prefix" "" "--prefix-lib-dir" "lib" "--prefix-exe-dir" "bin" "--prefix-include-dir" "include" "--verbose" "-Dtarget=x86_64-linux-gnu" "-j8") exit-status: 1 term-signal: #f stop-signal: #f> 
| phase `build' failed after 0.2 seconds
| .....
`----
I can see a similar issue discussed at <https://github.com/ziglang/zig/issues/14636>

With one of the fixes being "works after changing DNS servers from my router to 8.8.8.8 and 8.8.4.4" [<https://github.com/ziglang/zig/issues/14636#issuecomment-1894254834>], and I note that the Guix `/etc/resolv.conf' points at my local network/router.

I'm not sure what the best workaround is for this. (I'm not even sure how to temporarily change my local DNS resolver on Guix to see if I can get it to build locally, assuming that a similar workaround might work as for 'floooh' on Ubuntu.)

best,
 —Benjamin
 --
 '(Dr Benjamin Slade (he/him)
     (website . <https://lambda-y.net>)     
     `(pgp_fp: ,(B20E 444C FA80 B5F8 15FA  4AD8 6FBF CD68 3B05 2B84))
       "sent by [mu4e] 1.12.8 in [Emacs] 30.0.92 with [org-msg] on [GNU Guix] ([Linux])")


[Ghostty terminal emulator] <https://ghostty.org>

[mu4e] <https://www.djcbsoftware.nl/code/mu/mu4e.html>

[Emacs] <https://www.gnu.org/software/emacs/>

[org-msg] <https://github.com/jeremy-compostella/org-msg>

[GNU Guix] <https://guix.gnu.org/>

[Linux] <https://opensource.com/resources/linux>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zig-build DNS issue (ghostty build)
  2025-01-03  2:56 zig-build DNS issue (ghostty build) Benjamin Slade
@ 2025-01-03  5:08 ` Carlo Zancanaro
  2025-01-04  1:02   ` Benjamin Slade
  2025-01-03 11:33 ` Murilo
  1 sibling, 1 reply; 5+ messages in thread
From: Carlo Zancanaro @ 2025-01-03  5:08 UTC (permalink / raw)
  To: Benjamin Slade; +Cc: help-guix

Hi Benjamin,

On Thu, Jan 02 2025, Benjamin Slade wrote:
> I've got the start of a Guix package build for the new [Ghostty
> terminal emulator], but it gets stuck when the zig-build tries fetch
> some dependencies, with what I think is a DNS (!) issue:

Guix builds happen in a container which does not have access to the
network. Thus, you do have a DNS issues, but it's not one you can
resolve within a Guix package build.

Looking at the Ghostty documentation, their main build is with Nix,
which has the same network restriction, so that's a good sign that this
can be made to work. Looking at their PACKAGING.md[1], it says that the
only step which requires an internet connection is running this command:

--8<---------------cut here---------------start------------->8---
./nix/build-support/fetch-zig-cache.sh
--8<---------------cut here---------------end--------------->8---

Looking in that script[2], it basically just runs "zig build --fetch",
with some extra work to fetch some other dependencies. I'm not familiar
with Zig builds, but looking at build.zig.zon[3] it seems to list the
required dependencies.

To get a Guix package building you may need to package these
dependencies, and then provide them as inputs to your Ghostty package.
I'm not sure whether the Zig build system is set up to handle this
properly. I couldn't find any examples of Zig packages with Zig
dependencies, but I didn't try very hard.

I hope that helps,

Carlo

[1]: https://github.com/ghostty-org/ghostty/blob/e2f9eb6a6f4dc2108f91293938374c0ed314dcb8/PACKAGING.md
[2]: https://github.com/ghostty-org/ghostty/blob/e2f9eb6a6f4dc2108f91293938374c0ed314dcb8/nix/build-support/fetch-zig-cache.sh
[3]: https://github.com/ghostty-org/ghostty/blob/e2f9eb6a6f4dc2108f91293938374c0ed314dcb8/build.zig.zon


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zig-build DNS issue (ghostty build)
  2025-01-03  2:56 zig-build DNS issue (ghostty build) Benjamin Slade
  2025-01-03  5:08 ` Carlo Zancanaro
@ 2025-01-03 11:33 ` Murilo
  2025-01-03 20:23   ` Benjamin Slade
  1 sibling, 1 reply; 5+ messages in thread
From: Murilo @ 2025-01-03 11:33 UTC (permalink / raw)
  To: Benjamin Slade, help-guix

On Thu Jan 2, 2025 at 11:56 PM -03, Benjamin Slade wrote:
> Hi Guix,
>
> I've got the start of a Guix package build for the new [Ghostty terminal emulator]

Hi, you might want to check [1] and [2].

Best regards,
Murilo

[1]: https://issues.guix.gnu.org/75237
[2]: https://toys.whereis.social/?search=ghostty


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zig-build DNS issue (ghostty build)
  2025-01-03 11:33 ` Murilo
@ 2025-01-03 20:23   ` Benjamin Slade
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Slade @ 2025-01-03 20:23 UTC (permalink / raw)
  To: Murilo; +Cc: help-guix

Many thanks, Murilo! This is excellent. (I see zen-browser is there as well.)



On Fri, 03 Jan 2025 at 08:33 -0300, Murilo <murilo@disroot.org> wrote:

> On Thu Jan 2, 2025 at 11:56 PM -03, Benjamin Slade wrote:
>> Hi Guix,
>>
>> I've got the start of a Guix package build for the new [Ghostty terminal emulator]
>
> Hi, you might want to check [1] and [2].
>
> Best regards,
> Murilo
>
> [1]: <https://issues.guix.gnu.org/75237>
> [2]: <https://toys.whereis.social/?search=ghostty>

best,
 —Benjamin
 --
 '(Dr Benjamin Slade (he/him)
     (website . <https://lambda-y.net>)     
     `(pgp_fp: ,(B20E 444C FA80 B5F8 15FA  4AD8 6FBF CD68 3B05 2B84))
       "sent by [mu4e] 1.12.8 in [Emacs] 30.0.92 with [org-msg] on [GNU Guix] ([Linux])")


[mu4e] <https://www.djcbsoftware.nl/code/mu/mu4e.html>

[Emacs] <https://www.gnu.org/software/emacs/>

[org-msg] <https://github.com/jeremy-compostella/org-msg>

[GNU Guix] <https://guix.gnu.org/>

[Linux] <https://opensource.com/resources/linux>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: zig-build DNS issue (ghostty build)
  2025-01-03  5:08 ` Carlo Zancanaro
@ 2025-01-04  1:02   ` Benjamin Slade
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Slade @ 2025-01-04  1:02 UTC (permalink / raw)
  To: Carlo Zancanaro; +Cc: help-guix

Thanks, Carlo. That's very helpful and it makes more sense now what was going on. (I knew about the Guix containerisation, but somehow didn't think of it here; but it's clear in retrospect.)


best,
 —Benjamin
 --
 '(Dr Benjamin Slade (he/him)
     (website . <https://lambda-y.net>)     
     `(pgp_fp: ,(B20E 444C FA80 B5F8 15FA  4AD8 6FBF CD68 3B05 2B84))
       "sent by [mu4e] 1.12.8 in [Emacs] 30.0.92 with [org-msg] on [GNU Guix] ([Linux])")


[mu4e] <https://www.djcbsoftware.nl/code/mu/mu4e.html>

[Emacs] <https://www.gnu.org/software/emacs/>

[org-msg] <https://github.com/jeremy-compostella/org-msg>

[GNU Guix] <https://guix.gnu.org/>

[Linux] <https://opensource.com/resources/linux>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-04 16:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-03  2:56 zig-build DNS issue (ghostty build) Benjamin Slade
2025-01-03  5:08 ` Carlo Zancanaro
2025-01-04  1:02   ` Benjamin Slade
2025-01-03 11:33 ` Murilo
2025-01-03 20:23   ` Benjamin Slade

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).