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

Failed installation on wsl Windows 11 #355

Closed
UsmanTariq2 opened this issue May 18, 2024 · 12 comments
Closed

Failed installation on wsl Windows 11 #355

UsmanTariq2 opened this issue May 18, 2024 · 12 comments
Labels
help wanted Extra attention is needed

Comments

@UsmanTariq2
Copy link

Describe the bug
Updating crates.io index Installing hvm v2.0.8 Updating crates.io index Locking 29 packages to latest compatible versions Compiling libc v0.2.155 Compiling utf8parse v0.2.1 Compiling anstyle v1.0.7 Compiling anstyle-query v1.0.3 Compiling is_terminal_polyfill v1.70.0 Compiling colorchoice v1.0.1 Compiling clap_lex v0.7.0 Compiling strsim v0.11.1 Compiling anstyle-parse v0.2.4 Compiling cc v1.0.97 Compiling highlight_error v0.1.1 Compiling TSPL v0.0.12 Compiling anstream v0.6.14 error: linkercc` not found
|
= note: No such file or directory (os error 2)

error: could not compile libc (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile hvm v2.0.8, intermediate artifacts can be found at /tmp/cargo-installz7F0B2.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.`

To Reproduce
Steps to reproduce the behavior:

  1. Latest windows and WSL 2
  2. Use command cargo +nightly install hvm
@UsmanTariq2 UsmanTariq2 added the bug Something isn't working label May 18, 2024
@54g0
Copy link

54g0 commented May 18, 2024

Solution for linkercc not found Error on WSLThe error message linkercc not found indicates that the cc compiler (part of the build-essential package) is not installed or not available in your WSL environment. To resolve this error, follow these steps:
1.Update and Upgrade Your System:
sudo apt update
sudo apt upgrade -y
2.Install the Build-Essential Package:
sudo apt install build-essential -y
3.Ensure pkg-config is Installed:
sudo apt install pkg-config -y
4.Retry the Installation: Try to install hvm again
cargo +nightly install hvm
5.Ensure Rust is Installed Correctly: Ensure that Rust and the nightly toolchain are set up correctly in your WSL environment:
rustup update
rustup toolchain install nightly
rustup default nightly
If any other specific errors come up, please provide those details.

@RagnaJok
Copy link

Got the same error but upgrading the system fixed it,
write:
sudo apt-get update
before
sudo apt update
and you can retry the installation of hvm

Thanks 54g0 :))

@kings177
Copy link
Member

kings177 commented May 18, 2024

what @54g0 said is correct @UsmanTariq2, the problem is that you're missing the libc package , which comes with build-essential, i recommend installing build-essential as that will also give you gcc, in case you don't have it, you can install it with sudo apt install build-essential. Please do report back if you manage to fix your issue.

@kings177 kings177 removed the bug Something isn't working label May 18, 2024
@developedby developedby added the help wanted Extra attention is needed label May 18, 2024
@UsmanTariq2
Copy link
Author

Hey, installing build-essential solved the problem
I generally dont install it because it has older versions of g++ installed, and i was under the impresssion that installing g++ installs everything. Manually using latest compiler with build-essential. So on me.

@kings177
Copy link
Member

kings177 commented May 19, 2024

glad to know it worked for you :)

@UsmanTariq2
Copy link
Author

UsmanTariq2 commented May 19, 2024

When i run the command

bend run <file.hvm> # uses the Rust interpreter (sequential)

bash: syntax error near unexpected token newline'`

A typo on the main page perhaps

@kings177
Copy link
Member

assuming you typed the full bend run <file.hvm> # uses the Rust interpreter (sequential).

you're supposed to type an actual path to a file instead of <file.hvm>, so like, for example, you can create a file called test.bend with the following content:

def main:
  list = [1, 2, 3]
  return list

then just do bend run-c test.bend

@UsmanTariq2
Copy link
Author

UsmanTariq2 commented May 19, 2024

Get an error when compiling the sorter example:

Error reading result from hvm. Output :
signal: 11 (SIGSEGV)

Upon the execution /another error, i get :
Errors: Error reading result from hvm. Output : signal: 9 (SIGKILL)

@kings177
Copy link
Member

can you type free -h and paste me the output please?

@UsmanTariq2
Copy link
Author

UsmanTariq2 commented May 19, 2024

           total        used        free      shared  buff/cache   available

Mem: 3.8Gi 668Mi 3.2Gi 660Ki 72Mi 3.1Gi
Swap: 1.0Gi 697Mi 326Mi

@kings177
Copy link
Member

do you get this error everytime you run something with run-c? even if you run something like

def main:
  return "test"

@kings177
Copy link
Member

Closing this since the issue has been fixed and now there has been another issue that falls under #397 and HigherOrderCO/HVM#309

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants