Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 914101 - dev-lang/zig-0.11.0 - Failed to run command: ./stage3/bin/zig build std-docs --prefix /var/tmp/portage/dev-lang/zig-0.11.0/work/zi
Summary: dev-lang/zig-0.11.0 - Failed to run command: ./stage3/bin/zig build std-docs ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Eric Joldasov
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-09-13 08:14 UTC by Toralf Förster
Modified: 2023-10-27 03:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,17.88 KB, text/plain)
2023-09-13 08:14 UTC, Toralf Förster
Details
dev-lang:zig-0.11.0:20230913-061551.log (dev-lang:zig-0.11.0:20230913-061551.log,144.68 KB, text/plain)
2023-09-13 08:14 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,193.62 KB, text/plain)
2023-09-13 08:14 UTC, Toralf Förster
Details
environment (environment,109.81 KB, text/plain)
2023-09-13 08:14 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,788 bytes, application/x-xz)
2023-09-13 08:14 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,20.66 KB, application/x-xz)
2023-09-13 08:14 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-09-13 08:14:19 UTC
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.

 * ./stage3/bin/zig build std-docs --prefix /var/tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/docgen/
/var/tmp/portage/dev-lang/zig-0.11.0/temp/environment: line 1592: ./stage3/bin/zig: cannot execute: required file not found
 * ERROR: dev-lang/zig-0.11.0::gentoo failed (compile phase):
 *   Failed to run command: ./stage3/bin/zig build std-docs --prefix /var/tmp/portage/dev-lang/zig-0.11.0/work/zig-0.11.0/docgen/
 * 
 * Call stack:

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_desktop_gnome_systemd_merged_usr-20230909-201520

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 16.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/16/bin
Configuration file: /etc/clang/clang.cfg
/usr/lib/llvm/16
16.0.6
Python 3.11.5
Available Rust versions:
  [1]   rust-1.72.0 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.7_p7 [openjdk-bin-17]
*)	Eclipse Temurin JDK 8.372_p07 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm
  [2]   openjdk-bin-17 

php cli (if any):
go version go1.21.1 linux/amd64

  HEAD of ::gentoo
commit 6289346069f8f8de893ef741e876adfb1bc419f6
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Sep 13 06:01:39 2023 +0000

    2023-09-13 06:01:38 UTC

emerge -qpvO dev-lang/zig
[ebuild  N    ] dev-lang/zig-0.11.0  USE="doc"
Comment 1 Toralf Förster gentoo-dev 2023-09-13 08:14:20 UTC
Created attachment 870467 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-09-13 08:14:21 UTC
Created attachment 870468 [details]
dev-lang:zig-0.11.0:20230913-061551.log
Comment 3 Toralf Förster gentoo-dev 2023-09-13 08:14:23 UTC
Created attachment 870469 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2023-09-13 08:14:24 UTC
Created attachment 870470 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2023-09-13 08:14:25 UTC
Created attachment 870471 [details]
etc.clang.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-09-13 08:14:26 UTC
Created attachment 870472 [details]
etc.portage.tar.xz
Comment 7 Eric Joldasov 2023-09-27 16:17:35 UTC
Weird, I didn't get email about this bug! Sorry for that.

I cannot reproduce it, but looks like "./stage3/bin/zig" binary has broken dynamic linking (most propably libc, typical warnings are also here)? If that's the case, then this will be fixed by fixing libc detection.
Comment 8 Larry the Git Cow gentoo-dev 2023-10-27 02:59:14 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b7185f8742031e9a7acfa5d5e837fc48daaeccd

commit 2b7185f8742031e9a7acfa5d5e837fc48daaeccd
Author:     Eric Joldasov <bratishkaerik@getgoogleoff.me>
AuthorDate: 2023-10-20 17:06:17 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-27 02:53:04 +0000

    dev-lang/zig: add simple `zig env` invocation to check if compiler built itself properly
    
    Will make bugs similar to following easier to spot in future because they
    will fall earlier and with better error message [than "`zig build std-docs` not found"].
    
    In case "doc" USE-flag and tests are disabled, miscompilation could have been unnoticed by user at all until Zig usage,
    since the only calls to Zig binary in ebuild would have been skipped.
    Now, it will always check during "src_compile" phase and can reveal
    potentially hidden bug.
    
    Bug: https://bugs.gentoo.org/914101
    
    Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-lang/zig/zig-0.11.0-r1.ebuild | 2 ++
 dev-lang/zig/zig-9999.ebuild      | 2 ++
 2 files changed, 4 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=42ac667416fe133255c3baca620e9af61315cb3b

commit 42ac667416fe133255c3baca620e9af61315cb3b
Author:     Eric Joldasov <bratishkaerik@getgoogleoff.me>
AuthorDate: 2023-10-10 03:12:16 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-10-27 02:53:03 +0000

    dev-lang/zig: patch 0.11.0 to use getconf when detecting glibc version
    
    Bug: https://bugs.gentoo.org/914731
    Bug: https://bugs.gentoo.org/914101
    
    Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
    Signed-off-by: Sam James <sam@gentoo.org>

 .../zig/files/zig-0.11.0-first-try-getconf.patch   | 109 +++++++++++++++++++++
 .../{zig-0.11.0.ebuild => zig-0.11.0-r1.ebuild}    |   4 +
 2 files changed, 113 insertions(+)