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

HandBrake 1.1.0 build fails in Nix #1273

Closed
Anton-Latukha opened this issue Apr 11, 2018 · 9 comments
Closed

HandBrake 1.1.0 build fails in Nix #1273

Anton-Latukha opened this issue Apr 11, 2018 · 9 comments

Comments

@Anton-Latukha
Copy link

Description of problem or feature request

This looks like upstream issue that needs to be sorted-out/explained, and may be fixed with patch downstream.

NixPkgs have HandBrake v1.0.7 normally working.

version.txt is populated from version value during build:
Description: https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/video/handbrake/default.nix

I've took upon an agenda to update 1.0.7 1.1.0.

Normally it only takes updating the version information and sha256:
NixOS/nixpkgs@master...Anton-Latukha:master

SHA256 is hash of unpacked https://github.com/HandBrake/HandBrake/archive/1.1.0.tar.gz

It can be obtained by:

nix-prefetch-url --unpack https://github.com/HandBrake/HandBrake/archive/1.1.0.tar.gz

Nix is getting that source, unpacks it, and builds from it.

On build HandBrake expects some sort of information, but seems like don't has it in Nix build environment.

Steps to reproduce the problem

Install Nix or NixOS.

git clone https://github.com/Anton-Latukha/nixpkgs
cd nixpkgs/pkgs/applications/video/handbrake
nix-build {/home/pyro/src/nixpkgs} -A handbrake

Get the: "ERROR: HandBrake is missing version information it needs to build properly."

HandBrake version

1.1.0

Operating system and version

nixos-version
18.03.131807.489a14add9a (Impala)

nix --version
nix (Nix) 2.0

Error message text or screenshot

ERROR: HandBrake is missing version information it needs to build properly.

HandBrake Log

handbrake:master> nix-build {/home/user/src/nixpkgs} -A handbrake

these derivations will be built:
  /nix/store/pj3q4lg4hr10c9fyv0g5rqjwz6clb1g7-handbrake-1.1.0.drv
building '/nix/store/pj3q4lg4hr10c9fyv0g5rqjwz6clb1g7-handbrake-1.1.0.drv'...
unpacking sources
unpacking source archive /nix/store/1pzj9pv051ipkq8919g7dxzkjsar2n1r-source
source root is source
patching sources
configuring
patching script interpreter paths in scripts
scripts/mac-toolchain-build: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
scripts/mingw-w64-build: interpreter directive changed from "/bin/bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
scripts/create_resources.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
scripts/build-presets.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
scripts/tag-release.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
scripts/quotestring.py: interpreter directive changed from "/usr/bin/env python" to "/nix/store/sz9x7gpmlpk05q952b9vq87hbgn26hkc-python-2.7.14/bin/python"
scripts/repo-info.sh: interpreter directive changed from "/usr/bin/env bash" to "/nix/store/q1g0rl8zfmz7r371fp5p42p4acmv297d-bash-4.4-p19/bin/bash"
configure flags: --prefix=/nix/store/qqhxwk87lzjrnpcp5fl6rf6zyqpyw9y1-handbrake-1.1.0 --disable-df-fetch --disable-df-verify --enable-fdk-aac --disable-gtk-update-checks
ERROR: HandBrake is missing version information it needs to build properly.
Clone the official git repository at https://github.com/HandBrake/HandBrake.git
or download an official source archive from https://handbrake.fr
; configure stop.
probe: host tuple...(pass) x86_64-pc-linux-gnu
compute: available architectures...(pass) x86_64
find: ar...(pass) /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/ar
find: cp...(pass) /nix/store/qrxs7sabhqcr3j9ai0j0cp58zfnny0jz-coreutils-8.29/bin/cp
find: gcc...(pass) /nix/store/4r5kszyy0iirc5agfah45lvz7mnnsrb4-gcc-wrapper-7.3.0/bin/gcc
find: gmake...(pass) /nix/store/qz5lb9xwxy8rws569ra7v0i1asbk4g1l-gnumake-4.2.1/bin/make
find: gm4...(pass) /nix/store/7s7jakd88bwx1kq3sc65rqwjn3d3xiiv-gnum4-1.4.18/bin/m4
find: mkdir...(pass) /nix/store/qrxs7sabhqcr3j9ai0j0cp58zfnny0jz-coreutils-8.29/bin/mkdir
find: gpatch...(pass) /nix/store/h69mmb2cix9lyk4162wa72p0jcmw157x-patch-2.7.6/bin/patch
find: rm...(pass) /nix/store/qrxs7sabhqcr3j9ai0j0cp58zfnny0jz-coreutils-8.29/bin/rm
find: ranlib...(pass) /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/ranlib
find: strip...(pass) /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
find: gtar...(pass) /nix/store/rng0r3whml1jql1s6ps11v7f8cxmna04-gnutar-1.30/bin/tar
find: nasm...(fail) not found
find: yasm...(pass) /nix/store/6ggcwnqyj7f1qzbliqd2j0sljn89zs4v-yasm-1.3.0/bin/yasm
find: autoconf...(pass) /nix/store/a7jgfawq94h62vp25g060cbbn3jrrhj9-autoconf-2.69/bin/autoconf
find: automake...(pass) /nix/store/mccnhppd0qvrpzrljmbprl5bs5z4y4nw-automake-1.16/bin/automake
find: cmake...(pass) /nix/store/pw831glmj7p4n8kkdvrcbmfxks5gwndp-cmake-3.10.2/bin/cmake
find: libtool...(pass) /nix/store/2xmwik1hppkc4h3hkcikqnz7mwkihl9m-libtool-2.4.6/bin/libtool
find: pkg-config...(pass) /nix/store/378vwwffwdp4pir08mfd6iz3nmj4zf7w-pkg-config-0.29.2/bin/pkg-config
find: xcodebuild...(fail) not found
find: lipo...(fail) not found
compute: build tuple...(pass) x86_64-pc-linux-gnu
probe: number of CPU cores...(pass) 8
probe: repo info...(fail) code 1
probe: version.txt...(fail)
compute: project data...
builder for '/nix/store/pj3q4lg4hr10c9fyv0g5rqjwz6clb1g7-handbrake-1.1.0.drv' failed with exit code 1
error: build of '/nix/store/pj3q4lg4hr10c9fyv0g5rqjwz6clb1g7-handbrake-1.1.0.drv' failed
@Anton-Latukha
Copy link
Author

