Re: git: 8e9ad0847d59 - 2024Q4 - science/step: Fix build with LLVM >= 19.1.0-rc1

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Wed, 30 Oct 2024 11:55:12 UTC
(...)

Forgot to mention PR
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=282407

Still looking on how to fix this kind of error.

Cheers,

Nuno Teixeira <eduardo@freebsd.org> escreveu (quarta, 30/10/2024 à(s)
10:53):

> Hello Jason,
>
> Could you take a look at sysutils/lnav upstream PR
> https://github.com/tstack/lnav/issues/1328 ?
>
> Any help is welcome.
>
> Cheers,
>
> Jason E. Hale <jhale@freebsd.org> escreveu (quarta, 30/10/2024 à(s)
> 08:58):
>
>> The branch 2024Q4 has been updated by jhale:
>>
>> URL:
>> https://cgit.FreeBSD.org/ports/commit/?id=8e9ad0847d59db0920a771915b16c66deceb2a80
>>
>> commit 8e9ad0847d59db0920a771915b16c66deceb2a80
>> Author:     Jason E. Hale <jhale@FreeBSD.org>
>> AuthorDate: 2024-10-30 06:43:09 +0000
>> Commit:     Jason E. Hale <jhale@FreeBSD.org>
>> CommitDate: 2024-10-30 08:57:36 +0000
>>
>>     science/step: Fix build with LLVM >= 19.1.0-rc1
>>
>>     Clang >= 19.1.0-rc1 requires a template argument list after an
>> identifier
>>     prefixed by the template keyword. [1]
>>
>>
>> /wrkdirs/usr/ports/science/step/work/step-23.08.5/stepcore/object.h:252:45:
>>     error: a template argument list is expected after a name prefixed by
>> the
>>     template keyword [-Wmissing-template-arg-list-after-template-kw]
>>       252 |     if(!src || !src->metaObject()->template inherits(_Dst()))
>> return NULL;
>>
>>     [1]
>> https://github.com/llvm/llvm-project/commit/f46d1463b835560d90ad3ac02b63c771e4ebe566
>>
>>     Reported by:    pkg-fallout
>>     MFH:            2024Q2
>>
>>     (cherry picked from commit f812d021d79f6a4034640eece6b7ae1b32df21a0)
>> ---
>>  science/step/files/patch-stepcore_object.h | 21 +++++++++++++++++++++
>>  1 file changed, 21 insertions(+)
>>
>> diff --git a/science/step/files/patch-stepcore_object.h
>> b/science/step/files/patch-stepcore_object.h
>> new file mode 100644
>> index 000000000000..5b2f47415a27
>> --- /dev/null
>> +++ b/science/step/files/patch-stepcore_object.h
>> @@ -0,0 +1,21 @@
>> +Clang >= 19.1.0-rc1 requires a template argument list after an identifier
>> +prefixed by the template keyword. [1]
>> +
>>
>> +/wrkdirs/usr/ports/science/step/work/step-23.08.5/stepcore/object.h:252:45:
>> +error: a template argument list is expected after a name prefixed by the
>> +template keyword [-Wmissing-template-arg-list-after-template-kw]
>> +  252 |     if(!src || !src->metaObject()->template inherits(_Dst()))
>> return NULL;
>> +
>> +[1]
>> https://github.com/llvm/llvm-project/commit/f46d1463b835560d90ad3ac02b63c771e4ebe566
>> +
>> +--- stepcore/object.h.orig     2024-02-10 03:35:30 UTC
>> ++++ stepcore/object.h
>> +@@ -249,7 +249,7 @@ _Dst stepcore_cast(_Src src) {
>> + /** Casts between pointers to Object */
>> + template<class _Dst, class _Src> // XXX: implement it better
>> + _Dst stepcore_cast(_Src src) {
>> +-    if(!src || !src->metaObject()->template inherits(_Dst())) return
>> NULL;
>> ++    if(!src || !src->metaObject()->template inherits<_Dst>(_Dst()))
>> return NULL;
>> +     return static_cast<_Dst>(src);
>> + }
>> +
>>
>
>
> --
> Nuno Teixeira
> FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org
>


-- 
Nuno Teixeira
FreeBSD UNIX:  <eduardo@FreeBSD.org>   Web:  https://FreeBSD.org