HandBrake / HandBrake

HandBrake's main development repository
https://handbrake.fr
Other
16.29k stars 1.28k forks source link

Can't compile Handbrake 1.8.1 on Debian 12 #6154

Closed itisljar closed 14 hours ago

itisljar commented 3 days ago

Problem Description

Hello.

I'm trying to compile my own version of handbrakecli and hb.dll to include fdk_aac encoder, and the copmiling fails after a while. I've tried compiling latest handbrake with manual on documentation page without fdkaac encoder, same thing. It just stops and says it's all done. I've done that for previous versions, last one would be 1.7.3 without problems.

Activity Log, Crash Log or any other details

Linux backup3 6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03) x86_64 GNU/Linux

sudo apt-get install autoconf automake build-essential cmake git libass-dev libbz2-dev libfontconfig-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libjansson-dev liblzma-dev libmp3lame-dev libnuma-dev libogg-dev libopus-dev libsamplerate0-dev libspeex-dev libtheora-dev libtool libtool-bin libturbojpeg0-dev libvorbis-dev libx264-dev libxml2-dev libvpx-dev m4 make meson nasm ninja-build patch python3 pkg-config tar zlib1g-dev

sudo apt-get install libva-dev libdrm-dev

sudo apt-get install appstream desktop-file-utils gettext gstreamer1.0-libav gstreamer1.0-plugins-good libgstreamer-plugins-base1.0-dev libgtk-4-dev

git clone https://github.com/HandBrake/HandBrake.git && cd HandBrake

./configure --launch-jobs=$(nproc) --launch

(HERE IT GOES DOWNLOADING AND COMPILING, AND IT COMES TO THIS PART)

  : dav1d 1.4.3
  :
  :   User defined options
  :     buildtype      : release
  :     default_library: static
  :     libdir         : /home/infotehnika/HandBrake/build/contrib/lib/
  :     prefix         : /home/infotehnika/HandBrake/build/contrib/
  :     c_args         : -I/home/infotehnika/HandBrake/build/contrib/include -mfpmath=sse -msse2 -fstack-protector-strong -D_FORTIFY_SOURCE=2
  :     c_link_args    : -L/home/infotehnika/HandBrake/build/contrib/lib -fstack-protector-strong
  :     enable_tests   : false
  :     enable_tools   : false
  :
  : Found ninja-1.11.1 at /usr/bin/ninja
  : touch contrib/libdav1d/.stamp.libdav1d.configure
  : gmake[3]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : touch contrib/ffmpeg/.stamp.ffmpeg.extract
  : [ 98%] Built target encoder
  : gmake[3]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : [ 98%] Built target common
  : gmake[3]: Entering directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : gmake[3]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : gmake[3]: Entering directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : [100%] Linking CXX static library libx265.a
  : gmake[3]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : [100%] Built target x265-static
  : gmake[2]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : gmake[1]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/x265/x265_3.6/8bit'
  : touch contrib/x265/.stamp.x265_8.build
  : gmake[3]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/build'
  : [100%] Built target ENCODER_CODEC
  : gmake[3]: Entering directory '/home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/build'
  : gmake[3]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/build'
  : gmake[3]: Entering directory '/home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/build'
  : [100%] Linking C static library /home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/Bin/Release/libSvtAv1Enc.a
  : gmake[3]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/build'
  : [100%] Built target SvtAv1Enc
  : gmake[2]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/build'
  : gmake[1]: Leaving directory '/home/infotehnika/HandBrake/build/contrib/svt-av1/SVT-AV1-v2.1.0/build'
  : touch contrib/svt-av1/.stamp.svt-av1.build
-------------------------------------------------------------------------------
time end: Wed Jun 26 09:48:25 2024
duration: 1 minute, 55 seconds (115.88s)
result: FAILURE (code 2)
-------------------------------------------------------------------------------
Build is finished!
You may now cd into ./build and examine the output.

What Operating System are you running?

Debian 12 bookworm, updated

What version of HandBrake are you running?

1.8.1

Where did you download HandBrake from?

From commands and script available on handbrake site

galad87 commented 3 days ago

The error is somewhere before that, many libraries are being compiled in parallel, so the output is a bit mixed up. Try to clean the build and then do a non parallel build:

make xclean make

itisljar commented 2 days ago

I started single threaded compiling:

./configure --cross=x86_64-w64-mingw32 --launch

  : /usr/bin/rm -f ./contrib/libdovi/.stamp.libdovi.build
  : cd "./contrib/libdovi/dovi_tool-libdovi-3.3.0/dolby_vision"; /home/infotehnika/.cargo/bin/cargo cbuild --release --library-type staticlib --prefix "/home/infotehnika/HandBrake/build/contrib/" --pkgconfigdir "/home/infotehnika/HandBrake/build/contrib//lib/pkgconfig"
  : Error: CliError { error: Some(package `bitstream-io v2.4.2` cannot be built because it requires rustc 1.79 or newer, while the currently active rustc version is 1.74.0
  : Either upgrade to rustc 1.79 or newer, or use
  : cargo update -p bitstream-io@2.4.2 --precise ver
  : where `ver` is the latest version of `bitstream-io` supporting rustc 1.74.0), exit_code: 101 }
  : gmake: *** [../contrib/libdovi/module.rules:3: contrib/libdovi/.stamp.libdovi.build] Error 1
-------------------------------------------------------------------------------
time end: Thu Jun 27 09:06:02 2024
duration: 24 minutes, 41 seconds (1481.82s)
result: FAILURE (code 2)
-------------------------------------------------------------------------------
Build is finished!
You may now cd into ./build and examine the output.

So, Debian's Rust is 1.63 (IIRC) and there is no newer version. I don't know where it got 1.74 version from, as I didn't install Rust any other way than through package manager.

I've uninstalled Debian's rust installation:

sudo apt remove rust*
sudo apt remove libstd-rust-1.63 libstd-rust-dev

Installed latest Rust following these instructions:

https://wiki.crowncloud.net/?How_to_Install_Rust_on_Debian_12

Started compiling to see if that's all, it all worked:

./configure --cross=x86_64-w64-mingw32 --launch-jobs=$(nproc) --launch --enable-fdk-aac

There should be warning on web site with prerequisites for Debian 12 that it needs newer version of Rust for version 1.8.1, I don't know about older, 1.8.0 version.

sr55 commented 14 hours ago

The documentation updates have not yet been pushed for 1.8. It'll happen when folks have time.

At some point, it would be nice if someone contributed #1130 so I'd keep an eye on that for future updates.