Bug 265587 - databases/leofs: Fix build on armv6, armv7, aarch64
Summary: databases/leofs: Fix build on armv6, armv7, aarch64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Many People
Assignee: Mikael Urankar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-03 05:51 UTC by Robert Clausecker
Modified: 2022-11-13 20:02 UTC (History)
4 users (show)

See Also:
koobs: maintainer-feedback? (trociny)
koobs: maintainer-feedback? (pkubaj)
fuz: merge-quarterly?


Attachments
databases/leofs: fix build on armv6, armv7, aarch64 (1.21 KB, patch)
2022-08-03 05:51 UTC, Robert Clausecker
fuz: 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-08-03 05:51:20 UTC
Created attachment 235648 [details]
databases/leofs: fix build on armv6, armv7, aarch64

Apply the fix from db917ae to armv6, armv7, and aarch64.

Tested with Poudriere on armv7 aarch64 FreeBSD 13.1.
Please MFH if possible.

As we have now applied the same fix to a multitude of architectures, please consider just making the same fix apply to all architectures by replacing the various CFLAGS_... lines with a single

    CFLAGS+=  -DLEVELDB_CSTDATOMIC_PRESENT
Comment 1 Robert Clausecker freebsd_committer freebsd_triage 2022-08-18 16:24:08 UTC
maintainer timeout
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2022-08-18 16:24:21 UTC
Comment on attachment 235648 [details]
databases/leofs: fix build on armv6, armv7, aarch64

maintainer timeout on patch
Comment 3 Mikolaj Golub freebsd_committer freebsd_triage 2022-09-07 09:15:16 UTC
I don't have arm platform to test, and I don't quite understand how `CFLAGS+=  -DLEVELDB_CSTDATOMIC_PRESENT` may fix "fatal error: lzo/lzo1x.h file not found"?

Actually I can reproduce this error on amd64 platform if I install lzo2 package before building. With the package installed, when snappy is being built it autodetects lzo2 (HAVE_LIBLZO2 is set) and tries to include lzo/lzo1x.h on the compilation step, which fails because the compiler does not look for headers in /usr/local/include directory.

I would expect something similar is happening when it was building on arm platform.
Comment 4 Robert Clausecker freebsd_committer freebsd_triage 2022-09-07 11:54:14 UTC
The fix was originally developed by pkubaj@, ask him for details.  It was originally introduced here:

    https://cgit.freebsd.org/ports/commit/?id=db917ae45eeedce0b9a508f7875fd85905b1df9f
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2022-10-09 21:14:32 UTC
Any progress with this one?  pkubaj@, can you provide the requested feedback?
Comment 6 Mikolaj Golub freebsd_committer freebsd_triage 2022-10-10 16:08:55 UTC
Unfortunately I don't have resources to test this patch on not amd64 platforms.

If one may test and confirm it really works feel free to commit the patch. No objections on my side.
Comment 7 Piotr Kubaj freebsd_committer freebsd_triage 2022-10-10 16:38:02 UTC
That lzo issue is unrelated to the bug I fixed. The problem was in atomic_pointer.h, which seems not available in the newest leveldb, but is visible e.g. at https://github.com/Mojang/leveldb-mcpe/blob/master/port/atomic_pointer.h. LEVELDB_CSTDATOMIC_PRESENT was improperly detected so I manually forced this path by adding a define.
Comment 8 Robert Clausecker freebsd_committer freebsd_triage 2022-10-10 20:09:17 UTC
(In reply to Mikolaj Golub from comment #6)

As listed in my initial bug report, I have successfully build tested this patch on armv7 and arm64 FreeBSD 13.1.

Please let me know if you want me to perform additional testing and if yes what kind of testing.
Comment 9 Kubilay Kocak freebsd_committer freebsd_triage 2022-10-28 21:10:55 UTC
^Triage: Reset assignee, open to take (maintainer accepted, see comment 6)

  Approved by: portmgr (blanket: build fix)
  Approved by: trociny (maintainer)
  MFH: 2022Q4 (buildfix)

@Mikolaj If you'd like to land this tested patch, please self-assign to commit, merge and close this issue.

@Piotr If you have cycles to land this, feel free.
Comment 10 commit-hook freebsd_committer freebsd_triage 2022-10-30 15:48:39 UTC
A commit in branch main references this bug:

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

commit 58449f2308f4e165fbdfae324794a803820831b3
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-08-03 05:47:45 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-10-30 15:47:39 +0000

    databases/leofs: fix build on armv6, armv7, aarch64

    Apply the fix from db917ae to armv6, armv7, and aarch64.

    PR:             265587
    Approved by:    portmgr (blanket: build fix)
    Approved by:    trociny (maintainer)

 databases/leofs/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
Comment 11 Robert Clausecker freebsd_committer freebsd_triage 2022-11-07 08:37:33 UTC
@mikael Please don't forget to MFH this change.
Comment 12 commit-hook freebsd_committer freebsd_triage 2022-11-13 19:18:01 UTC
A commit in branch 2022Q4 references this bug:

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

commit e2c755d49fd949aea1d9ef15bd8f0001afeb9cca
Author:     Robert Clausecker <fuz@fuz.su>
AuthorDate: 2022-08-03 05:47:45 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-11-13 19:04:47 +0000

    databases/leofs: fix build on armv6, armv7, aarch64

    Apply the fix from db917ae to armv6, armv7, and aarch64.

    PR:             265587
    Approved by:    portmgr (blanket: build fix)
    Approved by:    trociny (maintainer)

    (cherry picked from commit 58449f2308f4e165fbdfae324794a803820831b3)

 databases/leofs/Makefile | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)