Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 934807 - dev-lang/zig: 0.12.0 build/stage3/bin/zig: cannot execute: required file not found
Summary: dev-lang/zig: 0.12.0 build/stage3/bin/zig: cannot execute: required file not ...
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:
Depends on:
Blocks:
 
Reported: 2024-06-24 10:49 UTC by Petr Šourek
Modified: 2024-08-07 14:55 UTC (History)
3 users (show)

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


Attachments
buld.log (build.log.txt,16.92 KB, text/plain)
2024-06-24 10:49 UTC, Petr Šourek
Details
emerge --info '=dev-lang/zig-0.12.0::gentoo' (emerge.info.txt,9.41 KB, text/plain)
2024-06-24 10:49 UTC, Petr Šourek
Details
environment (environment.txt,118.12 KB, text/plain)
2024-06-24 10:50 UTC, Petr Šourek
Details
emerge -pqv '=dev-lang/zig-0.12.0::gentoo' (pvq.txt,71 bytes, text/plain)
2024-06-24 10:50 UTC, Petr Šourek
Details
patch-backport-0.12.1 (file_934807.txt,6.51 KB, patch)
2024-06-24 21:32 UTC, Eric Joldasov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Šourek 2024-06-24 10:49:07 UTC
Created attachment 896328 [details]
buld.log

Hello,

I have problems installing zig 0.12.0, because of:
[19/19] cd /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0 && /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/zig2 build --prefix /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/stage3 --zig-lib-dir /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/lib -Dconfig_h=/var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/config.h -Denable-llvm -Doptimize=ReleaseFast -Dno-langref -Dtarget=native -Dcpu=native -Dversion-string=0.12.0
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
warning: Encountered error: UnexpectedEndOfFile, falling back to default ABI and dynamic linker.
/var/tmp/portage/dev-lang/zig-0.12.0/temp/environment: line 2665: /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/stage3/bin/zig: cannot execute: required file not found
Comment 1 Petr Šourek 2024-06-24 10:49:53 UTC
Created attachment 896329 [details]
emerge --info '=dev-lang/zig-0.12.0::gentoo'
Comment 2 Petr Šourek 2024-06-24 10:50:13 UTC
Created attachment 896330 [details]
environment
Comment 3 Petr Šourek 2024-06-24 10:50:45 UTC
Created attachment 896331 [details]
emerge -pqv '=dev-lang/zig-0.12.0::gentoo'
Comment 4 Petr Šourek 2024-06-24 10:55:18 UTC
Strange thing is, that when I enter the corresponding directory:
% pwd
/var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/stage3/bin

% ls -al
total 88700
drwxr-xr-x 1 portage portage        6 24. čen 12.44 .
drwxr-xr-x 1 portage portage       12 24. čen 12.27 ..
-rwxr-xr-x 1 portage portage 90828776 24. čen 12.44 zig

File is present and is executable. But when I try to execute it manually:

% ./zig     
zsh: no such file or directory: ./zig

In bash:
RinceWind /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/stage3/bin # ./zig
bash: ./zig: cannot execute: required file not found
Comment 5 Eric Joldasov 2024-06-24 21:31:17 UTC
Can you try this patch please? It's included in 0.13.0 but version was not bumped yet, I'd like to see if it woks for you in isolation.
Comment 6 Eric Joldasov 2024-06-24 21:32:03 UTC
Created attachment 896368 [details, diff]
patch-backport-0.12.1
Comment 7 Eric Joldasov 2024-06-24 21:33:42 UTC
(In reply to Petr Šourek from comment #4)
> Strange thing is, that when I enter the corresponding directory:
> % pwd
> /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/stage3/bin
> 
> % ls -al
> total 88700
> drwxr-xr-x 1 portage portage        6 24. čen 12.44 .
> drwxr-xr-x 1 portage portage       12 24. čen 12.27 ..
> -rwxr-xr-x 1 portage portage 90828776 24. čen 12.44 zig
> 
> File is present and is executable. But when I try to execute it manually:
> 
> % ./zig     
> zsh: no such file or directory: ./zig
> 
> In bash:
> RinceWind
> /var/tmp/portage/dev-lang/zig-0.12.0/work/zig-0.12.0/build/stage3/bin # ./zig
> bash: ./zig: cannot execute: required file not found

It complains not about existing of zig binary itself, it actually complains about dynamic linker not existing. Most likely Zid detect your native linker wrongly, you can verify this by running file on the zig executable.
Comment 8 Petr Šourek 2024-06-25 07:39:44 UTC
Hello,

thanks for explanation and for the patch. I can confirm, that with the patch inserted into /etc/portage/packages/dev-lang/zig-0.12.0 it compiled correctly.

Thanks,
Regards,
Petr Sourek
Comment 9 Eric Joldasov 2024-08-07 10:19:58 UTC
Hello again, could you please test new version dev-lang/zig-0.13.0, without patch? If it works then this is solved.
Comment 10 Petr Šourek 2024-08-07 12:18:11 UTC
(In reply to Eric Joldasov from comment #9)
> Hello again, could you please test new version dev-lang/zig-0.13.0, without
> patch? If it works then this is solved.

Hello,

launched eix-sync, emerge -av1u dev-lang/zig and I can confirm, that version 0.13.0 compiled without patch.

For implementation I was using folder /etc/portage/patches/dev-lang/zig-0.12.0 and if I get it correctly, it gets used only for 0.12.0 version. Didn't find implementing it at the begining of 0.13.0. And just mentioning it, if I did any error (I am just a user).

Thanks,
Regards,
Petr Sourek
Comment 11 Eric Joldasov 2024-08-07 12:55:09 UTC
Thanks!
Comment 12 Petr Šourek 2024-08-07 14:55:57 UTC
(In reply to Eric Joldasov from comment #11)
> Thanks!

You are welcome, thank you too.