When emerging www-client/seamonkey-2.53.5.1 on arm64, the build stops with /usr/bin/aarch64-unknown-linux-gnu-g++ -o Unified_cpp_common_audio_sse2_gn0.o -c -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/seamonk/dist/system_wrappers -include /var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/mozilla/config/gcc_hidden.h -DNDEBUG -DTRIMMED=1 -DCHROMIUM_BUILD -DEXPAT_RELATIVE_PATH -DV8_DEPRECATION_WARNINGS -DWEBRTC_MOZILLA_BUILD -DWEBRTC_RESTRICT_LOGGING -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DNVALGRIND -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DWEBRTC_LINUX -DWEBRTC_POSIX -D_FILE_OFFSET_BITS=64 -DSTATIC_EXPORTABLE_JS_API -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/mozilla/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/seamonk/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/seamonk/ipc/ipdl/_ipdlheaders -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/mozilla/ipc/chromium/src -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/mozilla/ipc/glue -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/mozilla/media/webrtc/trunk -I/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/seamonk/dist/include -fPIC -DMOZILLA_CLIENT -include /var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/seamonk/mozilla-config.h -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++1z-compat -Wduplicated-cond -Wimplicit-fallthrough -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wformat -Wformat-security -Wformat-overflow=2 -flifetime-dse=1 -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -freorder-blocks -O2 -fomit-frame-pointer -msse2 -MD -MP -MF .deps/Unified_cpp_common_audio_sse2_gn0.o.pp /var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/seamonk/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn/Unified_cpp_common_audio_sse2_gn0.cpp aarch64-unknown-linux-gnu-g++: error: unrecognized command line option '-msse2' make[4]: *** [/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/mozilla/config/rules.mk:1034: Unified_cpp_common_audio_sse2_gn0.o] Error 1 make[4]: Leaving directory '/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/seamonk/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn' make[3]: *** [/var/tmp/portage/www-client/seamonkey-2.53.5.1/work/seamonkey-2.53.5.1/mozilla/config/recurse.mk:73: media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn/target] Error 2 make[3]: *** Waiting for unfinished jobs.... Reproducible: Always Steps to Reproduce: 1.Try to emerge www-client/seamonkey-2.53.5.1 on arm64, 2. 3. Actual Results: The build fails Expected Results: The build succeeds Portage 3.0.9 (python 3.7.9-final-0, default/linux/arm64/17.0/desktop, gcc-9.3.0, glibc-2.32-r2, 4.9.234 aarch64) ================================================================= System uname: Linux-4.9.234-aarch64-with-gentoo-2.7 KiB Mem: 8043424 total, 1287348 free KiB Swap: 16777212 total, 14297036 free Timestamp of repository gentoo: Thu, 26 Nov 2020 15:00:01 +0000 Head commit of repository gentoo: 00acc6047ea36a8db362ee34ab540c72195dd6e9 sh bash 5.0_p18 ld GNU ld (Gentoo 2.34 p6) 2.34.0 app-shells/bash: 5.0_p18::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.30.3::gentoo dev-lang/python: 2.7.18-r4::gentoo, 3.6.12::gentoo, 3.7.9::gentoo, 3.8.6::gentoo, 3.9.0::gentoo dev-util/cmake: 3.17.4-r1::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.7::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.20::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.2-r1::gentoo sys-devel/binutils: 2.34-r2::gentoo sys-devel/gcc: 4.9.4-r1::gentoo, 5.5.0::gentoo, 9.3.0-r1::gentoo sys-devel/gcc-config: 2.3.2-r1::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.4-r1::gentoo (virtual/os-headers) sys-libs/glibc: 2.32-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://192.168.42.40/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: sync-rsync-verify-metamanifest: yes zeldin location: /usr/local/portage masters: gentoo crossdev location: /usr/local/portage-crossdev masters: gentoo priority: 10 java location: /var/lib/layman/java sync-type: laymansync sync-uri: git://anongit.gentoo.org/proj/java.git masters: gentoo priority: 50 raiagent location: /var/lib/layman/raiagent sync-type: laymansync sync-uri: https://github.com/leycec/raiagent masters: gentoo priority: 50 unity-gentoo location: /var/lib/layman/unity-gentoo sync-type: laymansync sync-uri: https://github.com/shiznix/unity-gentoo masters: gentoo priority: 50 waebbl location: /var/lib/layman/waebbl sync-type: laymansync sync-uri: https://github.com/waebbl/waebbl-gentoo.git masters: gentoo raiagent priority: 50 ACCEPT_KEYWORDS="arm64" ACCEPT_LICENSE="@FREE" CBUILD="aarch64-unknown-linux-gnu" CFLAGS="-O2 -pipe" CHOST="aarch64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--autounmask" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="sv_SE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j5" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi alsa arm64 berkdb bluetooth branding bzip2 cairo cdda cdr cjk cli crypt css cups curl dbus dri dts dvb dvd dvdr elogind emboss encode exif ffmpeg flac gdbm gif gmp gnutls gpm gtk gui iconv icu idn ipv6 jpeg lcms libffi libglvnd libnotify libtirpc lua mad mng mp3 mp4 mpeg mule multitarget ncurses nis nls nptl offensive ogg opengl openmp pam pango pcre pdf png policykit ppds qt5 readline sdl seamonkey seccomp smp spell split-usr ssl startup-notification svg tcpd theora threads tiff truetype udev udisks unicode upower usb vorbis wxwidgets x264 xattr xcb xemacs xft xml xmpp xv xvid zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2 php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_7" PYTHON_TARGETS="python2_7 python3_7" RUBY_TARGETS="ruby25 ruby26" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Marcus, did older seamonkey versions succeed to build for you on arm64? If yes, what was the last working version? If you haven't tried, could you try now? All you need to do is fetching some of the old ebuilds from their git grave ;)
Yes, seamonkey-2.49.5-r2 builds just fine.
seamonkey-2.53.1-r1 fails to build with In file included from /var/tmp/portage/www-client/seamonkey-2.53.1-r1/work/seamonkey-2.53.1/mozilla/memory/build/mozjemalloc.cpp:224: /var/tmp/portage/www-client/seamonkey-2.53.1-r1/work/seamonkey-2.53.1/seamonk/dist/system_wrappers/sys/sysctl.h:3:15: fatal error: sys/sysctl.h: No such file or directory 3 | #include_next <sys/sysctl.h> | ^~~~~~~~~~~~~~ compilation terminated. so that's an unrelated error.
(In reply to Marcus Comstedt from comment #3) > seamonkey-2.53.1-r1 fails to build with > > In file included from > /var/tmp/portage/www-client/seamonkey-2.53.1-r1/work/seamonkey-2.53.1/ > mozilla/memory/build/mozjemalloc.cpp:224: > /var/tmp/portage/www-client/seamonkey-2.53.1-r1/work/seamonkey-2.53.1/ > seamonk/dist/system_wrappers/sys/sysctl.h:3:15: fatal error: sys/sysctl.h: > No such file or directory > 3 | #include_next <sys/sysctl.h> > | ^~~~~~~~~~~~~~ > compilation terminated. > > so that's an unrelated error. Yes that's unrelated and can be fixed with the following patch: https://gitweb.gentoo.org/repo/gentoo.git/diff/www-client/seamonkey/files/seamonkey-2.53.2-sysctl.patch?id=e8ed22928a495238667b50d66e83041341ef9611
Right. Alas, when applying that patch, I just get another unrelated error: Compiling gkrust v0.1.0 (/var/tmp/portage/www-client/seamonkey-2.53.1-r1/work /seamonkey-2.53.1/mozilla/toolkit/library/rust) error: options `-C embed-bitcode=no` and `-C lto` are incompatible error: could not compile `gkrust`. Which I recognize from trying to compile Firefox with the wrong rust version. I suppose we have to forgive an ebuild I dug out of the git graveyard for not blocking newer rust versions... :-) (The depenency is >=rust-1.34.0, but I have rust-1.46.0, which is probably too new for this version of seamonkey.)
Issue still present in 2.53.7.1. The flag seems to come from seamonk/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn/backend.mk which in turn seems to be generated from python/mozbuild/mozbuild/backend/recursivemake.py. I think the error is actually in media/webrtc/trunk/moz.build, which says ---8<--- if CONFIG["OS_TARGET"] == "Linux": DIRS += [ "/media/webrtc/trunk/webrtc/common_audio/common_audio_sse2_gn", "/media/webrtc/trunk/webrtc/modules/audio_processing/audio_processing_sse2_gn", "/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_differ_sse2_gn", "/media/webrtc/trunk/webrtc/modules/desktop_capture/desktop_capture_gn", "/media/webrtc/trunk/webrtc/modules/desktop_capture/primitives_gn", "/media/webrtc/trunk/webrtc/modules/video_processing/video_processing_sse2_gn", "/media/webrtc/trunk/webrtc/system_wrappers/cpu_features_linux_gn", "/media/webrtc/trunk/webrtc/video_engine/video_engine_gn" ] ---8<--- The "sse2_gn" dirs should probably _not_ be included unless the target actually has SSE2... The file media/webrtc/trunk/webrtc/common_audio/BUILD.gn, which ostensibly is the file that the moz.build was generated from, says ---8<--- if (current_cpu == "x86" || current_cpu == "x64") { rtc_static_library("common_audio_sse2") { ---8<--- So common_audio_sse2 should not even be known to the build system unless current_cpu is either "x86" or "x64".
Created attachment 706164 [details, diff] Patch to disable compilation of sse-specific parts of webrtc on non-x86 With this patch I was able to successfully build seamonkey-2.53.7.1.
Did you verify that these files are still being used on x86 hardware with your patch? There's a very similar patch in bug #657146: https://657146.bugs.gentoo.org/attachment.cgi?id=534740 but appears to be the better approach. Can you try to port that patch to seamonkey and test it on arm64 and x86?
No, I don't have any x86 hardware to test with.
And I don't quite understand why repeating the same set of files twice is a "better approach". The end result is exactly the same, as `CONFIG['INTEL_ARCHITECTURE']` is 100% equivalent to `CONFIG["CPU_ARCH"] == "x86" or CONFIG["CPU_ARCH"] == "x86_64"`...
(In reply to Marcus Comstedt from comment #10) > And I don't quite understand why repeating the same set of files twice is a > "better approach". The end result is exactly the same, as > `CONFIG['INTEL_ARCHITECTURE']` is 100% equivalent to > `CONFIG["CPU_ARCH"] == "x86" or CONFIG["CPU_ARCH"] == "x86_64"`... Because technically you also have x32 which AFAIK is also INTEL_ARCHITECTURE.
No, the definition of INTEL_ARCHITECTURE is literally what I just said. Check the implementation, which is in build/moz.configure/init.configure: INTEL_ARCHITECTURE=target.cpu in ('x86', 'x86_64') or None, If target.cpu (which is what gets put into CONFIG["CPU_ARCH"]) would ever be "x32", then INTEL_ARCHITECTURE would be None. So there would be no SSE2 sources in either approach. Not that CONFIG["CPU_ARCH"] will ever _be_ "x32", if I read init.configure correctly...