Bug 251209 - www/firefox: build fails for 83.0
Summary: www/firefox: build fails for 83.0
Status: Closed Feedback Timeout
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: 2020-11-17 08:31 UTC by Eugene M. Zheganin
Modified: 2022-06-22 08:00 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 Eugene M. Zheganin 2020-11-17 08:31:41 UTC
FreeBSD 12.1-RELEASE-p2 amd64
recent ports (r555451)

port config:

Options        :
        ALSA           : off
        CANBERRA       : off
        DBUS           : on
        DEBUG          : off
        FFMPEG         : on
        GCONF          : off
        JACK           : off
        LIBPROXY       : off
        OPTIMIZED_CFLAGS: on
        PROFILE        : on
        PULSEAUDIO     : on
        SNDIO          : off
        TEST           : off


===Cut===
# make MAKE_JOBS_UNSAFE=yes
[...]
/usr/ports/www/firefox/work/.build/_virtualenvs/init_py3/bin/python -m mozbuild.action.check_binary --target libmozwayland.so
BUILDTASK {"argv": ["/usr/ports/www/firefox/work/firefox-83.0/python/mozbuild/mozbuild/action/check_binary.py", "--target", "libmozwayland.so"], "start": 1605601642.2130942, "end": 1605601642.217002, "context": null}
chmod +x libmozwayland.so
../../../config/nsinstall -R -m 644 'libmozwayland.so' '../../../dist/bin'
gmake[5]: Leaving directory '/usr/ports/www/firefox/work/.build/widget/gtk/mozwayland'
gmake[5]: Entering directory '/usr/ports/www/firefox/work/.build/widget/gtk'
widget/gtk/Unified_cpp_widget_gtk0.o
/usr/local/bin/clang++11 -std=gnu++17 -o Unified_cpp_widget_gtk0.o -c  -I/usr/ports/www/firefox/work/.build/dist/stl_wrappers -I/usr/ports/www/firefox/work/.build/dist/system_wrappers -include /usr/ports/www/firefox/work/firefox-83.0/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DOS_POSIX=1 -DOS_FREEBSD=1 -DOS_BSD=1 -DCAIRO_GFX '-DMOZ_APP_NAME="firefox"' -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/usr/ports/www/firefox/work/firefox-83.0/widget/gtk -I/usr/ports/www/firefox/work/.build/widget/gtk -I/usr/ports/www/firefox/work/.build/ipc/ipdl/_ipdlheaders -I/usr/ports/www/firefox/work/firefox-83.0/ipc/chromium/src -I/usr/ports/www/firefox/work/firefox-83.0/ipc/glue -I/usr/ports/www/firefox/work/firefox-83.0/layout/base -I/usr/ports/www/firefox/work/firefox-83.0/layout/forms -I/usr/ports/www/firefox/work/firefox-83.0/layout/generic -I/usr/ports/www/firefox/work/firefox-83.0/layout/xul -I/usr/ports/www/firefox/work/firefox-83.0/other-licenses/atk-1.0 -I/usr/ports/www/firefox/work/firefox-83.0/third_party/cups/include -I/usr/ports/www/firefox/work/firefox-83.0/widget -I/usr/ports/www/firefox/work/firefox-83.0/widget/headless -I/usr/ports/www/firefox/work/firefox-83.0/widget/x11 -I/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/usr/ports/www/firefox/work/.build/dist/include/nss -I/usr/local/include -I/usr/local/include -I/usr/local/include/pixman-1 -I/usr/local/include -fPIC -DMOZILLA_CLIENT -include /usr/ports/www/firefox/work/.build/mozilla-config.h -Qunused-arguments -DLIBICONV_PLUG -isystem /usr/local/include -Qunused-arguments -Wall -Wbitfield-enum-conversion -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wc++2a-compat -Wcomma -Wimplicit-fallthrough -Wunused-function -Wunused-variable -Wstring-conversion -Wtautological-overlap-compare -Wtautological-unsigned-enum-zero-compare -Wtautological-unsigned-zero-compare -Wno-error=tautological-type-limit-compare -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Werror=implicit-function-declaration -Wno-psabi -Wno-unknown-warning-option -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 -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -O2 -O3 -fno-omit-frame-pointer -funwind-tables -I/usr/ports/www/firefox/work/firefox-83.0/widget/gtk/compat-gtk3 -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/libdrm -I/usr/local/include/harfbuzz -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/gtk-3.0/unix-print -D_THREAD_SAFE -pthread -I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/libdrm -I/usr/local/include/harfbuzz -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/at-spi-2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -D_THREAD_SAFE -pthread -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -Wno-error=shadow -fexperimental-new-pass-manager  -MD -MP -MF .deps/Unified_cpp_widget_gtk0.o.pp   Unified_cpp_widget_gtk0.cpp
In file included from Unified_cpp_widget_gtk0.cpp:29:
In file included from /usr/ports/www/firefox/work/firefox-83.0/widget/gtk/DMABufSurface.cpp:21:
/usr/ports/www/firefox/work/.build/dist/system_wrappers/sys/eventfd.h:3:15: fatal error: 'sys/eventfd.h' file not found
#include_next <sys/eventfd.h>
              ^~~~~~~~~~~~~~~
