Tauri build fails with "failed to run custom build command for `proc-macro2 v1.0.85`"

Hi all.

I'm trying to make destop app with tauri.
The building fails with below errors

$ npm run tauri build 
> quick-sample-pdf@0.0.0 tauri
> tauri build

     Running beforeBuildCommand `npm run build`

> quick-sample-pdf@0.0.0 build
> vue-tsc --noEmit && vite build

vite v5.3.1 building for production...
✓ 48 modules transformed.
dist/index.html                  0.48 kB │ gzip:  0.31 kB
dist/assets/index-DHxkKMGr.css  14.05 kB │ gzip:  3.80 kB
dist/assets/index-CIo5PVC8.js   85.16 kB │ gzip: 31.19 kB
✓ built in 1.06s
   Compiling proc-macro2 v1.0.85
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.155
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.203
   Compiling autocfg v1.3.0
   Compiling siphasher v0.3.11
   Compiling ppv-lite86 v0.2.17
   Compiling syn v1.0.109
   Compiling getrandom v0.1.16
   Compiling phf_shared v0.8.0
error: failed to run custom build command for `proc-macro2 v1.0.85`

Caused by:
  process didn't exit successfully: `/Users/natsuki/Development/quick-sample-pdf/src-tauri/target/release/build/proc-macro2-ad0d5b259a8996e0/build-script-build` (signal: 9, SIGKILL: kill)
warning: build failed, waiting for other jobs to finish...
error: failed to run custom build command for `serde v1.0.203`

Caused by:
  process didn't exit successfully: `/Users/natsuki/Development/quick-sample-pdf/src-tauri/target/release/build/serde-c0bf9030c4a79e26/build-script-build` (signal: 9, SIGKILL: kill)
       Error failed to build app: failed to build app

My environments:

rustc -vV                                                                                                                                         Sun Jun 16 18:33:10 2024
rustc 1.79.0 (129f3b996 2024-06-10)
binary: rustc
commit-hash: 129f3b9964af4d4a709d1383930ade12dfe7c081
commit-date: 2024-06-10
host: aarch64-apple-darwin
release: 1.79.0
LLVM version: 18.1.7
  • MacOS 14.5
  • tauri 1.6.8

What's wrong?
If you need more information, please tell me.

Thank you in advance.

See https://rust-lang.zulipchat.com/#narrow/stream/242906-t-compiler.2Farm/topic/aarch64-apple-darwin.20CI.2FCD.20and.20tier.201.3F/near/444848672

Do you have binutils installed from brew or such. In particular does strip execute anything other than the strip executable of XCode? The binutils version of strip produces executables with a corrupt ad-hoc signature, which results in macOS refusing to execute the executables.


Thanks for your advice!
I had binutils and uninstalled it, but the same error still exists...

Run cargo clean to make sure the already-build bad build-script-build binary is gone, then try again.


It worked fine and build has been completed!!
Thank you so much @kpreid and @bjorn3
case closed :tada: