cosmic icon indicating copy to clipboard operation
cosmic copied to clipboard

Build error

Open sudokit opened this issue 2 years ago • 1 comments

Zig version:

~/t/cosmic (master)> zig version                                                                                                                                                                                   (base) 
0.11.0-dev.1987+a2c6ecd6d

error:

~/t/cosmic (master)> zig build run -Dpath="graphics/examples/demo.zig" -Dgraphics -Drelease-safe
/home/user/temp/cosmic/lib/openssl/lib.zig:23:18: error: member function expected 1 argument(s), found 2
    const lib = b.addStaticLibrary("crypto", null);
                ~^~~~~~~~~~~~~~~~~
/snap/zig/6873/lib/std/Build.zig:503:5: note: function declared here
pub fn addStaticLibrary(b: *Build, options: StaticLibraryOptions) *CompileStep {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
    build: /home/user/temp/cosmic/build.zig:256:31
    runBuild__anon_6375: /snap/zig/6873/lib/std/Build.zig:1584:37
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

/home/user/temp/cosmic/GitRepoStep.zig:60:14: error: expected type '[]const u8', found 'Build.Cache.Directory'
            b.build_root,
            ~^~~~~~~~~~~
/snap/zig/6873/lib/std/Build/Cache.zig:5:23: note: struct declared here
pub const Directory = struct {
                      ^~~~~~
/home/user/temp/cosmic/build.zig:609:34: error: no field or member function named 'addTestExe' in 'Build'
        const step = self.builder.addTestExe("main_test", "./test/main_test.zig");
                     ~~~~~~~~~~~~^~~~~~~~~~~
/snap/zig/6873/lib/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
/home/user/temp/cosmic/build.zig:591:43: error: expected type 'Build.TestOptions', found '[]const u8'
        const step = self.builder.addTest(path);
                                          ^~~~
/snap/zig/6873/lib/std/Build.zig:515:25: note: struct declared here
pub const TestOptions = struct {
                        ^~~~~~
/snap/zig/6873/lib/std/Build.zig:524:36: note: parameter type declared here
pub fn addTest(b: *Build, options: TestOptions) *CompileStep {
                                   ^~~~~~~~~~~
/home/user/temp/cosmic/lib/jolt/lib.zig:24:18: error: member function expected 1 argument(s), found 2
    const exe = b.addExecutable("test-jolt", null);
                ~^~~~~~~~~~~~~~
/snap/zig/6873/lib/std/Build.zig:446:5: note: function declared here
pub fn addExecutable(b: *Build, options: ExecutableOptions) *CompileStep {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/temp/cosmic/build.zig:561:33: error: member function expected 1 argument(s), found 2
        const exe = self.builder.addExecutable(name, self.path);
                    ~~~~~~~~~~~~^~~~~~~~~~~~~~
/snap/zig/6873/lib/std/Build.zig:446:5: note: function declared here
pub fn addExecutable(b: *Build, options: ExecutableOptions) *CompileStep {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/temp/cosmic/build.zig:435:34: error: member function expected 1 argument(s), found 3
        const step = self.builder.addSharedLibrary(name, self.path, .unversioned);
                     ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
/snap/zig/6873/lib/std/Build.zig:483:5: note: function declared here
pub fn addSharedLibrary(b: *Build, options: SharedLibraryOptions) *CompileStep {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/user/temp/cosmic/GitRepoStep.zig:186:24: error: expected type '?[]const u8', found 'Build.Cache.Directory'
    child.cwd = builder.build_root;
                ~~~~~~~^~~~~~~~~~~
/snap/zig/6873/lib/std/Build/Cache.zig:5:23: note: struct declared here
pub const Directory = struct {

(had to fix standardReleaseOptions not existing too)

sudokit avatar Mar 16 '23 22:03 sudokit

I've updated the project to 0.11.0-dev.1797+d3c9bfada to match Cyber's repo. It should have the new Builder api changes. Also... the graphics/ui libs won't stay isolated from Cosmic long term. I think they will end up merging together.

fubark avatar Mar 20 '23 20:03 fubark