Skip to content

Commit

Permalink
libfuse meson fix
Browse files Browse the repository at this point in the history
  • Loading branch information
NilsIrl committed Aug 10, 2024
1 parent 1a8f454 commit 7bb2065
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 20 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ jobs:
with:
version: 0.13.0
- run: sudo apt install autoconf libtool pkg-config make libzstd-dev libfuse3-dev
- run: python3 -m pip install meson
- run: zig build -Doptimize=ReleaseSafe -Dtarget=x86_64-linux-musl
- run: zig-out/bin/dockerc --image docker://hello-world --output enlo
- run: ./enlo
20 changes: 1 addition & 19 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub fn build(b: *std.Build) void {
fuse_fss.addIncludePath(b.path("zstd/lib"));

fuse_fss.addIncludePath(b.path("libfuse/include"));
fuse_fss.addIncludePath(b.path("libfuse/build"));
fuse_fss.addIncludePath(b.path("libfuse_build"));

fuse_fss.addCSourceFiles(.{
.files = &[_][]const u8{
Expand Down Expand Up @@ -179,22 +179,6 @@ pub fn build(b: *std.Build) void {
overlayfs_configure.setCwd(b.path("fuse-overlayfs"));
overlayfs_configure.step.dependOn(&overlayfs_autogen.step);

const libfuse_mkdir_build = b.addSystemCommand(&[_][]const u8{
"mkdir",
"-p",
"build",
});
libfuse_mkdir_build.setCwd(b.path("libfuse"));

const configure_libfuse = b.addSystemCommand(&[_][]const u8{
"meson",
"setup",
"..",
});
configure_libfuse.setEnvironmentVariable("CC", cc);
configure_libfuse.setCwd(b.path("libfuse/build"));
configure_libfuse.step.dependOn(&libfuse_mkdir_build.step);

const runtime = b.createModule(.{
.root_source_file = b.path("src/main.zig"),
.link_libc = true,
Expand Down Expand Up @@ -332,12 +316,10 @@ pub fn build(b: *std.Build) void {
runtime_x86_64.step.dependOn(&squashfuse_make_generate_swap.step);
runtime_x86_64.step.dependOn(&overlayfs_configure.step);
runtime_x86_64.step.dependOn(&libocspec_generate_files.step);
runtime_x86_64.step.dependOn(&configure_libfuse.step);

runtime_aarch64.step.dependOn(&squashfuse_make_generate_swap.step);
runtime_aarch64.step.dependOn(&overlayfs_configure.step);
runtime_aarch64.step.dependOn(&libocspec_generate_files.step);
runtime_aarch64.step.dependOn(&configure_libfuse.step);
}

const go_cpu_arch = switch (target.query.cpu_arch orelse target.result.cpu.arch) {
Expand Down
44 changes: 44 additions & 0 deletions libfuse_build/fuse_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
/*
* Autogenerated by the Meson build system.
* Do not edit, your changes will be lost.
*/

#pragma once

// not available in musl
// #define HAVE_BACKTRACE

#define HAVE_COPY_FILE_RANGE

#define HAVE_FALLOCATE

#define HAVE_FDATASYNC

#define HAVE_FORK

#define HAVE_FSTATAT

#define HAVE_ICONV

#define HAVE_OPENAT

#define HAVE_PIPE2

#define HAVE_POSIX_FALLOCATE

#define HAVE_READLINKAT

#define HAVE_SETXATTR

#define HAVE_SPLICE

#define HAVE_STRUCT_STAT_ST_ATIM

#undef HAVE_STRUCT_STAT_ST_ATIMESPEC

#define HAVE_UTIMENSAT

#define HAVE_VMSPLICE

#define PACKAGE_VERSION "3.17.0"

15 changes: 15 additions & 0 deletions libfuse_build/libfuse_config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
* Autogenerated by the Meson build system.
* Do not edit, your changes will be lost.
*/

#pragma once

#define FUSE_HOTFIX_VERSION 0

#define FUSE_MAJOR_VERSION 3

#define FUSE_MINOR_VERSION 17

#define LIBFUSE_BUILT_WITH_VERSIONED_SYMBOLS 1

0 comments on commit 7bb2065

Please sign in to comment.