Bend icon indicating copy to clipboard operation
Bend copied to clipboard

Bend command not found

Open milen-prg opened this issue 9 months ago • 4 comments

Describe the bug I installed the Bend lang on WSL2 Windows 11 Pro 64 bit, Ubuntu 24: BUT:

user@DESKTOP-UIDK5MM:/mnt/c/Users/User/Downloads$ cargo +nightly install hvm Updating crates.io index Ignored package hvm v2.0.8 is already installed, use --force to override user@DESKTOP-UIDK5MM:/mnt/c/Users/User/Downloads$ cargo +nightly install bend-lang Updating crates.io index Ignored package bend-lang v0.2.7 is already installed, use --force to override user@DESKTOP-UIDK5MM:/mnt/c/Users/User/Downloads$ bend --help Command 'bend' not found, did you mean: command 'tend' from snap tend (0+git.1ad02aa) command 'ben' from deb ben (0.10.3ubuntu2) command 'blend' from deb mrtrix3 (3.0.4-1) command 'send' from deb mailutils-mh (1:3.16-1build1) command 'send' from deb mmh (0.4-6) command 'send' from deb nmh (1.8-1) command 'bnd' from deb bnd (5.0.1-4) See 'snap info ' for additional versions.

milen-prg avatar May 18 '24 08:05 milen-prg

I'm not sure if this will help, but here is the list of commands I ran that got Bend working on my Ubuntu system:

sudo apt -y update
sudo apt install -y build-essential
sudo apt install -y curl

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh

# NOTE: iis use zsh for my shell, if you use bash source the ".bashrc" file
source ~/.zshrc

rustup default nightly

cargo +nightly install hvm
cargo +nightly install bend-lang

MehmetMHY avatar May 18 '24 08:05 MehmetMHY

