Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using Zig : "no field or member function named 'standardReleaseOptions' in 'Build'" #1112

Closed
TheGreat-Chain opened this issue Apr 21, 2023 · 5 comments
Labels

Comments

@TheGreat-Chain
Copy link

When I perform the third step of the readme, which is entering the "zig build -Drelease-fast" command, I get this error :

llama.cpp/build.zig:5:23: error: no field or member function named 'standardReleaseOptions' in 'Build'
    const optimize = b.standardReleaseOptions();
                     ~^~~~~~~~~~~~~~~~~~~~~~~
/zig/lib/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
referenced by:
    runBuild__anon_7424: /zig/lib/std/Build.zig:1545:27
    steps__anon_6622: /zig/lib/build_runner.zig:891:20
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

OS : LinuxMint 21
Zig version : 0.11.0-dev.2689+b7c00999b

@SlyEcho
Copy link
Collaborator

SlyEcho commented Apr 22, 2023

The build.zig is written for zig 0.10, the API has changed in 0.11 so it will need to be fixed when 0.11 releases but it is a development prerelease right now.

@jdc4429
Copy link

jdc4429 commented Apr 27, 2023

I get the same error...

@tristanisham
Copy link

This files has broader issues than simple one depreciated function. Though, to fix this particular micro-issue line five should be:

const optimize = b.standardOptimizeOption(.{});

@SlyEcho
Copy link
Collaborator

SlyEcho commented May 4, 2023

I think it's probably better to track with the dev releases of zig rather than the "stable" ones. It could also probably support most of the advanced features that the Make and CMake configurations do.

Copy link
Contributor

github-actions bot commented Apr 9, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants