Bug 274641 - www/firefox: 119.0 error: use of undeclared identifier 'AOM_PLANE_ALPHA' with aom-3.7.0 installed
Summary: www/firefox: 119.0 error: use of undeclared identifier 'AOM_PLANE_ALPHA' with...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-gecko (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-22 08:32 UTC by Marcin Cieślak
Modified: 2023-10-22 10:30 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (gecko)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Cieślak 2023-10-22 08:32:03 UTC
Trying to build firefox 119.0

Ports tree as of f365e5ef73651c51605903f426871224860ec92a on FreeBSD 15.0-CURRENT #9 main-n265801-f7a2eeaa75dc on amd64:

mkdir -p '.deps/'
image/encoders/png/nsPNGEncoder.o
/usr/local/bin/clang++13 -std=gnu++17 -o nsPNGEncoder.o -c  -I/big/ports/usr/ports/www/firefox/work/.build/dist/stl_wrappers -I/big/ports/usr/ports/www/firefox/work/.build/dist/system_wrappers -include /big/ports/usr/ports/www/firefox/work/firefox-119.0/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fstack-clash-protection -ftrivial-auto-var-init=pattern -DDEBUG=1 -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/big/ports/usr/ports/www/firefox/work/firefox-119.0/image/encoders/png -I/big/ports/usr/ports/www/firefox/work/.build/image/encoders/png -I/big/ports/usr/ports/www/firefox/work/firefox-119.0/image -I/big/ports/usr/ports/www/firefox/work/.build/ipc/ipdl/_ipdlheaders -I/big/ports/usr/ports/www/firefox/work/firefox-119.0/ipc/chromium/src -I/big/ports/usr/ports/www/firefox/work/.build/dist/include -I/usr/local/include/nspr -I/usr/local/include -I/usr/local/include/nss -I/usr/local/include/nspr -I/big/ports/usr/ports/www/firefox/work/.build/dist/include/nss -I/usr/local/include -I/usr/local/include/libpng16 -I/usr/local/include/pixman-1 -I/usr/local/include -DMOZILLA_CLIENT -include /big/ports/usr/ports/www/firefox/work/.build/mozilla-config.h -DLIBICONV_PLUG -isystem /usr/local/include -fno-sized-deallocation -fno-aligned-new -O2 -pipe -O3 -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -fno-exceptions -fPIC -fno-rtti -fno-exceptions -fno-math-errno -pipe -gdwarf-4 -O2 -O3 -fno-omit-frame-pointer -funwind-tables -Wall -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtautological-constant-in-range-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wenum-compare-conditional -Wenum-float-conversion -Wno-error=deprecated -Wno-error=deprecated-anon-enum-enum-conversion -Wno-error=deprecated-enum-enum-conversion -Wno-error=deprecated-this-capture -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-error=atomic-alignment -Wformat -Wformat-security -Wno-psabi -Wthread-safety -Wno-error=builtin-macro-redefined -Wno-unknown-warning-option -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/nsPNGEncoder.o.pp   /big/ports/usr/ports/www/firefox/work/firefox-119.0/image/encoders/png/nsPNGEncoder.cpp
clang-13: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
In file included from Unified_cpp_image_decoders0.cpp:11:
/big/ports/usr/ports/www/firefox/work/firefox-119.0/image/decoders/nsAVIFDecoder.cpp:1063:33: error: use of undeclared identifier 'AOM_PLANE_ALPHA'
             colorImage->stride[AOM_PLANE_ALPHA]);
                                ^
/big/ports/usr/ports/www/firefox/work/firefox-119.0/image/decoders/nsAVIFDecoder.cpp:1063:33: error: use of undeclared identifier 'AOM_PLANE_ALPHA'

If I force remove aom and try to continue the build, it fails with

gmake[4]: *** Waiting for unfinished jobs....
In file included from Unified_cpp_dom_media_mp40.cpp:29:
In file included from /big/ports/usr/ports/www/firefox/work/firefox-119.0/dom/media/mp4/MP4Decoder.cpp:11:
In file included from /big/ports/usr/ports/www/firefox/work/.build/dist/include/AOMDecoder.h:13:
/big/ports/usr/ports/www/firefox/work/.build/dist/system_wrappers/aom/aom_decoder.h:3:15: fatal error: 'aom/aom_decoder.h' file not found
#include_next <aom/aom_decoder.h>
              ^~~~~~~~~~~~~~~~~~~
1 error generated.
Comment 1 Marcin Cieślak 2023-10-22 09:27:05 UTC
https://bugzilla.mozilla.org/show_bug.cgi?id=1859380 looks like they use a snapshot after aom 1.0 release 

https://aomedia.googlesource.com/aom/+/1e227d41f0616de9548a673a83a21ef990b62591
Comment 2 Jan Beich freebsd_committer freebsd_triage 2023-10-22 10:13:16 UTC
poudriere build is not affected per https://pkg-status.freebsd.org/beefy14/data/132amd64-quarterly/02a12e84c9e7/logs/firefox-119.0_1,2.log

Try bundled aom/dav1d via USE_MOZILLA += -av1 in www/firefox/Makefile.local as a workaround. Beware of vulnerabilities:
- AOM_PLANE_ALPHA was removed upstream 5 years ago (2018-10-26)
- v1.0.0-611-g1e227d41f0 is a 5 year old snapshot (2018-09-18)
- (lib)aom decoder is less safe to use than dav1d
- Firefox on FreeBSD doesn't use sandboxing

However,
- image.avif.use-dav1d=true is default on all platforms
- media.av1.use-dav1d=true is default except on Windows aarch64