Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Debian build fails on fresh build from git #54

Open
PlanetSmasher opened this issue Aug 28, 2024 · 7 comments
Open

Debian build fails on fresh build from git #54

PlanetSmasher opened this issue Aug 28, 2024 · 7 comments

Comments

@PlanetSmasher
Copy link

Hi
I am trying to build mstickeditor for my Debian Server (I tried 11 and 12)
It fails to build from scratch as it complains about rlottie.

As I am not a Rust dev, I assumed it would prepare all packages during build.
For now I tried building rlottie from scratch on my dev machine (debian 11) and it startet complaining about libclang. after installing that it, comes back to rlottie and fails

I used the command:

cargo install --locked mstickereditor

LibC error:

error: failed to run custom build command for rlottie-sys v0.2.9

Caused by:
process didn't exit successfully: /tmp/cargo-installngcOY1/release/build/rlottie-sys-771085b9b23b4109/build-script-build (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=RLOTTIE_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=RLOTTIE_STATIC
cargo:rerun-if-env-changed=RLOTTIE_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
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=SYSROOT
cargo:rerun-if-env-changed=RLOTTIE_STATIC
cargo:rerun-if-env-changed=RLOTTIE_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rustc-link-search=native=/usr/lib
cargo:rustc-link-lib=rlottie
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=RLOTTIE_STATIC
cargo:rerun-if-env-changed=RLOTTIE_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
cargo:rerun-if-changed=wrapper.h
cargo:rerun-if-env-changed=TARGET
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

--- stderr
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/bindgen-0.68.1/lib.rs:611:31:
Unable to find libclang: "couldn't find any valid shared libraries matching: ['libclang.so', 'libclang-.so', 'libclang.so.', 'libclang-.so.'], set the LIBCLANG_PATH environment variable to a path where one of these files can be found (invalid: [])"
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile mstickereditor v0.3.6, intermediate artifacts can be found at /tmp/cargo-installngcOY1.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

rlottie error:

error: failed to run custom build command for rlottie-sys v0.2.9

Caused by:
process didn't exit successfully: /tmp/cargo-installugFQtA/release/build/rlottie-sys-771085b9b23b4109/build-script-build (exit status: 101)
--- stdout
cargo:rerun-if-env-changed=RLOTTIE_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=RLOTTIE_STATIC
cargo:rerun-if-env-changed=RLOTTIE_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
cargo:rerun-if-env-changed=PKG_CONFIG_SYSROOT_DIR
cargo:rerun-if-env-changed=SYSROOT
cargo:rerun-if-env-changed=RLOTTIE_STATIC
cargo:rerun-if-env-changed=RLOTTIE_DYNAMIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_STATIC
cargo:rerun-if-env-changed=PKG_CONFIG_ALL_DYNAMIC
cargo:rustc-link-search=native=/usr/lib
cargo:rustc-link-lib=rlottie
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=RLOTTIE_STATIC
cargo:rerun-if-env-changed=RLOTTIE_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
cargo:rerun-if-changed=wrapper.h
cargo:rerun-if-env-changed=TARGET
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64-unknown-linux-gnu
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS_x86_64_unknown_linux_gnu
cargo:rerun-if-env-changed=BINDGEN_EXTRA_CLANG_ARGS

--- stderr
wrapper.h:1:10: fatal error: 'rlottie_capi.h' file not found
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rlottie-sys-0.2.9/build.rs:17:10:
Unable to generate bindings: ClangDiagnostic("wrapper.h:1:10: fatal error: 'rlottie_capi.h' file not found\n")
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...
error: failed to compile mstickereditor v0.3.6, intermediate artifacts can be found at /tmp/cargo-installugFQtA.
To reuse those artifacts with a future compilation, set the environment variable CARGO_TARGET_DIR to that path.

Could someon clarify whats the correct way of building mstickeditor?

thanks a lot

@PlanetSmasher
Copy link
Author

PlanetSmasher commented Aug 28, 2024

I Installed rust from their website

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

the rlottie make install was here:

user@debian:~/git/rlottie/build$ sudo make install
[sudo] Passwort für user:
[ 89%] Built target rlottie
[ 94%] Built target rlottie-image-loader
[100%] Built target lottie2gif
Install the project...
-- Install configuration: "MinSizeRel"
-- Installing: /usr/lib/pkgconfig/rlottie.pc
-- Installing: /home/user/test/include/rlottie.h
-- Installing: /home/user/test/include/rlottie_capi.h
-- Installing: /home/user/test/include/rlottiecommon.h
-- Installing: /usr/lib/librlottie.a
-- Installing: /usr/lib/cmake/rlottie/rlottieTargets.cmake
-- Installing: /usr/lib/cmake/rlottie/rlottieTargets-minsizerel.cmake
-- Installing: /usr/lib/cmake/rlottie/rlottieConfig.cmake
-- Installing: /usr/lib/cmake/rlottie/rlottieConfigVersion.cmake
-- Installing: /usr/lib/librlottie-image-loader.so

@LuckyTurtleDev
Copy link
Owner

LuckyTurtleDev commented Aug 28, 2024

As I am not a Rust dev, I assumed it would prepare all packages during build.

This happen with rust dependencies. But rlottie i a c libary, which makes stuff complicated.
You can disable lottie support and all optional features with cargo install mstickereditor --no-default-features.
ffmped support can be reenable with --features ffmpeg or --features ffmpeg-build.

I can not help you much with the rlottie issue. You should create a issue at the rlottie create https://github.com/msrd0/rlottie-rs.

Repository owner deleted a comment Aug 28, 2024
@PlanetSmasher
Copy link
Author

Thanks
it works without default features.

But without rlottie means for me > no animated stickers?

@LuckyTurtleDev
Copy link
Owner

Yes. But video sticker are still supported with the ffmpeg feature.
Lottie is the reason why i do not publish a binary.
C libs are real pain sometimes.
How mention above you can ask at the lottie-rs crate repo about this issue.

@msrd0
Copy link
Collaborator

msrd0 commented Aug 28, 2024

Hey, author of lottie-rs here. I can tell you that lottie-rs needs to dynamically link libclang.so during compile time, and expects pkg-config to find some form of rlottie library on your system. Depending on your system (I hope it's Linux, otherwise you're completely on your own, see msrd0/rlottie-rs#43) the way to install that can be different. The install command you showed above however looks promising, so assuming you have the corresponding llvm/clang libs installed it should™ compile.

@PlanetSmasher
Copy link
Author

Thanks a lot for the many quick answers.

I have build now mstickereditor without rlottie support.

My assumption that I can build the software without building all dependencies is not correct.

My take please correct me if I am wrong:

For the users that read this issue I guess that I have to build first all dependencies, partly from scratch with the appropiate build tools, before I can start building mstickereditor.

@msrd0
Copy link
Collaborator

msrd0 commented Aug 29, 2024

I have to build first all dependencies, partly from scratch with the appropiate build tools, before I can start building mstickereditor.

This is correct but let me add some additional info.

I suggest we split up dependencies into three categories:

  • compile-time system dependencies. This includes libclang.so. These need to be installed on the system by you before you compile mstickereditor and can be removed thereafter if you want.
  • run-time system dependencies. This includes rlottie. These need to be installed on the system by you before you compile mstickereditor, and must not be removed thereafter. Recompilation of mstickereditor might be necessary when you update the version installed on the system.
  • Rust dependencies. Cargo will take care of them. Don't worry about them.

@github-staff github-staff deleted a comment from ViniciusSCG Oct 1, 2024
@github-staff github-staff deleted a comment from ViniciusSCG Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@msrd0 @PlanetSmasher @LuckyTurtleDev and others