I think you might not have included the cargo bin directory in you PATH environment variable. Can you echo $PATH? It should include something about cargo, for me it has /home/nicolas/.cargo/bin/ (i'm on linux, might be a different location on wsl)

developedby avatar May 18 '24 09:05 developedby

@developedby , I added export PATH=$PATH:~/.cargo/bin/ to my .bashrc, then made bend1.hvm file with: def main(): return "Hello, world!"

and tried: user@DESKTOP-UID:~/prb$ bend run-cu bend1.hvm Errors: Error reading result from hvm. Output : CUDA not available!

(I tried run and run-c, they work: Result: "Hello, world!")

I tried to install also: sudo apt install nvidia-cuda-toolkit

but this nothing changes.

On the Windows system I have NVIDIA GeForce RTX 3060 with Driver Version: 552.44 CUDA Version: 12.4.

milen-prg avatar May 18 '24 11:05 milen-prg

I tried to install also: sudo apt install nvidia-cuda-toolkit

I wonder which drivers you're using... Can you run

lshw -c video | grep "driver"

and see what it says? That will tell us more.

ethanbarry avatar May 18 '24 13:05 ethanbarry

@developedby , I added export PATH=$PATH:~/.cargo/bin/ to my .bashrc, then made bend1.hvm file with: def main(): return "Hello, world!"

and tried: user@DESKTOP-UIDK5MM:~/prb$ bend run-cu bend1.hvm Errors: Error reading result from hvm. Output : CUDA not available!

(I tried run and run-c, they work: Result: "Hello, world!")

I tried to install also: sudo apt install nvidia-cuda-toolkit

but this nothing changes.

On the Windows system I have NVIDIA GeForce RTX 3060 with Driver Version: 552.44 CUDA Version: 12.4.

If you didn't have CUDA installed when you compiled HVM then it won't have run-cu available. If you installed CUDA after installing HVM, you need to reinstall it and it will add the CUDA part

developedby avatar May 18 '24 14:05 developedby

@developedby , i tried to reinstall, but:

user@DESKTOP-UID:/mnt/c/Users/User/Downloads$ cargo +nightly install --force hvm 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 is_terminal_polyfill v1.70.0 Compiling anstyle v1.0.7 Compiling colorchoice v1.0.1 Compiling anstyle-query v1.0.3 Compiling cc v1.0.97 Compiling strsim v0.11.1 Compiling clap_lex v0.7.0 Compiling highlight_error v0.1.1 Compiling anstyle-parse v0.2.4 Compiling TSPL v0.0.12 Compiling anstream v0.6.14 Compiling clap_builder v4.5.2 Compiling num_cpus v1.16.0 Compiling hvm v2.0.8 Compiling clap v4.5.4 The following warnings were emitted during compilation:

warning: [email protected]: In file included from /usr/include/cuda_runtime.h:83, warning: [email protected]: from : warning: [email protected]: /usr/include/crt/host_config.h:132:2: error: #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. warning: [email protected]: 132 | #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. warning: [email protected]: | ^~~~~

error: failed to run custom build command for hvm v2.0.8

Caused by: process didn't exit successfully: /tmp/cargo-installLWt8LI/release/build/hvm-0224ab115f50270c/build-script-build (exit status: 1) --- stdout TARGET = Some("x86_64-unknown-linux-gnu") HOST = Some("x86_64-unknown-linux-gnu") cargo:rerun-if-env-changed=CC_x86_64-unknown-linux-gnu CC_x86_64-unknown-linux-gnu = None cargo:rerun-if-env-changed=CC_x86_64_unknown_linux_gnu CC_x86_64_unknown_linux_gnu = None cargo:rerun-if-env-changed=HOST_CC HOST_CC = None cargo:rerun-if-env-changed=CC CC = None cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2") cargo:rerun-if-env-changed=CFLAGS_x86_64-unknown-linux-gnu CFLAGS_x86_64-unknown-linux-gnu = None cargo:rerun-if-env-changed=CFLAGS_x86_64_unknown_linux_gnu CFLAGS_x86_64_unknown_linux_gnu = None cargo:rerun-if-env-changed=HOST_CFLAGS HOST_CFLAGS = None cargo:rerun-if-env-changed=CFLAGS CFLAGS = None cargo:rerun-if-env-changed=AR_x86_64-unknown-linux-gnu AR_x86_64-unknown-linux-gnu = None cargo:rerun-if-env-changed=AR_x86_64_unknown_linux_gnu AR_x86_64_unknown_linux_gnu = None cargo:rerun-if-env-changed=HOST_AR HOST_AR = None cargo:rerun-if-env-changed=AR AR = None cargo:rerun-if-env-changed=ARFLAGS_x86_64-unknown-linux-gnu ARFLAGS_x86_64-unknown-linux-gnu = None cargo:rerun-if-env-changed=ARFLAGS_x86_64_unknown_linux_gnu ARFLAGS_x86_64_unknown_linux_gnu = None cargo:rerun-if-env-changed=HOST_ARFLAGS HOST_ARFLAGS = None cargo:rerun-if-env-changed=ARFLAGS ARFLAGS = None cargo:rustc-link-lib=static=hvm-c cargo:rustc-link-search=native=/tmp/cargo-installLWt8LI/release/build/hvm-d9bb437251039338/out cargo:rerun-if-changed=src/hvm.c cargo:rustc-link-search=native=/usr/local/cuda/lib64 TARGET = Some("x86_64-unknown-linux-gnu") OPT_LEVEL = Some("3") HOST = Some("x86_64-unknown-linux-gnu") cargo:rerun-if-env-changed=CXX_x86_64-unknown-linux-gnu CXX_x86_64-unknown-linux-gnu = None cargo:rerun-if-env-changed=CXX_x86_64_unknown_linux_gnu CXX_x86_64_unknown_linux_gnu = None cargo:rerun-if-env-changed=HOST_CXX HOST_CXX = None cargo:rerun-if-env-changed=CXX CXX = None cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT cargo:rerun-if-env-changed=NVCC_x86_64-unknown-linux-gnu NVCC_x86_64-unknown-linux-gnu = None cargo:rerun-if-env-changed=NVCC_x86_64_unknown_linux_gnu NVCC_x86_64_unknown_linux_gnu = None cargo:rerun-if-env-changed=HOST_NVCC HOST_NVCC = None cargo:rerun-if-env-changed=NVCC NVCC = None cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS CRATE_CC_NO_DEFAULTS = None DEBUG = Some("false") CARGO_CFG_TARGET_FEATURE = Some("fxsr,sse,sse2") cargo:rerun-if-env-changed=CXXFLAGS_x86_64-unknown-linux-gnu CXXFLAGS_x86_64-unknown-linux-gnu = None cargo:rerun-if-env-changed=CXXFLAGS_x86_64_unknown_linux_gnu CXXFLAGS_x86_64_unknown_linux_gnu = None cargo:rerun-if-env-changed=HOST_CXXFLAGS HOST_CXXFLAGS = None cargo:rerun-if-env-changed=CXXFLAGS CXXFLAGS = None cargo:warning=In file included from /usr/include/cuda_runtime.h:83, cargo:warning= from : cargo:warning=/usr/include/crt/host_config.h:132:2: error: #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. cargo:warning= 132 | #error -- unsupported GNU version! gcc versions later than 12 are not supported! The nvcc flag '-allow-unsupported-compiler' can be used to override this version check; however, using an unsupported host compiler may cause compilation failure or incorrect run time execution. Use at your own risk. cargo:warning= | ^~~~~

--- stderr

error occurred: Command "nvcc" "-ccbin=c++" "-Xcompiler" "-O3" "-Xcompiler" "-ffunction-sections" "-Xcompiler" "-fdata-sections" "-Xcompiler" "-fPIC" "-m64" "-Xcompiler" "-Wall" "-Xcompiler" "-Wextra" "-o" "/tmp/cargo-installLWt8LI/release/build/hvm-d9bb437251039338/out/2e40c9e35e9506f4-hvm.o" "-c" "src/hvm.cu" with args nvcc did not execute successfully (status code exit status: 1).

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-installLWt8LI. To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.


I tried:

user@DESKTOP-UID:/mnt/c/Users/User/Downloads$ export NVCC_APPEND_FLAGS='-allow-unsupported-compiler'

BUT:

user@DESKTOP-UID:/mnt/c/Users/User/Downloads$ cargo +nightly install --force hvm 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 is_terminal_polyfill v1.70.0 Compiling anstyle-query v1.0.3 Compiling anstyle v1.0.7 Compiling colorchoice v1.0.1 Compiling clap_lex v0.7.0 Compiling strsim v0.11.1 Compiling cc v1.0.97 Compiling highlight_error v0.1.1 Compiling anstyle-parse v0.2.4 Compiling TSPL v0.0.12 Compiling anstream v0.6.14 Compiling clap_builder v4.5.2 Compiling num_cpus v1.16.0 Compiling hvm v2.0.8 Compiling clap v4.5.4 The following warnings were emitted during compilation:

warning: [email protected]: /usr/include/stdlib.h(141): error: identifier "_Float32" is undefined warning: [email protected]:

..................................................

It's too complex for me, I apologize, but I'm not so curious (and experienced!) for now. I wish to this lang to develop forward and maybe when I can try natively on Windows, I will try again. Thanks!

milen-prg avatar May 18 '24 15:05 milen-prg