Bug 282407 - sysutils/lnav: Fails to build with clang 19 (main)
Summary: sysutils/lnav: Fails to build with clang 19 (main)
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: Nuno Teixeira
URL: https://github.com/tstack/lnav/compar...
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-29 15:36 UTC by Nuno Teixeira
Modified: 2024-11-28 09:55 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tom)


Attachments
Update to commit 1bef9f04 (1.44 KB, patch)
2024-11-01 10:56 UTC, Nuno Teixeira
tom: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nuno Teixeira freebsd_committer freebsd_triage 2024-10-29 15:36:14 UTC
Hello,

sysutils/lnav fails to build on main after clang 19 import.
I'm using this PR to gather all info and try to get a fix.

Already opened an upstream PR.

Cheers


```
gmake[3]: Entering directory '/wrkdirs/usr/ports/sysutils/lnav/work/lnav-0.12.2/src/pcrepp'
depbase=`echo pcre2pp.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
c++ -std=c++14 -DHAVE_CONFIG_H -I. -I../../src    -Wall -I../../src -I../../src/fmtlib -I../../src/third-party/scnlib/include -I../../src/third-party/doctest-root -I/usr/local/include -D_ISOC99_SOURCE -D__STDC_LIMIT_MACROS -D_GNU_SOURCE -DUSE_OS_TZDB=1 -DHAS_REMOTE_API=0 -I/usr/local/include -I/usr/local/include -I/usr/local/include  -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -pthread -MT pcre2pp.o -MD -MP -MF $depbase.Tpo -c -o pcre2pp.o pcre2pp.cc &&\
mv -f $depbase.Tpo $depbase.Po
In file included from pcre2pp.cc:32:
In file included from ./pcre2pp.hh:42:
../../src/base/intern_string.hh:371:36: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  371 |         auto left = this->template find_left_boundary(start, predicate, count);
      |                                    ^
../../src/base/intern_string.hh:618:28: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
  618 |             this->template to_c_str(allocator),
      |                            ^
