Open cessenat opened 7 months ago
Hi @cessenat We also have sanzu on centOS 7 here, and if I remember correctly, I agree with you: I may haved missed a dependency update on clang of clang-devel (I will double check this, and update the README accordingly)
By the way, you need another fix to run sanzu on centos 7: As it distributes an old FFmpeg version, you have to use this patch:
diff --git a/sanzu/src/video_decoder.rs b/sanzu/src/video_decoder.rs
index b1e1838c..c909b620 100644
--- a/sanzu/src/video_decoder.rs
+++ b/sanzu/src/video_decoder.rs
@@ -33,6 +33,10 @@ pub fn init_video_codec<'a>(
ffmpeg::av_log_set_level(ffmpeg::AV_LOG_FATAL);
}
+ unsafe {
+ ffmpeg::av_register_all();
+ }
+
let decoder: Box<dyn Decoder> = match name {
"null" => Box::new(DecoderNull {
data_rgb: None,
diff --git a/sanzu/src/video_encoder.rs b/sanzu/src/video_encoder.rs
index c4d210b0..d08a8553 100644
--- a/sanzu/src/video_encoder.rs
+++ b/sanzu/src/video_encoder.rs
@@ -611,6 +611,11 @@ pub fn init_video_encoder<'a>(
unsafe {
ffmpeg::av_log_set_level(ffmpeg::AV_LOG_FATAL);
}
+
+ unsafe {
+ ffmpeg::av_register_all();
+ }
+
let encoder: Box<dyn Encoder> = match name {
"null" => Box::new(EncoderNull::new()),
name => {
which you can find in this branch: https://github.com/cea-sec/sanzu/tree/ffmpeg_old
The av_register_all
is mandatory in old FFmpeg versions to prepare codec search (for decoding and encoding), and is now deprecated (so must be removed).
But I may stop maintain it in a near future, as centos7 EOL is soon ( :skull: in june 2024)
Thanks @serpilliere. I cannot install any OS package so I install everything with spack, including ffmpeg. Probably I do not have the proper packages from my distro, and I failed to find thge equivalent in spack ; I installed llvm@14 but that did not fix the error. I have llvm-private installed, but no clang or clang-dev - I thought it were the same thing.
$ yum whatprovides '*/libclangAST.so'
Modules complémentaires chargés : fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.in2p3.fr
* epel: mirror.cspacehostings.com
* extras: mirror.in2p3.fr
* rpmfusion-free-updates: ftp.nluug.nl
* updates: mirror.in2p3.fr
llvm-private-7.0.1-1.el7.i686 : llvm engine for Mesa
Dépôt : base
Correspondance depuis :
Nom de fichier : /usr/lib/clang-private/libclangAST.so
llvm-private-7.0.1-1.el7.x86_64 : llvm engine for Mesa
Dépôt : base
Correspondance depuis :
Nom de fichier : /usr/lib64/clang-private/libclangAST.so
llvm-private-7.0.1-1.el7.x86_64 : llvm engine for Mesa
Dépôt : @CentOS
Correspondance depuis :
Nom de fichier : /usr/lib64/clang-private/libclangAST.so
$ rpm -q llvm-private
llvm-private-7.0.1-1.el7.x86_64
I try to build sanzu for CentOS7 as a simple user with no sudo privilege. I use a decent gcc compiler (8.4). I obviously have missed a pre-requisite about "libclang": it fails as follows: << $ spack install sanzu %gcc ^cmake@3.27.9
I join the spack package. package.py.gz