multiversx / mx-ide-vscode

💻 VS Code extension for developing MultiversX Smart Contracts - Rust, C and C++.
MIT License
70 stars 36 forks source link

Contract Build Error #54

Closed tayyipcanbay closed 2 years ago

tayyipcanbay commented 2 years ago

Hello. I tried to build a default contract but I get this error. Does anyone know how I fix it?

erdpy --verbose contract build "/home/tayyipcanbay/Desktop/elrond/crowdFunding"
INFO:projects.core:build_project.directory: /home/tayyipcanbay/Desktop/elrond/crowdFunding
INFO:projects.core:build_project.debug: False
INFO:myprocess:run_process: ['rustc', '--version'], in folder: None
INFO:myprocess:Successful run. Output:
rustc 1.64.0-nightly (263edd43c 2022-07-17)

INFO:myprocess:run_process: ['wasm-opt', '--version'], in folder: None
INFO:myprocess:Successful run. Output:
wasm-opt version 105 (version_105)

INFO:myprocess:run_process_async: ['cargo', 'run', 'build', '--target=wasm32-unknown-unknown', '--release', '--out-dir', '/home/tayyipcanbay/Desktop/elrond/crowdFunding/output', '--target-dir', '/home/tayyipcanbay/elrondsdk/default_cargo_target'], in folder: /home/tayyipcanbay/Desktop/elrond/crowdFunding/meta
Compiling proc-macro2 v1.0.40
Compiling quote v1.0.20
Compiling libc v0.2.126
Compiling syn v1.0.98
Compiling typenum v1.15.0
Compiling serde_derive v1.0.139
Compiling getrandom v0.1.16
Compiling serde v1.0.139
error: linker `cc` not found
|
= note: No such file or directory (os error 2)

error: could not compile `getrandom` due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `serde_derive` due to previous error
error: could not compile `serde` due to previous error
error: could not compile `quote` due to previous error
error: could not compile `syn` due to previous error
error: could not compile `proc-macro2` due to previous error
error: could not compile `libc` due to previous error
error: could not compile `typenum` due to previous error
CRITICAL:cli:Build error: error code = 101, see output.
tayyipcanbay commented 2 years ago

I solved with this: sudo apt install build-essential