2 errors generated.
gmake[3]: *** [Makefile:681: pcre2pp.o] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/sysutils/lnav/work/lnav-0.12.2/src/pcrepp'
gmake[2]: *** [Makefile:1686: all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/sysutils/lnav/work/lnav-0.12.2/src'
gmake[1]: *** [Makefile:1325: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/sysutils/lnav/work/lnav-0.12.2/src'
gmake: *** [Makefile:527: all-recursive] Error 1
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1
```
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2024-10-29 15:37:50 UTC
(...)

Log from pkg-fallout:
https://pkg-status.freebsd.org/beefy18/data/main-amd64-default/p645a502a4f60_s8b2e7da7085/logs/lnav-0.12.2.log

Same error on main-n273280-ac1d519c01ca.
Comment 2 Nuno Teixeira freebsd_committer freebsd_triage 2024-10-31 20:28:07 UTC
Note to self:

Check the best way to apply upstream patches that fixes issue (?):

https://github.com/tstack/lnav/compare/b22876ed1b1982984edf992dfc7d0c0a16476ad2...master

requirements.txt and Gemfile.lock changes to be ignored.
Comment 3 Nuno Teixeira freebsd_committer freebsd_triage 2024-11-01 10:54:54 UTC
(In reply to Nuno Teixeira from comment #2)

Some parts of pathes collection doesn't apply correctly and lots of build error occurs.

Solution that I've found it to update port to 0.12.3-beta2-62-g1bef9f04 that build fine on main and all supported releases and run-test look good.
Comment 4 Nuno Teixeira freebsd_committer freebsd_triage 2024-11-01 10:56:22 UTC
Created attachment 254843 [details]
Update to commit 1bef9f04

- Switch to compiler:c++17-lang
Comment 5 Nuno Teixeira freebsd_committer freebsd_triage 2024-11-01 10:59:07 UTC
Is up to you to update port and unbroken it on main or wait for 0.12.3 release is out.

Cheers
Comment 6 commit-hook freebsd_committer freebsd_triage 2024-11-01 11:06:43 UTC
A commit in branch main references this bug:

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

commit 5058ebb5ef38136b5c956ba02758297b51ed2f48
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-11-01 11:04:23 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-11-01 11:05:35 +0000

    sysutils/lnav: Mark broken on main

    PR:             282407

 sysutils/lnav/Makefile | 3 +++
 1 file changed, 3 insertions(+)
Comment 7 Thomas Hurst 2024-11-12 11:54:39 UTC
Comment on attachment 254843 [details]
Update to commit 1bef9f04

Thanks Nuno!

This also fixes a runtime crashing issue - https://github.com/tstack/lnav/issues/1318
Comment 8 Nuno Teixeira freebsd_committer freebsd_triage 2024-11-12 12:53:41 UTC
Note to self: check for portepoch bump

$ pkg version -t lnav-0.12.3.b2.62 lnav-0.12.3
$ <

No portepoch needed.
Comment 9 commit-hook freebsd_committer freebsd_triage 2024-11-12 13:23:40 UTC
A commit in branch main references this bug:

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

commit f69341068cd36a384a497c392a4ddec06473e38b
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-11-12 13:18:06 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-11-12 13:18:06 +0000

    sysutils/lnav: Update to 0.12.3-beta2-62

    - Unbreak build with clang 19 (main) [1]
    - Fix runtime crash on FreeBSD 14.1 [2]

    [1] https://github.com/tstack/lnav/issues/1328
    [2] https://github.com/tstack/lnav/issues/1318

    ChangeLog:
    https://github.com/tstack/lnav/compare/v0.12.2...v0.12.3-beta2-62-g1bef9f04

    PR:             282407

 sysutils/lnav/Makefile | 13 +++++++------
 sysutils/lnav/distinfo |  6 +++---
 2 files changed, 10 insertions(+), 9 deletions(-)
Comment 10 Nuno Teixeira freebsd_committer freebsd_triage 2024-11-12 13:29:14 UTC
For what I checked, upstream is at beta4 so a final release will be out soon.
My sugestion is to wait for 0.12.3 version instead of tracking beta* tags (this port update is an exception).

Feel free to add me to CC on future updates as I use this tool regularly.

Committed, thanks!
Comment 11 commit-hook freebsd_committer freebsd_triage 2024-11-28 09:55:43 UTC
A commit in branch 2024Q4 references this bug:

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

commit b35f80eed4ae972f23e90c62a90ccf7116dacea0
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-11-01 11:04:23 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-11-28 09:46:21 +0000

    sysutils/lnav: Mark broken on main

    PR:             282407
    (cherry picked from commit 5058ebb5ef38136b5c956ba02758297b51ed2f48)

 sysutils/lnav/Makefile | 3 +++
 1 file changed, 3 insertions(+)
Comment 12 commit-hook freebsd_committer freebsd_triage 2024-11-28 09:55:44 UTC
A commit in branch 2024Q4 references this bug:

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

commit 3d52ddae6e99cda20bbb3f59400af8d6ec977f1a
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2024-11-12 13:18:06 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2024-11-28 09:46:44 +0000

    sysutils/lnav: Update to 0.12.3-beta2-62

    - Unbreak build with clang 19 (main) [1]
    - Fix runtime crash on FreeBSD 14.1 [2]

    [1] https://github.com/tstack/lnav/issues/1328
    [2] https://github.com/tstack/lnav/issues/1318

    ChangeLog:
    https://github.com/tstack/lnav/compare/v0.12.2...v0.12.3-beta2-62-g1bef9f04

    PR:             282407
    (cherry picked from commit f69341068cd36a384a497c392a4ddec06473e38b)

 sysutils/lnav/Makefile | 13 +++++++------
 sysutils/lnav/distinfo |  6 +++---
 2 files changed, 10 insertions(+), 9 deletions(-)