Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 851732 - dev-lang/zig failed to test in riscv
Summary: dev-lang/zig failed to test in riscv
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal (vote)
Assignee: Eric Joldasov
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: 796596
  Show dependency tree
 
Reported: 2022-06-13 15:39 UTC by ArchFeh(Yu Gu)
Modified: 2023-01-09 14:27 UTC (History)
3 users (show)

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


Attachments
build log (build.log,166.99 KB, text/x-log)
2022-06-13 15:43 UTC, ArchFeh(Yu Gu)
Details
environment (environment,98.18 KB, text/plain)
2022-06-13 15:44 UTC, ArchFeh(Yu Gu)
Details
build log without use test (build.log,165.14 KB, text/x-log)
2022-06-13 16:04 UTC, ArchFeh(Yu Gu)
Details
zig-0.10.0 build log (build.log,242.30 KB, text/x-log)
2022-12-03 00:03 UTC, ArchFeh(Yu Gu)
Details
zig-0.10.0 environment (environment,102.17 KB, text/plain)
2022-12-03 00:03 UTC, ArchFeh(Yu Gu)
Details
patch in case github is unavailable (13498.patch,11.15 KB, patch)
2022-12-04 08:41 UTC, Eric Joldasov
Details | Diff
build log with patch (build.log,527.33 KB, text/x-log)
2022-12-05 02:43 UTC, ArchFeh(Yu Gu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ArchFeh(Yu Gu) 2022-06-13 15:39:08 UTC
dev-lang/zig-0.9.1 segmentation fault in test phase in riscv.
Comment 1 ArchFeh(Yu Gu) 2022-06-13 15:43:49 UTC
Created attachment 784643 [details]
build log
Comment 2 ArchFeh(Yu Gu) 2022-06-13 15:44:07 UTC
Created attachment 784646 [details]
environment
Comment 3 ArchFeh(Yu Gu) 2022-06-13 16:04:30 UTC
Created attachment 784649 [details]
build log without use test
Comment 4 Eric Joldasov 2022-07-16 16:24:47 UTC
Upstream bug https://github.com/ziglang/zig/issues/11918 , upstream fix https://github.com/ziglang/zig/pull/11951
Comment 5 Larry the Git Cow gentoo-dev 2022-08-22 08:18:06 UTC
The bug has been referenced in the following commit(s):

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

commit d005e3b069726d01579b86d32f6fe32c26573aa3
Author:     Eric Joldasov <bratishkaerik@getgoogleoff.me>
AuthorDate: 2022-07-26 21:25:12 +0000
Commit:     Jakov Smolić <jsmolic@gentoo.org>
CommitDate: 2022-08-22 08:16:08 +0000

    dev-lang/zig: block dev-lang/zig-bin, add risv stage0 patch for 0.9.1
    
    Bug: https://bugs.gentoo.org/851732
    Signed-off-by: Eric Joldasov <bratishkaerik@getgoogleoff.me>
    Signed-off-by: Jakov Smolić <jsmolic@gentoo.org>

 dev-lang/zig/files/zig-0.9.1-fix-riscv.patch | 47 ++++++++++++++++++++++++++++
 dev-lang/zig/zig-0.9.1.ebuild                | 26 +++++++--------
 2 files changed, 59 insertions(+), 14 deletions(-)
Comment 6 Eric Joldasov 2022-12-01 14:21:53 UTC
Can you please retry with 0.10.0 release? Thank you
Comment 7 ArchFeh(Yu Gu) 2022-12-02 04:48:57 UTC
(In reply to Eric Joldasov from comment #6)
> Can you please retry with 0.10.0 release? Thank you

Yes I am testing it!
Comment 8 ArchFeh(Yu Gu) 2022-12-03 00:03:32 UTC
Created attachment 839197 [details]
zig-0.10.0 build log

zig-0.10.0 compile failed. zig-bin-0.10.0 installed successfully but has runtime error "[1]    107570 segmentation fault (core dumped)  zig"
Comment 9 ArchFeh(Yu Gu) 2022-12-03 00:03:57 UTC
Created attachment 839199 [details]
zig-0.10.0 environment
Comment 10 Eric Joldasov 2022-12-04 08:31:00 UTC
Looks like it tries to use bundled source of libc++, even without `-Duse-zig-libcxx` (so equal to false). I'll try to make patch and send it to upstream.
Comment 11 Eric Joldasov 2022-12-04 08:40:53 UTC
Found out that pull request for this already exist!
https://github.com/ziglang/zig/pull/13498

> This change also adds logic to look-up the system libc++ includes on Linux and BSD-likes.
> This was needed to fix a bug on Linux where we were using Zig-provided libc++ includes even when linking against the system-provided lib.

Would you like to try it? Thank you!
https://patch-diff.githubusercontent.com/raw/ziglang/zig/pull/13498.patch
Comment 12 Eric Joldasov 2022-12-04 08:41:48 UTC
Created attachment 839579 [details, diff]
patch in case github is unavailable
Comment 13 ArchFeh(Yu Gu) 2022-12-04 08:51:13 UTC
(In reply to Eric Joldasov from comment #11)
> Found out that pull request for this already exist!
> https://github.com/ziglang/zig/pull/13498
> 
> > This change also adds logic to look-up the system libc++ includes on Linux and BSD-likes.
> > This was needed to fix a bug on Linux where we were using Zig-provided libc++ includes even when linking against the system-provided lib.
> 
> Would you like to try it? Thank you!
> https://patch-diff.githubusercontent.com/raw/ziglang/zig/pull/13498.patch

yep gonna try it later today!
Comment 14 ArchFeh(Yu Gu) 2022-12-05 02:43:47 UTC
Created attachment 840177 [details]
build log with patch

compile passed, but test failed. run '$ zig' show 
"/usr/bin/zig: error while loading shared libraries: cpp.so.15: cannot open shared object file: No such file or directory"
Comment 15 Eric Joldasov 2022-12-18 12:15:06 UTC
Fixing can take a long time, so I'll just wait until my VisionFive 2 arrives :)
Comment 16 Eric Joldasov 2023-01-09 14:27:58 UTC
*** Bug 890234 has been marked as a duplicate of this bug. ***