Summary: | media-video/handbrake-1.2.2 - ./libhb/nvenc_common.c:14:10: fatal error: ffnvcodec/nvEncodeAPI.h: No such file or directory | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Tomasz Golinski <tomaszg> |
Component: | Current packages | Assignee: | Ian Whyman (thev00d00) (RETIRED) <thev00d00> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dschridde+gentoobugs, edes, polynomial-c, proteuss, sbraz |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build log
GNUmakefile handbrake-1.2.2-r1.ebuild prepatch of the ebuild with disabled nvenc |
Created attachment 568288 [details]
GNUmakefile
same problem here. media-libs/nv-codec-headers provides that header as well. Handbrake-1.2.2 has a new --enable-nvenc configure option. The ebuild should have a USE flag to enable or disable nvenc, as Tomasz suggested? -- (In reply to edes from comment #4) > Handbrake-1.2.2 has a new --enable-nvenc configure option. The ebuild should > have a USE flag to enable or disable nvenc, as Tomasz suggested? Not as easy as @edes suggests: Introducing a USE nvenc and the corresping line for $(use_enable nvenc) gives me: --- configure.py: error: no such option: --disable-nvenc * ERROR: media-video/handbrake-1.2.2::pmaci failed (configure phase): * Configure failed. * * Call stack: * ebuild.sh, line 124: Called src_configure * environment, line 3644: Called die * The specific snippet of code: * ./configure --force --verbose --prefix="${EPREFIX}/usr" --disable-gtk-update-checks $(use_enable libav-aac ffmpeg-aac) $(use_enable fdk fdk-aac) $(use_enable gtk) $(use_enable nvenc) $(usex !gstreamer --disable-gst) $(use_enable x265) || die "Configure failed." the upstream doesn't have --disable-nvenc in configure, so it require patch to fix the upstream code or just make hard dependency on media-libs/nv-codec-headers first then figure out proper solution later. Well, looking at make/configure.py it seems they really support only --enable-nvenc. I don't know enough Python syntax to follow but it seems it should be disabled by default. However it is not and "FEATURE.nvenc = 1" turns out in GNUmakefile. Changing that line in GNUmakefile seems to fix the problem, so maybe the ebuild should do a simple sed if USE=-nvenc. Created attachment 568330 [details] handbrake-1.2.2-r1.ebuild Upstream added the --disable-nvenc flag in c7119499f5a2da7e5be0afd50a6757778fed53e7 You can save https://github.com/HandBrake/HandBrake/commit/c7119499f5a2da7e5be0afd50a6757778fed53e7.patch as files/handbrake-1.2.2-allow-disabling-hardware-encoders.patch and try this ebuild with USE=-nvenc. It's just a WIP, I haven't added the proper dependencies for nvenc. The other codecs probably also need to be explicitly enabled/disabled based on use flags. I also inserted this line in src_configure():" $(use_enable nvenc) \"
The patch works with disabled -nvenc:
---
[ebuild U ] media-video/handbrake-1.2.2::pmaci [1.1.2::gentoo] USE="fdk gstreamer gtk -libav -libav-aac -nvenc% x265" 0 KiB
Total: 1 package (1 upgrade), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) media-video/handbrake-1.2.2::pmaci
>>> Installing (1 of 1) media-video/handbrake-1.2.2::pmaci
---
Created attachment 568362 [details, diff]
prepatch of the ebuild with disabled nvenc
Sorry, bad description above: ebuild patch for to emerge with USE -nvenc The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a16187c2c99bd6900494d5e8c7d3dd9ccb67672 commit 2a16187c2c99bd6900494d5e8c7d3dd9ccb67672 Author: Ian Whyman <thev00d00@gentoo.org> AuthorDate: 2019-03-10 17:34:32 +0000 Commit: Ian Whyman <thev00d00@gentoo.org> CommitDate: 2019-03-10 17:34:56 +0000 media-video/handbrake: Fix nvenc build failure Backport patch from upstream to allow enable/disable nvenc, qsv encoding Closes: https://bugs.gentoo.org/679840 Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Ian Whyman <thev00d00@gentoo.org> ...ndbrake-1.2.2-backport-hardware-configure.patch | 88 ++++++++++++++++++++++ ...rake-1.2.2.ebuild => handbrake-1.2.2-r1.ebuild} | 8 +- media-video/handbrake/metadata.xml | 1 + 3 files changed, 96 insertions(+), 1 deletion(-) |
Created attachment 568286 [details] build log For some reason handbrake requires Nvidia nvenc support while building: ../libhb/nvenc_common.c:14:10: fatal error: ffnvcodec/nvEncodeAPI.h: No such file or directory #include <ffnvcodec/nvEncodeAPI.h> ^~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. Ebuild probably needs a USE flag to disable nvenc dependency.