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: failed to run custom build command for libnghttp2-sys v0.1.9+1.58.0 #1044

Closed
sandersbasket opened this issue Apr 28, 2024 · 10 comments
Closed

Comments

@sandersbasket
Copy link

how to fix problem?
i need compile rust + tauri to NSIS, but i have error, console output:
i have build tools and rustup, cargo and another modules for compile, but have error....

cargo tauri build --target=aarch64-pc-windows-msvc --bundles nsis 
   Compiling libz-sys v1.1.15
   Compiling libnghttp2-sys v0.1.9+1.58.0
error: failed to run custom build command for `libz-sys v1.1.15`

Caused by:
  process didn't exit successfully: `C:\Users\fazuq\Desktop\activiy-orders\МАРАТ ПИДАРАС\launcher-test\src-tauri\target\release\build\libz-sys-9ac9a6744d3a3b6f\build-script-build` (exit code: 1)
  --- stdout
  cargo:rerun-if-env-changed=LIBZ_SYS_STATIC
  cargo:rerun-if-changed=build.rs
  note, vcpkg did not find zlib: Could not find library in Vcpkg tree package zlib is not installed for vcpkg triplet arm64-windows-static
  TARGET = Some("aarch64-pc-windows-msvc")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-pc-windows-msvc")
  cargo:rerun-if-env-changed=CC_aarch64-pc-windows-msvc
  CC_aarch64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_aarch64_pc_windows_msvc
  CC_aarch64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("crt-static,neon")
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-pc-windows-msvc
  CFLAGS_aarch64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_pc_windows_msvc
  CFLAGS_aarch64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  running: "cl.exe" "-nologo" "-MT" "-O2" "-Brepro" "-I" "src/zlib" "-FoC:\\Users\\fazuq\\Desktop\\activiy-orders\\МАРАТ ПИДАРАС\\launcher-test\\src-tauri\\target\\aarch64-pc-windows-msvc\\release\\build\\libz-sys-8fe3ae308a669f1c\\out\\lib\\src/zlib/adler32.o" "-c" "src/zlib/adler32.c"

  --- stderr


  error occurred: Failed to find tool. Is `cl.exe` installed? (see https://github.com/rust-lang/cc-rs#compile-time-requirements for help)


warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `libnghttp2-sys v0.1.9+1.58.0`

Caused by:
  process didn't exit successfully: `C:\Users\fazuq\Desktop\activiy-orders\МАРАТ ПИДАРАС\launcher-test\src-tauri\target\release\build\libnghttp2-sys-4f1916e0f7e477e3\build-script-build` (exit code: 1)
  --- stdout
  TARGET = Some("aarch64-pc-windows-msvc")
  OPT_LEVEL = Some("3")
  HOST = Some("x86_64-pc-windows-msvc")
  cargo:rerun-if-env-changed=CC_aarch64-pc-windows-msvc
  CC_aarch64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CC_aarch64_pc_windows_msvc
  CC_aarch64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=TARGET_CC
  TARGET_CC = None
  cargo:rerun-if-env-changed=CC
  CC = None
  cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
  CRATE_CC_NO_DEFAULTS = None
  CARGO_CFG_TARGET_FEATURE = Some("crt-static,neon")
  DEBUG = Some("false")
  cargo:rerun-if-env-changed=CFLAGS_aarch64-pc-windows-msvc
  CFLAGS_aarch64-pc-windows-msvc = None
  cargo:rerun-if-env-changed=CFLAGS_aarch64_pc_windows_msvc
  CFLAGS_aarch64_pc_windows_msvc = None
  cargo:rerun-if-env-changed=TARGET_CFLAGS
  TARGET_CFLAGS = None
  cargo:rerun-if-env-changed=CFLAGS
  CFLAGS = None
  running: "cl.exe" "-nologo" "-MT" "-O2" "-Brepro" "-I" "nghttp2/lib/includes" "-I" "C:\\Users\\fazuq\\Desktop\\activiy-orders\\МАРАТ ПИДАРАС\\launcher-test\\src-tauri\\target\\aarch64-pc-windows-msvc\\release\\build\\libnghttp2-sys-9358d81d0a9df3a2\\out\\i\\include" "-DNGHTTP2_STATICLIB" "-DHAVE_NETINET_IN" "-DHAVE_TIME_H" "-Dssize_t=int64_t" "-FoC:\\Users\\fazuq\\Desktop\\activiy-orders\\МАРАТ ПИДАРАС\\launcher-test\\src-tauri\\target\\aarch64-pc-windows-msvc\\release\\build\\libnghttp2-sys-9358d81d0a9df3a2\\out\\i\\lib\\nghttp2/lib/sfparse.o" "-c" "nghttp2/lib/sfparse.c"

  --- stderr


  error occurred: Failed to find tool. Is `cl.exe` installed? (see https://github.com/rust-lang/cc-rs#compile-time-requirements for help)


       Error failed to build app: failed to build app
@NobodyXu
Copy link
Collaborator

cl.exe is not found, did you install the msvc?

@sandersbasket
Copy link
Author

sandersbasket commented Apr 28, 2024

cl.exe is not found, did you install the msvc?

yeah

image
image

@sandersbasket
Copy link
Author

sandersbasket commented Apr 28, 2024

maybe it's build.rs file?

fn main() {
  let mut windows = tauri_build::WindowsAttributes::new();
  windows = windows.app_manifest(r#"
  <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
        <security>
            <requestedPrivileges>
                <requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
            </requestedPrivileges>
        </security>
    </trustInfo>
  </assembly>
  "#);
  let attrs =  tauri_build::Attributes::new().windows_attributes(windows);
  tauri_build::try_build(attrs).expect("failed to run build script");
}

upd: i checked, it's not about him

@NobodyXu
Copy link
Collaborator

Did you install msvc toolchain for arm?

I think it might need to install separately, when cross compiling arm on x64.

@sandersbasket
Copy link
Author

Did you install msvc toolchain for arm?

I think it might need to install separately, when cross compiling arm on x64.

honestly, I tried everything at all, installing rustc, MS VC, and so on, you can links or resources, what exactly do you need to install? I think I tried everything)

@NobodyXu
Copy link
Collaborator

I'm not sure about that, cc @thomcc I think you might know how to do?

@thomcc
Copy link
Member

thomcc commented Apr 28, 2024

It should be in the MSVC installer, a checkbox you choose the ARM and ARM64 build tools for C++ in the individual components tab.

@ChrisDenton
Copy link
Contributor

ChrisDenton commented Apr 28, 2024

Awhile back I wrote a walkthrough for rustup which included installing individual components (though with the UI in English).

The difference here is that on the "Individual Components" tab you need to search for "ARM64/ARM64EC" the latest MSVC build tools for ARM64 should be near or at the top.

screenshot

arm64

@sandersbasket
Copy link
Author

Awhile back I wrote a walkthrough for rustup which included installing individual components (though with the UI in English).

The difference here is that on the "Individual Components" tab you need to search for "ARM64/ARM64EC" the latest MSVC build tools for ARM64 should be near or at the top.

screenshot

YEAAAAHHHH!!
FIXED!!!

@NobodyXu
Copy link
Collaborator

That's good to hear, I will close this issue as completed : )

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

No branches or pull requests

4 participants