Summary: | www-client/seamonkey-2.53.5.1: fails to build on arm64: unrecognized command line option '-msse2' | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Marcus Comstedt <marcus> |
Component: | Current packages | Assignee: | Myckel Habets <gentoo-bugs> |
Status: | IN_PROGRESS --- | ||
Severity: | normal | CC: | arm64, gentoo-bugs, jstein, mozilla |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | ARM64 | ||
OS: | Linux | ||
See Also: |
https://bugzilla.mozilla.org/show_bug.cgi?id=1434589 https://bugs.gentoo.org/show_bug.cgi?id=657146 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Patch to disable compilation of sse-specific parts of webrtc on non-x86 |
Description
Marcus Comstedt
2020-12-03 17:16:22 UTC
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... |