Bug 268079 - devel/lightning: fix build on armv6/armv7
Summary: devel/lightning: fix build on armv6/armv7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-30 12:09 UTC by Robert Clausecker
Modified: 2022-11-30 14:48 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (bofh)
bofh: merge-quarterly+


Attachments
devel/lightning: fix build on armv6/armv7 (3.70 KB, patch)
2022-11-30 12:09 UTC, Robert Clausecker
no flags Details | Diff
devel/lightning armv7 FreeBSD 13.1 build log (37.32 KB, text/plain)
2022-11-30 12:37 UTC, Robert Clausecker
no flags Details
Fix patch with 2.2.0 (2.72 KB, patch)
2022-11-30 13:04 UTC, Muhammad Moinur Rahman
no flags 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-11-30 12:09:11 UTC
Created attachment 238447 [details]
devel/lightning: fix build on armv6/armv7

Fix the problem that made the build fail with LLVM.  However,
compiling with LLVM still leads to test suite failures on ARM
so we compile with gcc instead.  The patch for LLVM is left
in for if a future version of the library fixes the problem.

Also fix the way the C compiler executable is patched in.

Please MFH if possible.
Tested with Poudriere on armv7 arm64 FreeBSD 13.1.
The test suite passes.
Comment 1 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-11-30 12:23:15 UTC
Can you share the poudriere logs in any way? Currently my rpi is unavailable and I cannot test the builds.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-11-30 12:37:46 UTC
Created attachment 238449 [details]
devel/lightning armv7 FreeBSD 13.1 build log

Please see attached build log
Comment 3 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-11-30 12:51:40 UTC
Thanks. By the by I did not get any pkg-fallout reports for this. So I need to know like whether this fails to build or fails to run. In case it builds fine then we need to bump PORTREVISION.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2022-11-30 12:56:10 UTC
(In reply to Muhammad Moinur Rahman from comment #3)

You did not get any reports because the port is marked as BROKEN for arm, so the package cluster does not attempt to build it.  It did not build without the patch.
Comment 5 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-11-30 13:04:26 UTC
Created attachment 238451 [details]
Fix patch with 2.2.0

The submitted patch is based on 2.1.3 but recently lightning was updated to 2.2.0. This new patch is based on 2.2.0.
Comment 6 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-11-30 13:05:21 UTC
Currently your patch is based on 2.1.3 which was updated last week I believe. Can you please check with my new patch and let me know if it's building on arm?
Comment 7 Robert Clausecker freebsd_committer freebsd_triage 2022-11-30 13:10:24 UTC
(In reply to Muhammad Moinur Rahman from comment #6)

I only update my local ports tree about once a month as rebuilding all dependencies and compilers takes a few days.

I can thus test your patch with 2.2.0, but that would be without Poudriere.  Is that okay for you?
Comment 8 Muhammad Moinur Rahman freebsd_committer freebsd_triage 2022-11-30 13:11:46 UTC
(In reply to Robert Clausecker from comment #7)
Yes it should be fine.
Comment 9 Robert Clausecker freebsd_committer freebsd_triage 2022-11-30 14:31:57 UTC
(In reply to Robert Clausecker from comment #7)

I can confirm that lightning-2.2.0 builds and passes the test suite on armv7 with the patch you attached.  I have confirmed this both on my RPi 4B (running an armv7 FreeBSD 13.1 jail on arm64 FreeBSD 13.1) and on my RPi 2B (running armv7 FreeBSD 13.1.)
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-11-30 14:37:37 UTC
A commit in branch main references this bug:

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

commit fc86afb83def6fe03212dea1ad2e953daa735847
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-11-30 14:34:36 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-11-30 14:34:36 +0000

    devel/lightning: Fix build on armv6/armv7

    Fix the problem that made the build fail with LLVM.  However,
    compiling with LLVM still leads to test suite failures on ARM
    so we compile with gcc instead.  The patch for LLVM is left
    in for if a future version of the library fixes the problem.

    PR:             268079
    Reported by:    fuz@fuz.su
    MFH:            2022Q4

 devel/lightning/Makefile                             | 16 ++++++++++++----
 devel/lightning/files/patch-check_lightning.c (new)  | 11 +++++++++++
 devel/lightning/files/patch-lib_jit__arm-swf.c (new) | 20 ++++++++++++++++++++
 3 files changed, 43 insertions(+), 4 deletions(-)
Comment 11 commit-hook freebsd_committer freebsd_triage 2022-11-30 14:47:39 UTC
A commit in branch 2022Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=749ca3ec2e60189bcce1736c2f44faf54496e958

commit 749ca3ec2e60189bcce1736c2f44faf54496e958
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-11-30 14:34:36 +0000
Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
CommitDate: 2022-11-30 14:46:31 +0000

    devel/lightning: Fix build on armv6/armv7

    Fix the problem that made the build fail with LLVM.  However,
    compiling with LLVM still leads to test suite failures on ARM
    so we compile with gcc instead.  The patch for LLVM is left
    in for if a future version of the library fixes the problem.

    PR:             268079
    Reported by:    fuz@fuz.su
    MFH:            2022Q4

    (cherry picked from commit fc86afb83def6fe03212dea1ad2e953daa735847)

 devel/lightning/Makefile                             | 16 ++++++++++++----
 devel/lightning/files/patch-check_lightning.c (new)  | 11 +++++++++++
 devel/lightning/files/patch-lib_jit__arm-swf.c (new) | 20 ++++++++++++++++++++
 3 files changed, 43 insertions(+), 4 deletions(-)