Skip to content

Xmake fails to build a hello world zig project without manually specifying the zig toolchain, despite zig being in PATHΒ #7372

@GbotHQ

Description

@GbotHQ

Xmake Version

3.0.7+20260304

Operating System Version and Architecture

Linux fedora 6.17.1-300.fc43.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Oct 6 15:37:21 UTC 2025 x86_64 GNU/Linux

Describe Bug

Xmake fails to use zig from PATH, despite finding it
error: cannot get program for zc

Expected Behavior

According to the documentation, xmake should use zig from PATH.

Project Configuration

add_rules("mode.debug", "mode.release")
add_requires("zig")

target("hello")
    set_kind("binary")
    add_files("src/*.zig")

Additional Information and Error Logs

~/dev/hello via πŸŒ™ 
❯ xmake f -c -v
checking for platform ... linux
checking for architecture ... x86_64
checking for gcc ... /usr/bin/gcc
checking for nim ... no
checking for git ... /usr/bin/git
checking for gzip ... /usr/bin/gzip
checking for tar ... /usr/bin/tar
/usr/bin/git rev-parse HEAD
checking for zig ... no
checking for zig ... /usr/bin/zig
configure
{
    plat = linux
    clean = true
    kind = static
    builddir = build
    arch = x86_64
    mode = release
    host = linux
    ccache = true
    ndk_stdcxx = true
}

~/dev/hello via πŸŒ™ 
❯ xmake
error: cannot get program for zc

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions