Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948168 - zig.eclass: unspecified my_zbs_args causes build failures
Summary: zig.eclass: unspecified my_zbs_args causes build failures
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Eric Joldasov
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2025-01-16 02:59 UTC by demize
Modified: 2025-03-03 19:27 UTC (History)
2 users (show)

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


Attachments
ebuild logs (zig_eclass_logs.tar.xz,30.63 KB, application/x-xz)
2025-01-16 02:59 UTC, demize
Details
WIP ebuild with issue (jetzig-9999.ebuild,481 bytes, application/vnd.gentoo.ebuild)
2025-01-16 03:00 UTC, demize
Details

Note You need to log in before you can comment on or make changes to this bug.
Description demize 2025-01-16 02:59:40 UTC
Created attachment 916655 [details]
ebuild logs

An empty or unspecified `my_zbs_args` will cause portage to pass an empty string to ZBS during the compile phase, which is interpreted by ZBS as the build step to execute. As there's usually no unnamed build step, this will cause builds to fail.

I've attached the temp directory from such a failure (minus the zig-cache and zig-detect folders, and zig_libc.txt), as well as the WIP ebuild I'm considering where I ran into this issue.

A workaround within the ebuild is to add a `src_configure` function which **unsets** `my_zbs_args`. This line is commented out in the ebuild I uploaded; uncommenting it allows the application to build correctly. While this workaround allows for the application to build correctly, it also requires a potentially useless `src_configure` function; when there are no options to pass, I would prefer to leave the function out of the ebuild.
Comment 1 demize 2025-01-16 03:00:15 UTC
Created attachment 916656 [details]
WIP ebuild with issue
Comment 2 Mike Gilbert gentoo-dev 2025-01-16 18:25:52 UTC
The eclass initializes my_zbs_args as an empty string, but it is supposed to be an array.
Comment 3 Larry the Git Cow gentoo-dev 2025-03-03 19:27:03 UTC
The bug has been closed via the following commit(s):

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

commit f68007349b216b75d31a7513e49b9813b24a993e
Author:     Eric Joldasov <bratishkaerik@landless-city.net>
AuthorDate: 2025-01-18 16:15:24 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2025-03-03 19:26:27 +0000

    zig.eclass: allow unset `my_zbs_args`
    
    Previously it was defined as empty string when not setting this variable,
    which caused error during building because Zig treat it as a name of
    non-existant step "".
    
    Also fix DEFAULT_UNSET comment on `BUILD_DIR` and `my_zbs_args`.
    
    Closes: https://bugs.gentoo.org/948168
    Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
    Signed-off-by: Sam James <sam@gentoo.org>

 eclass/zig.eclass | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)