Anton-Latukha commented Apr 11, 2018

Since I went upstream, I probably would take on myself to prettify the package and description of HandBrake on NixOS.

I love HandBrake. I am open to suggestions.

@Anton-Latukha Anton-Latukha changed the title HandBrake 1.1.0 build crashes in Nix HandBrake 1.1.0 fails to build in Nix Apr 11, 2018
@bradleysepos
Copy link
Contributor

Use the release source tarball handbrake.fr instead of the repo archive tarball on GitHub.

@Anton-Latukha Anton-Latukha changed the title HandBrake 1.1.0 fails to build in Nix HandBrake 1.1.0 build fails in Nix Apr 11, 2018
@sr55
Copy link
Contributor

sr55 commented Apr 11, 2018

Just an FYI, please be aware that if you set "-enable-fdk-aac" in builds that you make public, you are in violation of our license. That has to be user-optional.

I'd also note that if you use system libraries, in particular ffmpeg instead of libav, you'll be put on our build blacklist. While I appreciate you are trying to make sure all upstreams are appropriately patched, libav and ffmpeg can't be substituted without code changes to HandBrake. Otherwise, it's pretty unstable as evidenced by every other distro that's done this. We are a large number of complaints about crashing on distro builds because of this.

@Anton-Latukha
Copy link
Author

@bradleysepos

Thank you. Great. Nix language can bend over and fetch tarball from website.

After acceptance of changes to NixPkgs. Sources would be downloaded by CI, built and binaries stored in Nix packages cache. So load on your website link from Nix world would be minimal.

But if CI cache for technical reason would not have binary ready - Nix people would download source tarball from a website, that can happen. But even on that that occasion - that would generate small time-stretched sporadic load.

@sr55
Copy link
Contributor

sr55 commented Apr 11, 2018

Please note, our build script the downloads in a download folder locally. It only does this once so if you were to re-tar the package, it would not download anything. Either way. Nix probably isn't going to generate any noticeable load on our boxes.

The source tar on Github is provided by GitHub. We don't generate it. It won't work so you have to take the source package from our website and use that one instead.

@bradleysepos
Copy link
Contributor

bradleysepos commented Apr 11, 2018

./configure
cd build
make contrib.fetch  # downloads dependencies to ./download/

@Anton-Latukha
Copy link
Author

@sr55
It is good you shared information.
I agree.

  1. FDK codec has a weird license that violated GPL2.

  2. If you say that HandBrake is designed for libav - you know it.

NixOS distribution by default is free software environment.
Nix even keeps and checks licenses of packages.

User must customize system and do opt-in switch with: nixpkgs.config.allowUnfree.

So Nix community interested to do respectful package.
The default HandBrake package. We can exclude fdk and switch to libav by default - no problem.

@bradleysepos
Copy link
Contributor

We can exclude fdk and switch to libav by default - no problem.

Thank you. 😸

@Anton-Latukha
Copy link
Author

I would contribute changes, and inform maintainer of the packages. Maybe they would pass package to me or add me to maintainers.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants