Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

QuickJS build failed - Ubuntu20 : trying to find rustc #10

Open
krazykoder opened this issue Nov 13, 2023 · 3 comments
Open

QuickJS build failed - Ubuntu20 : trying to find rustc #10

krazykoder opened this issue Nov 13, 2023 · 3 comments

Comments

@krazykoder
Copy link

Trying to build quickjs on ubuntu20. Getting the following error on two different ubuntu instances.

cmake and ninja install was successful.
sudo apt install cmake ninja-build # Ubuntu

quickjs > bash scripts/build.sh # build quickjs qjs qjsc etc.                      ~/code/js/quickjs:@sparta 11:12
+ rm -rf build bin lib
+ mkdir build
+ cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build -S .
-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at build/_deps/corrosion-src/cmake/FindRust.cmake:21 (message):
  `rustc` not found in PATH or `/home/towshif/.cargo/bin`.

  Hint: Check if `rustc` is in PATH or manually specify the location by
  setting `Rust_COMPILER` to the path to `rustc`.
Call Stack (most recent call first):
  build/_deps/corrosion-src/cmake/FindRust.cmake:259 (_findrust_failed)
  build/_deps/corrosion-src/cmake/Corrosion.cmake:57 (find_package)
  build/_deps/corrosion-src/CMakeLists.txt:68 (include)


-- Configuring incomplete, errors occurred!
See also "/home/towshif/code/js/quickjs/build/CMakeFiles/CMakeOutput.log".
+ cmake --build ./build --target qjs run-test262 -j 8
ninja: error: loading 'build.ninja': No such file or directory
@krazykoder krazykoder changed the title QuichJS build failed QuickJS build failed Nov 13, 2023
@krazykoder krazykoder changed the title QuickJS build failed QuickJS build failed - Ubuntu20 : trying to find rustc Nov 13, 2023
@shiqimei
Copy link
Contributor

CMake Error at build/_deps/corrosion-src/cmake/FindRust.cmake:21 (message):
rustc not found in PATH or /home/towshif/.cargo/bin.

The latest version depends on rust, please make sure rust installed.

https://www.rust-lang.org/learn/get-started

@krazykoder
Copy link
Author

A little confused here. I compiled the original repo https://github.com/bellard/quickjs with basic cmake and gcc.
But here, the compiler detection is not using the existing compiler. Rather I should installed another compiler rustc. Is that what you recommend.

-- The C compiler identification is GNU 9.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works

@krazykoder
Copy link
Author

krazykoder commented Nov 16, 2023

Just saw your prior commits. You have progressively moved to rustc for maintainability. Understood thanks.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants