[GH-ISSUE #2045] [Bug] Build Error: Access is Denied. (os error 5) in cargo install --force cargo-make #818

Closed
opened 2026-03-23 20:41:29 +00:00 by mirror · 9 comments
Owner

Originally created by @JRS296 on GitHub (Mar 20, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2045

Bug Description

I am getting the following error on trying to build out the development environment on my local machine.

error: failed to run custom build command for 'windows_x86_64_msvc v0.42.2'

Caused by:
  could not execute process 'C:\Users\jonat\AppData\Local\Temp\cargo-installl2mN57\release\build\windows_x86_64_msvc-fbbcda8063109501\build-script-build' (never executed)

Caused by:
  Access is denied. (os error 5)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `cargo-make v0.36.6`, intermediate artifacts can be found at `C:\Users\jonat\AppData\Local\Temp\cargo-installl2mN57`
PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy>

I have followed the Build guide as specified in this doc: https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-windows

The bottleneck arrives on attempting command:
cargo install --force cargo-make

How to Reproduce

Follow Build steps from doc https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-windows

Expected Behavior

Completed Compilation for the given development environment.

Operating System

Windows

AppFlowy Version(s)

AppFlowy-IO#2009

Screenshots

cargo build error

Additional Context

(Another small concern) Been receiving malware calls from Kaspersky during build process. Is this something to be concerned over?

Screenshot for the same:
malware

Originally created by @JRS296 on GitHub (Mar 20, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2045 ### Bug Description I am getting the following error on trying to build out the development environment on my local machine. ``` error: failed to run custom build command for 'windows_x86_64_msvc v0.42.2' Caused by: could not execute process 'C:\Users\jonat\AppData\Local\Temp\cargo-installl2mN57\release\build\windows_x86_64_msvc-fbbcda8063109501\build-script-build' (never executed) Caused by: Access is denied. (os error 5) warning: build failed, waiting for other jobs to finish... error: failed to compile `cargo-make v0.36.6`, intermediate artifacts can be found at `C:\Users\jonat\AppData\Local\Temp\cargo-installl2mN57` PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy> ``` I have followed the Build guide as specified in this doc: https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-windows The bottleneck arrives on attempting command: `cargo install --force cargo-make` ### How to Reproduce Follow Build steps from doc https://appflowy.gitbook.io/docs/essential-documentation/contribute-to-appflowy/software-contributions/environment-setup/building-on-windows ### Expected Behavior Completed Compilation for the given development environment. ### Operating System Windows ### AppFlowy Version(s) AppFlowy-IO#2009 ### Screenshots ![cargo build error](https://user-images.githubusercontent.com/70965472/226458072-509a1c26-b995-48a0-9b13-5d6b49b2e8ea.jpg) ### Additional Context _(Another small concern)_ Been receiving malware calls from Kaspersky during build process. Is this something to be concerned over? Screenshot for the same: ![malware](https://user-images.githubusercontent.com/70965472/226458844-eb95dce8-b76b-4c64-b98b-372d41ebbe9f.jpg)
Author
Owner

@appflowy commented on GitHub (Mar 21, 2023):

What's your Rust version? You can try rustup show.

<!-- gh-comment-id:1477521403 --> @appflowy commented on GitHub (Mar 21, 2023): What's your Rust version? You can try `rustup show`.
Author
Owner

@JRS296 commented on GitHub (Mar 21, 2023):

PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy> rustup --version
rustup 1.25.2 (17db695f1 2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.68.0 (2c8cc3432 2023-03-06)`
PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy> rustup show
Default host: x86_64-pc-windows-msvc
rustup home:  C:\Users\jonat\.rustup

stable-x86_64-pc-windows-msvc (default)
rustc 1.68.0 (2c8cc3432 2023-03-06)
PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy> 

Cargo is at 1.68.0

<!-- gh-comment-id:1477739345 --> @JRS296 commented on GitHub (Mar 21, 2023): ``` PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy> rustup --version rustup 1.25.2 (17db695f1 2023-02-01) info: This is the version for the rustup toolchain manager, not the rustc compiler. info: The currently active `rustc` version is `rustc 1.68.0 (2c8cc3432 2023-03-06)` PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy> rustup show Default host: x86_64-pc-windows-msvc rustup home: C:\Users\jonat\.rustup stable-x86_64-pc-windows-msvc (default) rustc 1.68.0 (2c8cc3432 2023-03-06) PS D:\CompSci - Learn\Open Source Work\AppFlowy\AppFlowy> ``` Cargo is at 1.68.0
Author
Owner

@JRS296 commented on GitHub (Mar 21, 2023):

UPDATE: downgraded to rust version 1.65, still getting the same error.. Anything that can be done for the same?

<!-- gh-comment-id:1478027953 --> @JRS296 commented on GitHub (Mar 21, 2023): UPDATE: downgraded to rust version 1.65, still getting the same error.. Anything that can be done for the same?
Author
Owner

@squidrye commented on GitHub (Mar 21, 2023):

Hi @JRS296, I believe your terminal does not has adminstrator privileges to execute files in your C drive, did you try launching your terminal as an administrator ?

<!-- gh-comment-id:1478288234 --> @squidrye commented on GitHub (Mar 21, 2023): Hi @JRS296, I believe your terminal does not has adminstrator privileges to execute files in your C drive, did you try launching your terminal as an administrator ?
Author
Owner

@JRS296 commented on GitHub (Mar 21, 2023):

Tried it with Admin priveleges, same result:

image

<!-- gh-comment-id:1478306752 --> @JRS296 commented on GitHub (Mar 21, 2023): Tried it with Admin priveleges, same result: ![image](https://user-images.githubusercontent.com/70965472/226691838-9888a913-d1d5-484c-9cf3-8f2445f225e0.png)
Author
Owner

@JRS296 commented on GitHub (Mar 26, 2023):

Successfully Built out the dev environment today, AntiVirus was interfering with the build

<!-- gh-comment-id:1484141606 --> @JRS296 commented on GitHub (Mar 26, 2023): Successfully Built out the dev environment today, AntiVirus was interfering with the build
Author
Owner

@vhanla commented on GitHub (Sep 27, 2023):

Kaspersky is blocking it. Could you please update build-script-build executable core and test it against virustotal so it won't be marked as false positive by most reknown antimalware software?
imagen
It is crazy of different build-script-build.exe files generated, and all of them marked as malware. I have to disable malware protection, and on reenable, it forces me to restart in order to "disinfect". 😅

<!-- gh-comment-id:1737940767 --> @vhanla commented on GitHub (Sep 27, 2023): Kaspersky is blocking it. Could you please update build-script-build executable core and test it against virustotal so it won't be marked as false positive by most reknown antimalware software? ![imagen](https://github.com/AppFlowy-IO/AppFlowy/assets/1015823/fd03dc5c-401c-469c-8fc0-42161de50e78) It is crazy of different build-script-build.exe files generated, and all of them marked as malware. I have to disable malware protection, and on reenable, it forces me to restart in order to "disinfect". 😅
Author
Owner

@tao-a-man commented on GitHub (Feb 5, 2024):

Successfully Built out the dev environment today, AntiVirus was interfering with the build

hii @JRS296 I have same problem, Plss help me tell how you can fix it?

<!-- gh-comment-id:1926470225 --> @tao-a-man commented on GitHub (Feb 5, 2024): > Successfully Built out the dev environment today, AntiVirus was interfering with the build hii @JRS296 I have same problem, Plss help me tell how you can fix it?
Author
Owner

@JRS296 commented on GitHub (Feb 5, 2024):

Hello @tao-a-man, just disable your antivirus (or add cargo to the list of exclusions), and enable firewall permissions for cargo. This should help.

<!-- gh-comment-id:1927057048 --> @JRS296 commented on GitHub (Feb 5, 2024): Hello @tao-a-man, just disable your antivirus (or add cargo to the list of exclusions), and enable firewall permissions for cargo. This should help.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#818
No description provided.