chaotic-aur / packages

The packages Mason, what do they mean? (Package requests and bug reports here) 📑
https://aur.chaotic.cx
326 stars 20 forks source link

[Request] icecat #394

Closed RainerMathey closed 3 years ago

RainerMathey commented 3 years ago

https://aur.archlinux.org/packages/icecat/

... is it possible to bring back this package to chaotic-aur; the original compiling does take minimum 10 hours & fails ?

xiota commented 8 months ago

@figue Do you need help enabling PGO?

figue commented 8 months ago

Hey, I was trying to enable PGO but it seems the addons shipped with IceCat blocks scripts by default so build stuck. I was trying to patch sources to test if without addons enabled build ends, but at the end it doesn't. Any new ideas will be welcome :)

Latest attempt PKGBUILD: https://gist.github.com/figue/1cf0ec746e0d76253dc5923103acf1d3

xiota commented 8 months ago

Did you look at the PKGBUILD from my comment on aurweb? That one worked. Might need adjustment because it uses prepatched sources. I'm not patient to wait for icecat to repatch every attempt.

figue commented 8 months ago

I usually make "makepkg -o" one time and then make a backup of sources. The next attempts I did it with "makepkg -e". Of course my PKGBUILD posted was with your comment suggestions but with upstream sources.

xiota commented 8 months ago

These are the lines to backup config and disable extensions:

  # disable extensions, otherwise profiling freezes
  cp "$_pkgsrc/browser/app/Makefile.in" "$srcdir/Makefile.in"
  sed -E -e '/^\t.*\/extensions\/gnu\/\*.*$/d' -i "$_pkgsrc/browser/app/Makefile.in"

  cp "$_pkgsrc/browser/installer/package-manifest.in" "$srcdir/package-manifest.in"
  sed -E -e '/^.*\/browser\/extensions\/.*$/d' -i "$_pkgsrc/browser/installer/package-manifest.in"

  cp "$_pkgsrc/browser/installer/allowed-dupes.mn" "$srcdir/allowed-dupes.mn"
  sed -E -e '/^browser\/extensions\/.*$/d' -i "$_pkgsrc/browser/installer/allowed-dupes.mn"

These are the lines to re-enable extensions after profiling, before final compilation.

  # reenable extensions
  cp "$srcdir/Makefile.in" "browser/app/Makefile.in"
  cp "$srcdir/package-manifest.in" "browser/installer/package-manifest.in"
  cp "$srcdir/allowed-dupes.mn" "browser/installer/allowed-dupes.mn"

I'd also suggest adding to the base config to enable some dev features (eg, install unsigned plugins).

export NIGHTLY_BUILD=1
figue commented 8 months ago

Ok, I think I misread your PKGBUILD. I'll retry.

But I don't wan't to enable NIGHTLY_BUILD or any other features, because this is a "release" package, and not development.

Another thing, sometimes instrumentated build fails in my laptop, I think it's because low ram (I have 16 GB), do you know if it's enough?

xiota commented 8 months ago

I have no idea if 16GB is enough. I wait for chaotic servers to build stuff.

Also, please put the firefox esr tarball in the source array so it can be saved between rebuilds. I'd also recommend using cp --reflink=auto to output.

figue commented 8 months ago

Something isn't working... I'll need more time to check it again:

