rust-qt / ritual

Use C++ libraries from Rust
Apache License 2.0
1.22k stars 49 forks source link

Compiling the examples fails on arch with Qt 5.15.1 #104

Closed meltinglava closed 3 years ago

meltinglava commented 3 years ago

Followed setting up guide, the last step with compiling the examples did not work. The last step with compiling the examples project failed to compile. Think this issue is with this repo so reporting here.

$ cargo build
   Compiling qt_core v0.5.0
   Compiling qt_widgets v0.5.0
   Compiling qt_gui v0.5.0
   Compiling qt_3d_core v0.5.0
error: failed to run custom build command for `qt_core v0.5.0`

Caused by:
  process didn't exit successfully: `/tmp/examples/target/debug/build/qt_core-40997438507f504a/build-script-build` (exit code: 1)
  --- stdout
  Current Qt version (5.15.1) is unknown to qt_core crate. Using closest known version (5.14.0)

  --- stderr
  [2020-09-27T10:39:11Z ERROR ritual_common::errors] Error:
  [2020-09-27T10:39:11Z ERROR ritual_common::errors]    failed to run command: "cmake" "-Wno-dev" "/home/vagrant/.cargo/registry/src/github.com-1ecc6299db9ec823/qt_core-0.5.0/c_lib" "-DRITUAL_LIBRARY_TYPE=STATIC" "-DRITUAL_CPP_LIB_VERSION=51400" "-DRITUAL_INCLUDE_PATH=/usr/include/qt;/usr/include/qt/QtCore" "-DRITUAL_LIBRARY_PATH=/usr/lib" "-DRITUAL_FRAMEWORK_PATH=" "-DRITUAL_LINKED_LIBS=Qt5Core" "-DRITUAL_LINKED_FRAMEWORKS=" "-DRITUAL_COMPILER_FLAGS=-std=gnu++11 -fPIC" "-DRITUAL_QT=1" "-DCMAKE_BUILD_TYPE=Debug" "-DCMAKE_INSTALL_PREFIX=/tmp/examples/target/debug/build/qt_core-4e6eb06fa9076158/out/c_lib_install"
  [2020-09-27T10:39:11Z ERROR ritual_common::errors]    No such file or directory (os error 2)
warning: build failed, waiting for other jobs to finish...
error: build failed
varomix commented 3 years ago

I had the same issue, get Qt 5.14.0, that worked for me

araraloren commented 3 years ago

Seems like you haven't install the cmake.

zjsxwc commented 3 years ago

in manjaro i installed the dependencies bellow. then the code works. yay -S qt5-3d qt5-charts qt5-quickcontrols2