emerging firefox-67 without nasm got me error ERROR: nasm 2.13 or greater is required for AV1 support. Either install nasm or add --disable-av1 to your configure options.
Created attachment 577446 [details] build.log
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/firefox/firefox-67.0.ebuild?id=1f4ff49d3d677287810b8fad1958f0e2fffca550#n165 contains "!system-av1? ( dev-lang/nasm )" dependency. Probably it should be changed to: !system-av1? ( >=dev-lang/nasm-2.13 ) https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/firefox/firefox-67.0.ebuild?id=1f4ff49d3d677287810b8fad1958f0e2fffca550#n501 contains: mozconfig_use_with system-av1 Since the error message says "Either install nasm or add --disable-av1 to your configure options.", this line probably should be changed to: mozconfig_use_enable system-av1
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #2) > mozconfig_use_enable system-av1 mozconfig_use_enable system-av1 av1
Actual cause: --- firefox-66.0.5/toolkit/moz.configure +++ firefox-67.0/toolkit/moz.configure @@ -420,23 +431,27 @@ set_define('MOZ_FFMPEG', ffmpeg) imply_option('--enable-fmp4', ffmpeg, '--enable-ffmpeg') -# Libaom AV1 Video Codec Support +# AV1 Video Codec Support # ============================================================== -option('--enable-av1', - help='Enable libaom for av1 video support') +option('--disable-av1', + help='Disable av1 video support') -@depends('--enable-av1', target, c_compiler) -def av1(value, target, c_compiler): - enabled = bool(value) - if value.origin == 'default': - if target.os == 'WINNT' and target.cpu == 'x86' and \ - c_compiler and c_compiler.type == 'msvc': - enabled = False - else: - enabled = True - if enabled: +@depends('--enable-av1') +def av1(value): + if value: return True +@depends(target, nasm_version, when=av1 & compile_environment) +def dav1d_asm(target, nasm_version): + if target.os != 'Android' and target.cpu in ('x86', 'x86_64'): + if nasm_version < '2.13': + die('nasm 2.13 or greater is required for AV1 support. ' + 'Either install nasm or add --disable-av1 to your configure options.') + return True + + +set_config('MOZ_DAV1D_ASM', dav1d_asm) +set_define('MOZ_DAV1D_ASM', dav1d_asm) set_config('MOZ_AV1', av1) set_define('MOZ_AV1', av1) This means that: 1. 7002_system_av1_support.patch should be updated so that the check for nasm is disabled when --with-system-av1 is used. 2. Dependencies should be updated: - !system-av1? ( dev-lang/nasm )" + !system-av1? ( >=dev-lang/nasm-2.13 )
Created attachment 579584 [details, diff] 7002_system_av1_support.patch Updated version of 7002_system_av1_support.patch Main addition is: -@depends(target, nasm_version, when=av1 & compile_environment) +@depends(target, nasm_version, when=av1 & depends(system_av1)(lambda v: not v) & compile_environment) def dav1d_asm(target, nasm_version): if target.os != 'Android' and target.cpu in ('x86', 'x86_64'): if nasm_version < '2.13':
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #5) Patch was successfully tested with media-libs/dav1d and media-libs/libaom installed and /usr/bin/nasm temporarily renamed: With USE="system-av1", no error about missing nasm. With USE="-system-av1", error about missing nasm. 'depends(system_av1)(lambda v: not v)' is probably the shorted working solution. Seemingly simpler '(not system_av1)' results in exception: 0:10.26 File "/var/tmp/portage/www-client/firefox-67.0.2/work/firefox-67.0.2/toolkit/moz.configure", line 484, in <module> 0:10.26 @depends(target, nasm_version, when=av1 & (not system_av1) & compile_environment) 0:10.26 File "/var/tmp/portage/www-client/firefox-67.0.2/work/firefox-67.0.2/python/mozbuild/mozbuild/configure/__init__.py", line 103, in __nonzero__ 0:10.26 'Cannot do boolean operations on @depends functions.') 0:10.26 mozbuild.configure.ConfigureError: Cannot do boolean operations on @depends functions. 0:10.31 *** Fix above errors and then restart with\ 0:10.31 "./mach build" 0:10.31 gmake: *** [client.mk:115: configure] Error 1
Beta ebuilds have the updated dep.
https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=0117d35cdf09b986540378992a0d60e5ae0be9c4 https://gitweb.gentoo.org/proj/mozilla.git/commit/?id=aacc29fbfa20f9261b87be5e13055152f152148a Since upstream build system has "target.cpu in ('x86', 'x86_64')" check, it might be better to specify more accurate dependency in ebuild: - !system-av1? ( >=dev-lang/nasm-2.13 )" + !system-av1? ( + amd64? ( >=dev-lang/nasm-2.13 ) + x86? ( >=dev-lang/nasm-2.13 ) + )"
Fixed in tree (When USE="-system-av1" depends on "dev-lang/nasm"). Thank you.