1 error generated.
gmake[5]: *** [/usr/ports/www/firefox/work/firefox-83.0/config/rules.mk:676: Unified_cpp_widget_gtk0.o] Error 1
gmake[5]: Leaving directory '/usr/ports/www/firefox/work/.build/widget/gtk'
gmake[4]: *** [/usr/ports/www/firefox/work/firefox-83.0/config/recurse.mk:72: widget/gtk/target-objects] Error 2
gmake[4]: Leaving directory '/usr/ports/www/firefox/work/.build'
gmake[3]: *** [/usr/ports/www/firefox/work/firefox-83.0/config/recurse.mk:34: compile] Error 2
gmake[3]: Leaving directory '/usr/ports/www/firefox/work/.build'
gmake[2]: *** [/usr/ports/www/firefox/work/firefox-83.0/config/rules.mk:355: all] Error 2
gmake[2]: Leaving directory '/usr/ports/www/firefox/work/.build'
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/www/firefox
*** Error code 1

Stop.
make: stopped in /usr/ports/www/firefox
===Cut===
Comment 1 Eugene M. Zheganin 2020-11-17 08:52:44 UTC
Workaround:

1) looks like port misses devel/libepoll-shim dependency.
2) looks like just the installed devel/libepoll-shim isn't enough (I had one), it needs the version containing eventfd.h explicitely.
3) for some reason event when having eventfd.h port wasn't able to find it, so I had to add -I/usr/local/include/libepoll-shim into the $BUILDSRC/config/config.mk file, that got me pass the error.
Comment 2 Jan Beich freebsd_committer freebsd_triage 2020-11-17 10:08:37 UTC
Did you build x11-toolkits/gtk30 without WAYLAND option? If so libmozwayland.so and widget/gtk/DMABufSurface.cpp shouldn't be built. Either way provide full build logs as I can't reproduce.

http://beefy6.nyi.freebsd.org/data/121amd64-default/555064/logs/firefox-83.0_2,2.log

(In reply to Eugene M. Zheganin from comment #1)
> I had to add -I/usr/local/include/libepoll-shim

Shouldn't be necessary.

$ pkg-config wayland-client --cflags
-I/usr/local/include -I/usr/local/include/libepoll-shim

$ pkg-config gtk+-3.0 --cflags
-I/usr/local/include/gtk-3.0 -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/fribidi -I/usr/local/include/cairo -I/usr/local/include/pixman-1 -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/include/harfbuzz -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/gio-unix-2.0 -I/usr/local/include/libepoll-shim -I/usr/local/include/atk-1.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -I/usr/local/include/at-spi-2.0 -D_THREAD_SAFE -pthread