[BUG] rxvt-unicode 9.31 fails to build with GCC 16 due to lerp() name conflict
Hemanth Kumar M D
Hemanth.KumarMD at windriver.com
Tue May 5 06:56:20 CEST 2026
Hi,
While testing rxvt-unicode 9.31 with GCC 16,
I encountered a build failure caused by a name conflict with
|std::lerp|, which is available with C++20.
*Issue:*
rxvt-unicode defines a custom |lerp()|function in |src/rxvtutil.h|.
With GCC 16 (C++20), this conflicts with |std::lerp|, leading to
ambiguous overload resolution.
*Error:*
|rxvttoolkit.C:837:33: error: call of overloaded 'lerp<int, int,
int>(...)' is ambiguous - candidate: 'constexpr float std::lerp(float,
float, float)' - candidate: 'T lerp(T, U, P)'|
This matches the issue reported in Gentoo .
https://bugs.gentoo.org/967067
*Fix:*
Rename the custom |lerp()|function to avoid the conflict (e.g.,
|rxvt_lerp()|), and update all call sites accordingly.
This approach has already been applied in Gentoo:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=785ecf0b5343348e298a5fad9c46ba58b9b303fe
<https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=785ecf0b5343348e298a5fad9c46ba58b9b303fe>
*Impact:*
This issue affects builds with modern toolchains using GCC 16 (or any
compiler enabling C++20 |std::lerp|).
--
Regards,
Hemanth Kumar M D
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20260505/b8e438ba/attachment.htm>
More information about the rxvt-unicode
mailing list