Closed Asterisk-z closed 2 years ago
Installing libfontconfig-dev
solved the issue for me (Ubuntu 22.04).
thanks @binarica
libfontconfig-dev
worked on mine too
Now i am getting this when i run cargo run --bin confetti
warning: associated function is never used: `fset_all`
--> src/runtime/flags.rs:57:12
|
57 | pub fn fset_all(&mut self, sprite: usize, flags: u8) -> u8 {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: function is never used: `spr`
--> src/editor.rs:824:4
|
824 | fn spr<'a>(sprite: usize, x: i32, y: i32) -> impl Into<Element<'a, Msg>> {
| ^^^
warning: `runty8` (lib) generated 2 warnings
Compiling runty8 v0.1.0 (/home/asterisks/projects/learn/Rust/github_project/runty8)
Finished dev [unoptimized + debuginfo] target(s) in 14.60s
Running `target/debug/confetti`
Couldn't create assets directory: ``.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', src/bin/confetti.rs:5:48
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@Asterisk-z I've fixed that error (and the warnings 😄) in the latest commit in master. Please give it another try.
Yeah It works now
Fixed in bee0a5b475f6ca5837a310b64437d71e18192ed6.
I ran cargo run but it exit unsuccessfully
Compiling servo-fontconfig-sys v5.1.0 Compiling freetype-rs v0.26.0 Compiling wayland-client v0.29.4 Compiling calloop v0.10.1 error: failed to run custom build command for
servo-fontconfig-sys v5.1.0`Caused by: process didn't exit successfully:
/home/asterisks/projects/learn/Rust/github_project/runty8/target/debug/build/servo-fontconfig-sys-2c68ca559824e33f/build-script-build
(exit status: 101) --- stdout cargo:rerun-if-env-changed=FONTCONFIG_NO_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG cargo:rerun-if-env-changed=PKG_CONFIG cargo:rerun-if-env-changed=FONTCONFIG_STATIC cargo:rerun-if-env-changed=FONTCONFIG_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_PATH_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_PATH cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_LIBDIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64-unknown-linux-gnu cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR_x86_64_unknown_linux_gnu cargo:rerun-if-env-changed=HOST_PKG_CONFIG_SYSROOT_DIR cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR--- stderr thread 'main' panicked at '
"pkg-config" "--libs" "--cflags" "fontconfig" "fontconfig >= 2.11.1"
did not exit successfully: exit status: 1 error: could not find system library 'fontconfig' required by the 'servo-fontconfig-sys' crate--- stderr Package fontconfig was not found in the pkg-config search path. Perhaps you should add the directory containing
fontconfig.pc' to the PKG_CONFIG_PATH environment variable No package 'fontconfig' found Package fontconfig was not found in the pkg-config search path. Perhaps you should add the directory containing
fontconfig.pc' to the PKG_CONFIG_PATH environment variable No package 'fontconfig' found ', /home/asterisks/.cargo/registry/src/github.com-1ecc6299db9ec823/servo-fontconfig-sys-5.1.0/build.rs:34:17 note: run withRUST_BACKTRACE=1
environment variable to display a backtrace warning: build failed, waiting for other jobs to finish...`