Site not up-to-date reason: "/DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/obj/_virtualenvs/common" does not exist
DRI3 not available
failed to load driver: zink
console.warn: services.settings: Ignoring preference override of remote settings server
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
console.error: ({})
[Parent 534484, IPC I/O Parent] WARNING: Process 534602 may be hanging at shutdown; will wait for up to 8000ms: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:184
[Parent 534484, IPC I/O Parent] WARNING: Process 534602 hanging at shutdown; attempting crash report (fatal error).: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:207
[Parent 534484, IPC I/O Parent] WARNING: process 534602 exited on signal 6: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/base/process_util_posix.cc:264
[Parent 534484, IPC I/O Parent] WARNING: Process 534690 hanging at shutdown; attempting crash report (fatal error).: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:207
[Parent 534484, IPC I/O Parent] WARNING: process 534690 exited on signal 6: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/base/process_util_posix.cc:264
[Parent 534484, IPC I/O Parent] WARNING: Process 534614 hanging at shutdown; attempting crash report (fatal error).: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:207
[Parent 534484, IPC I/O Parent] WARNING: process 534614 exited on signal 6: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/base/process_util_posix.cc:264
[Parent 534484, IPC I/O Parent] WARNING: Process 534676 hanging at shutdown; attempting crash report (fatal error).: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:207
[Parent 534484, IPC I/O Parent] WARNING: process 534676 exited on signal 6: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/base/process_util_posix.cc:264
[Parent 534484, IPC I/O Parent] WARNING: Process 534678 hanging at shutdown; attempting crash report (fatal error).: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:207
[Parent 534484, IPC I/O Parent] WARNING: process 534678 exited on signal 6: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/base/process_util_posix.cc:264
jarlog: /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/jarlog
DRI3 not available
failed to load driver: zink
console.warn: services.settings: Ignoring preference override of remote settings server
console.warn: services.settings: Allow by setting MOZ_REMOTE_SETTINGS_DEVTOOLS=1 in the environment
console.error: ({})
console.error: (new SyntaxError("The URI is malformed.", (void 0), 133))
JavaScript error: resource://gre/modules/XULStore.sys.mjs, line 60: Error: Can't find profile directory.
console.error: (new Error("Polling for changes failed: The URI is malformed..", "resource://services-settings/remote-settings.sys.mjs", 324))
JavaScript error: http://localhost:8888/webkit/PerformanceTests/Speedometer/resources/todomvc/architecture-examples/emberjs/dist/assets/todomvc-5d3e8eb3d5b3740a33185edcb11eeb57.js, line 2: ReferenceError: define is not defined
LLVM Profile Error: Failed to write file "default_535731_random_1587722191164739197_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_2429564237568388778_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_12729726379566986498_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_7386420086373065007_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_1971493760237642638_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_3427181670884945074_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_16745329148469669040_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_8966671535442660559_0.profraw": Broken pipe
LLVM Profile Error: Failed to write file "default_535731_random_17989133037850198250_0.profraw": Broken pipe
[Parent 534764, IPC I/O Parent] WARNING: Process 534962 may be hanging at shutdown; will wait for up to 8000ms: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:184
[Parent 534764, IPC I/O Parent] WARNING: Process 534972 may be hanging at shutdown; will wait for up to 7200ms: file /DATA/tmp/makepkg/icecat/src/gnuzilla-ba0d2ab758143b9fe2ca14f6eed07d9a6a350c2b/output/icecat-115.6.0/ipc/chromium/src/chrome/common/process_watcher_posix_sigchld.cc:184
warning: default_534676_random_12729726379566986498_0.profraw: truncated profile data
warning: default_534678_random_12729726379566986498_0.profraw: invalid instrumentation profile data (file header is corrupt)
warning: default_534602_random_12729726379566986498_0.profraw: invalid instrumentation profile data (file header is corrupt)
warning: default_534690_random_12729726379566986498_0.profraw: invalid instrumentation profile data (file header is corrupt)
warning: default_534614_random_12729726379566986498_0.profraw: too much profile data
error: no profile can be merged
INFRA-ERROR: Failed to merge profile data. Corrupt profile?
xiota commented 8 months ago

As long as profiling completes and the final compilation stage can start, you can ignore the errors. They also happen in normal Firefox builds. There's some known upstream bug where processes close before writing profile data. clang is able to ignore irrelevant / missing data in the profile.

xiota commented 7 months ago

chaotic-aur/icecat is now built from aur/icecat-browser. The new package has the following benefits:

The change is made now because there was a new release recently (115.7.0).

@figue This comment should be updated or unpinned. I am willing to continue helping you improve aur/icecat if you are interested.

figue commented 7 months ago

Hi, I was unable to build IceCat with PGO normally with makepkg, doing the full build process that upstream requires. I'm testing now in a clean chroot. If it works, AUR will be updated.

xiota commented 7 months ago

Some option is missing in mozconfig. I don't know which one(s). This one works: PKGBUILD.icecat.txt

figue commented 7 months ago

I think all is related with my limited laptop. Even with 16 GB RAM PGO build fails with OOM kill. So I can't fully test. In any case using extra-x86_64-build or any other chroot helper is probably the only way to build PGO. I'll try again with your PKGBUILD that have a variable to build PGO or not. If it works I'll push it to AUR. I don't have any other computer with more that 16 GB here. If anybody wants to test it with PGO, it's pushed here.

xiota commented 7 months ago

The pkgbuild in your last gist won't work. It is missing options in the mozconfig file.

PKGBUILD.icecat.txt definitely works on chaotic-aur build server. Build it as-is to rule out hardware limitation. Then make changes as needed/desired.

If it doesn't work on your computer as-is, try changing:

ac_add_options --enable-lto=cross,full

to

ac_add_options --enable-lto=cross
xiota commented 6 months ago

@figue Are you willing to add me as comaintainer to aur/icecat? I would use the aur/icecat-browser PKGBUILD with variables set differently.

figue commented 6 months ago

Yeah. I don't have much time since my last role change within my company.

One question: icecatbrowser.org is maintained by GNU?

xiota commented 6 months ago

@figue I will update aur/icecat and submit deletion request for aur/icecat-browser.

icecatbrowser.org is separate from GNU. From what I can tell, the owner started it after GNU stopped distributing binaries and prepatched sources to fill the gap. He seems to run the makeicecat script without making any adjustments. For version 115.8.0, the only differences between the prepatched sources and a fresh patch with PKGBUILD are: