Unable to run project - 'libyoga.a': No such file
Hey,
- I cloned the repo and ensured sub modules are cloned as well.
-
cargo run --releasefails. Any idea what's happening? (I am on fedora 42, x11, gnome 48)
rive-rs git:(main) cargo run --release
Compiling rive-rs v0.1.0 (/home/fermi/Temp/rive-rs/rive-rs)
Compiling mio v0.8.8
Compiling instant v0.1.12
Compiling percent-encoding v2.3.0
Compiling pollster v0.3.0
Compiling winit v0.28.7
warning: [email protected]: ar: '/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/libyoga.a': No such file
error: failed to run custom build command for `rive-rs v0.1.0 (/home/fermi/Temp/rive-rs/rive-rs)`
Caused by:
process didn't exit successfully: `/home/fermi/Temp/rive-rs/target/release/build/rive-rs-bdf5a6c6050d6fa0/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=src/ffi.cpp
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=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
running: "c++" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-m64" "-I" "../submodules/rive-cpp/include" "-std=c++14" "-o" "/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/src/ffi.o" "-c" "src/ffi.cpp"
exit status: 0
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
running: ZERO_AR_DATE="1" "ar" "cq" "/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/librive-ffi.a" "/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/src/ffi.o"
exit status: 0
running: "ar" "s" "/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/librive-ffi.a"
exit status: 0
cargo:rustc-link-lib=static=rive-ffi
cargo:rustc-link-search=native=/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out
cargo:rerun-if-env-changed=CXXSTDLIB_x86_64-unknown-linux-gnu
CXXSTDLIB_x86_64-unknown-linux-gnu = None
cargo:rerun-if-env-changed=CXXSTDLIB_x86_64_unknown_linux_gnu
CXXSTDLIB_x86_64_unknown_linux_gnu = None
cargo:rerun-if-env-changed=HOST_CXXSTDLIB
HOST_CXXSTDLIB = None
cargo:rerun-if-env-changed=CXXSTDLIB
CXXSTDLIB = None
cargo:rustc-link-lib=stdc++
TARGET = Some("x86_64-unknown-linux-gnu")
HOST = Some("x86_64-unknown-linux-gnu")
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
running: "ar" "s" "/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/libyoga.a"
cargo:warning=ar: '/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/libyoga.a': No such file
exit status: 1
--- stderr
error occurred: Command "ar" "s" "/home/fermi/Temp/rive-rs/target/release/build/rive-rs-461925fcbf43eaf5/out/libyoga.a" with args "ar" did not execute successfully (status code exit status: 1).
warning: build failed, waiting for other jobs to finish...
Compile the program without the "layout" feature enabled. (cargo build --no-default-features --features text)
No clue why the layout feature is enabled by default when the yoga submodule isn't in the repo.
Followed the steps after cloning locally then used the "cargo build --no-default-features --features text" command. ended up with the same missing libyoga.a file error?
Compiling libc v0.2.172
Compiling autocfg v1.4.0
Compiling proc-macro2 v1.0.95
Compiling cfg-if v1.0.1
Compiling unicode-ident v1.0.18
Compiling shlex v1.3.0
Compiling smallvec v1.15.1
Compiling bitflags v1.3.2
Compiling crossbeam-utils v0.8.21
Compiling core-foundation-sys v0.8.7
Compiling parking_lot_core v0.9.11
Compiling simd-adler32 v0.3.7
Compiling scopeguard v1.2.0
Compiling thiserror v1.0.69
Compiling paste v1.0.15
Compiling rayon-core v1.12.1
Compiling num-traits v0.2.19
Compiling lock_api v0.4.13
Compiling indexmap v1.9.3
Compiling bitflags v2.9.1
Compiling log v0.4.27
Compiling arrayvec v0.7.6
Compiling quote v1.0.40
Compiling syn v2.0.102
Compiling crossbeam-epoch v0.9.18
Compiling jobserver v0.1.33
Compiling cc v1.2.26
Compiling core-foundation v0.9.4
Compiling crossbeam-deque v0.8.6
Compiling malloc_buf v0.0.6
Compiling core-graphics-types v0.1.3
Compiling khronos-egl v4.1.0
Compiling termcolor v1.4.1
Compiling hashbrown v0.12.3
Compiling foreign-types-shared v0.3.1
Compiling adler2 v2.0.1
Compiling bit-vec v0.6.3
Compiling unicode-width v0.1.14
Compiling miniz_oxide v0.8.9
Compiling bit-set v0.5.3
Compiling codespan-reporting v0.11.1
Compiling parking_lot v0.12.4
Compiling libloading v0.7.4
Compiling unicode-xid v0.2.6
Compiling hexf-parse v0.2.1
Compiling rustc-hash v1.1.0
Compiling raw-window-handle v0.5.2
Compiling block v0.1.6
Compiling wgpu-types v0.17.0
Compiling crc32fast v1.4.2
Compiling libloading v0.8.8
Compiling objc-sys v0.2.0-beta.2
Compiling objc_exception v0.1.2
Compiling font-types v0.3.4
Compiling glow v0.12.3
Compiling either v1.15.0
Compiling profiling v1.0.16
Compiling rayon v1.10.0
Compiling flate2 v1.1.2
Compiling read-fonts v0.10.0
Compiling euclid v0.22.11
Compiling kurbo v0.9.5
Compiling weezl v0.1.10
Compiling objc v0.2.7
Compiling same-file v1.0.6
Compiling svg_fmt v0.4.5
Compiling peniko v0.1.0 (https://github.com/linebender/peniko?rev=cafdac9a211a0fb2fec5656bd663d1ac770bcc81#cafdac9a)
Compiling guillotiere v0.6.2
Compiling walkdir v2.5.0
Compiling zune-inflate v0.2.54
Compiling fdeflate v0.3.7
Compiling half v2.6.0
Compiling cfg_aliases v0.1.1
Compiling bit_field v0.10.2
Compiling foreign-types-macros v0.2.3
Compiling thiserror-impl v1.0.69
Compiling bytemuck_derive v1.9.3
Compiling jpeg-decoder v0.3.1
Compiling lebe v0.5.2
Compiling foreign-types-shared v0.1.1
Compiling color_quant v1.1.0
Compiling static_assertions v1.1.0
Compiling futures-core v0.3.31
Compiling foreign-types v0.3.2
Compiling foreign-types v0.5.0
Compiling futures-intrusive v0.5.0
Compiling gif v0.13.1
Compiling exr v1.73.0
Compiling metal v0.26.0
Compiling tiff v0.9.1
Compiling png v0.17.16
Compiling bytemuck v1.23.1
Compiling winit v0.28.7
Compiling qoi v0.4.1
Compiling naga v0.13.0
Compiling objc2-encode v2.0.0-pre.2
Compiling rive-rs v0.1.0 (/•Projects/rust-projects/rive-rs/rive-rs)
Compiling fello v0.1.0 (https://github.com/dfrg/fount?rev=dadbcf75695f035ca46766bfd60555d05bd421b1#dadbcf75)
Compiling byteorder v1.5.0
Compiling objc2 v0.3.0-beta.3.patch-leaks.3
Compiling core-graphics v0.22.3
Compiling vello_encoding v0.1.0 (https://github.com/linebender/vello?rev=ee3a076#ee3a076b)
Compiling image v0.24.9
Compiling instant v0.1.13
Compiling once_cell v1.21.3
warning: [email protected]: error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: can't open file: /•Projects/rust-projects/rive-rs/target/debug/build/rive-rs-3dc5e9416e358b2b/out/libyoga.a (No such file or directory)
warning: [email protected]: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar: internal ranlib command failed
error: failed to run custom build command for `rive-rs v0.1.0 (/•Projects/rust-projects/rive-rs/rive-rs)`
Caused by:
process didn't exit successfully: `/•Projects/rust-projects/rive-rs/target/debug/build/rive-rs-9890e7a3640bfc26/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=src/ffi.cpp
OUT_DIR = Some(/•Projects/rust-projects/rive-rs/target/debug/build/rive-rs-3dc5e9416e358b2b/out)
OPT_LEVEL = Some(0)
TARGET = Some(aarch64-apple-darwin)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=CXX_aarch64-apple-darwin
CXX_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CXX_aarch64_apple_darwin
CXX_aarch64_apple_darwin = 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
RUSTC_WRAPPER = None
cargo:rerun-if-env-changed=CRATE_CC_NO_DEFAULTS
CRATE_CC_NO_DEFAULTS = None
DEBUG = Some(true)
cargo:rerun-if-env-changed=MACOSX_DEPLOYMENT_TARGET
MACOSX_DEPLOYMENT_TARGET = None
cargo:rerun-if-env-changed=CXXFLAGS
CXXFLAGS = None
cargo:rerun-if-env-changed=HOST_CXXFLAGS
HOST_CXXFLAGS = None
cargo:rerun-if-env-changed=CXXFLAGS_aarch64_apple_darwin
CXXFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=CXXFLAGS_aarch64-apple-darwin
CXXFLAGS_aarch64-apple-darwin = None
CARGO_ENCODED_RUSTFLAGS = Some()
cargo:rerun-if-env-changed=AR_aarch64-apple-darwin
AR_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=AR_aarch64_apple_darwin
AR_aarch64_apple_darwin = 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
ARFLAGS = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS_aarch64_apple_darwin
ARFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=ARFLAGS_aarch64-apple-darwin
ARFLAGS_aarch64-apple-darwin = None
cargo:rustc-link-lib=static=rive-ffi
cargo:rustc-link-search=native=/•Projects/rust-projects/rive-rs/target/debug/build/rive-rs-3dc5e9416e358b2b/out
cargo:rerun-if-env-changed=CXXSTDLIB_aarch64-apple-darwin
CXXSTDLIB_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CXXSTDLIB_aarch64_apple_darwin
CXXSTDLIB_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=HOST_CXXSTDLIB
HOST_CXXSTDLIB = None
cargo:rerun-if-env-changed=CXXSTDLIB
CXXSTDLIB = None
cargo:rustc-link-lib=c++
OUT_DIR = Some(/•Projects/rust-projects/rive-rs/target/debug/build/rive-rs-3dc5e9416e358b2b/out)
TARGET = Some(aarch64-apple-darwin)
HOST = Some(aarch64-apple-darwin)
cargo:rerun-if-env-changed=AR_aarch64-apple-darwin
AR_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=AR_aarch64_apple_darwin
AR_aarch64_apple_darwin = 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
ARFLAGS = None
cargo:rerun-if-env-changed=HOST_ARFLAGS
HOST_ARFLAGS = None
cargo:rerun-if-env-changed=ARFLAGS_aarch64_apple_darwin
ARFLAGS_aarch64_apple_darwin = None
cargo:rerun-if-env-changed=ARFLAGS_aarch64-apple-darwin
ARFLAGS_aarch64-apple-darwin = None
cargo:rerun-if-env-changed=CC_ENABLE_DEBUG_OUTPUT
cargo:warning=error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: can't open file: /•Projects/rust-projects/rive-rs/target/debug/build/rive-rs-3dc5e9416e358b2b/out/libyoga.a (No such file or directory)
cargo:warning=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar: internal ranlib command failed
--- stderr
error occurred in cc-rs: command did not execute successfully (status code exit status: 1): "ar" "s" "/\xe2\x80\xa2Projects/rust-projects/rive-rs/target/debug/build/rive-rs-3dc5e9416e358b2b/out/libyoga.a"
warning: build failed, waiting for other jobs to finish...
Whoops looks like you can't chain --no-default-features and --features. I'd try --no-default-features, if that works fine try experimenting with just --features "text"
builds fine with just the --no-default-features flag in the ~/rive-rs/rive-rs directory.
$ cargo build --no-default-features
"Finished dev profile [unoptimized + debuginfo] target(s) in 0.02s" - nothing happen afterward.
but when trying to run the viewer from the project root with the following command cargo run -r --no-default-features
the same failed build output missing the libyoga.a appears. not sure how to correctly load the rive viewer.
Is this repo in very early development? Very new to rust and still learning the ropes so its not clear what step I missed from the provided instructions.