Bug 265438 - devel/electron19: fix build on armv7
Summary: devel/electron19: fix build on armv7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hiroki Tagato
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-25 19:24 UTC by Robert Clausecker
Modified: 2022-08-01 09:02 UTC (History)
3 users (show)

See Also:
tagattie: maintainer-feedback+


Attachments
devel/electron19: fix build on armv7 (7.36 KB, patch)
2022-07-25 19:24 UTC, Robert Clausecker
tagattie: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Clausecker freebsd_committer freebsd_triage 2022-07-25 19:24:21 UTC
Created attachment 235472 [details]
devel/electron19: fix build on armv7

- add some missing bits of armv7 FreeBSD support code
   for the bundled boringssl
 - import V8 patch from bug #260651

Tested without Poudriere on armv7 FreeBSD 13.1.  The build took 3 days and I do not have the resources to repeat it right now.  Additionally, I only managed to test with electron19-19.0.6, not the most recent version.

I have not tested the DIST option.  It looks like that one will require some Makefile changes which I do not know how you want them to be done.

I'll keep the wrkdir around for a few days if you want me to run additional tests.

I'll try to fix the arm64 build next.

The patch likely also works with other electron versions.
Please MFH if possible.
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2022-07-26 06:33:58 UTC
Is this a backport form upstream and/or submitted upstream?
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2022-07-26 09:22:51 UTC
What's the problem with aarch64?
Comment 3 Robert Clausecker freebsd_committer freebsd_triage 2022-07-26 13:59:39 UTC
(In reply to Daniel Engberg from comment #1)

No.

(In reply to Daniel Engberg from comment #2)

Same as for armv7: bits and pieces are missing to make it compile.  Will take me a week or two to get started on that though.
Comment 4 Mikael Urankar freebsd_committer freebsd_triage 2022-07-27 17:46:23 UTC
(In reply to Robert Clausecker from comment #3)
It builds fine on aarch64
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2022-07-27 18:09:53 UTC
(In reply to Mikael Urankar from comment #4)

Interesting.  The boringssl support code for aarch64 FreeBSD seems to be missing, so I wonder how that works.

Anyway, thanks for checking!  Saves me the three or four days it takes to do a test compilation.
Comment 6 Hiroki Tagato freebsd_committer freebsd_triage 2022-07-28 06:42:35 UTC
(In reply to Robert Clausecker from comment #0)

Thanks for the patch. I will see if it is OK with electron[17|18|19].

A large part of electron code is chromium source and the patch is in regards to that part.

So it would be a good idea to check if the patch is also applicable to www/chromium.
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2022-07-28 14:18:54 UTC
(In reply to Hiroki Tagato from comment #6)

Hi,

www/chromium is marked as “not for” armv7 (that was added in 391acde), so I don't think it is relevant to check that.  If desired, I can go ahead and see if it really doesn't build.  However, that'll take at least another two weeks as chromium is a very slow build and my armv7 build machine is busy with other things.
Comment 8 commit-hook freebsd_committer freebsd_triage 2022-07-30 02:08:04 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4538dfed8f4afa89fa8f6ecef453591f9cd0cc50

commit 4538dfed8f4afa89fa8f6ecef453591f9cd0cc50
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-07-30 02:04:57 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2022-07-30 02:07:00 +0000

    devel/electron19: fix build on armv7

    - add some missing bits of armv7 FreeBSD support code
       for the bundled boringssl
    - import V8 patch from bug #260651

    PR:             265438
    Reported by:    Robert Clausecker <fuz@fuz.su>

 ...atch-third__party_boringssl_BUILD.generated.gni | 11 +++--
 ..._boringssl_src_crypto_cpu__arm__freebsd.c (new) | 55 ++++++++++++++++++++++
 .../patch-third__party_skia_src_core_SkCpu.cpp     | 25 +++++++++-
 .../patch-v8_src_base_platform_platform-freebsd.cc |  2 +-
 .../patch-v8_src_codegen_arm_cpu-arm.cc (new)      | 18 +++++++
 5 files changed, 106 insertions(+), 5 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2022-07-31 03:12:41 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=14d286f267af7e15c5ae9e54da52e7bd892e6125

commit 14d286f267af7e15c5ae9e54da52e7bd892e6125
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-07-31 03:09:31 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2022-07-31 03:11:32 +0000

    devel/electron18: fix build on armv7

    - add some missing bits of armv7 FreeBSD support code
      for the bundled boringssl
    - import V8 patch from bug #260651

    PR:             265438
    Reported by:    Robert Clausecker <fuz@fuz.su>

 ...atch-third__party_boringssl_BUILD.generated.gni |  7 ++-
 ..._boringssl_src_crypto_cpu__arm__freebsd.c (new) | 55 ++++++++++++++++++++++
 .../patch-third__party_skia_src_core_SkCpu.cpp     | 23 +++++++++
 .../patch-v8_src_base_platform_platform-freebsd.cc |  2 +-
 .../patch-v8_src_codegen_arm_cpu-arm.cc (new)      | 18 +++++++
 5 files changed, 102 insertions(+), 3 deletions(-)
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-08-01 09:00:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=18b528bd087d9158212e0854bb14403d005dd4a2

commit 18b528bd087d9158212e0854bb14403d005dd4a2
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-08-01 08:58:46 +0000
Commit:     Hiroki Tagato <tagattie@FreeBSD.org>
CommitDate: 2022-08-01 09:00:12 +0000

    devel/electron17: fix build on armv7

    - add some missing bits of armv7 FreeBSD support code
      for the bundled boringssl
    - import V8 patch from bug #260651

    PR:             265438
    Reported by:    Robert Clausecker <fuz@fuz.su>

 ...atch-third__party_boringssl_BUILD.generated.gni | 10 +++-
 ...ty_boringssl_src_crypto_cpu-arm-freebsd.c (new) | 55 ++++++++++++++++++++++
 .../patch-third__party_skia_src_core_SkCpu.cpp     | 23 +++++++++
 .../patch-v8_src_base_platform_platform-freebsd.cc |  2 +-
 .../patch-v8_src_codegen_arm_cpu-arm.cc (new)      | 18 +++++++
 5 files changed, 106 insertions(+), 2 deletions(-)
Comment 11 Hiroki Tagato freebsd_committer freebsd_triage 2022-08-01 09:02:02 UTC
Committed, thanks!