Summary: | mail-filter/rspamd-3.6-r1 fails to build with gcc14 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Kim B. Sindalsen <gentoo> |
Component: | Current packages | Assignee: | Petr Vaněk <arkamar> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | proxy-maint, sam |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112293 https://github.com/rspamd/rspamd/pull/4675 https://github.com/gentoo/gentoo/pull/33277 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 914580 | ||
Attachments: |
build.log
build.log - with #include <algorithm> |
Description
Kim B. Sindalsen
2023-10-28 16:54:02 UTC
Please always include build.logs as an attachment, not a link to a paste service. Created attachment 873608 [details]
build.log
build.log
/var/tmp/portage/mail-filter/rspamd-3.6-r1/work/rspamd-3.6/src/libstat/backends/http_backend.cxx: In member function ‘bool rspamd::stat::http::http_backends_collection::remove_backend(rspamd_statfile*)’: /var/tmp/portage/mail-filter/rspamd-3.6-r1/work/rspamd-3.6/src/libstat/backends/http_backend.cxx:264:49: error: cannot convert ‘std::vector<rspamd_statfile*>::iterator’ to ‘const char*’ 264 | auto backend_it = std::remove(std::begin(backends), std::end(backends), st); | ~~~~~~~~~~^~~~~~~~~~ | | | std::vector<rspamd_statfile*>::iterator In file included from /var/tmp/portage/mail-filter/rspamd-3.6-r1/work/rspamd-3.6_build/src/config.h:246, from /var/tmp/portage/mail-filter/rspamd-3.6-r1/work/rspamd-3.6/src/libstat/backends/http_backend.cxx:17: /usr/include/stdio.h:152:32: note: initializing argument 1 of ‘int remove(const char*)’ 152 | extern int remove (const char *__filename) __THROW; | ~~~~~~~~~~~~^~~~~~~~~~ Can you try adding a <algorithm> include in http_backend.cxx? (There's a bug here in the compiler should give a fixit, too.) (arkamar, do you fancy coming up with some small example of this where it gives that horrible error with no suggestion to include algorithm? cvise should be able to help) Created attachment 873634 [details]
build.log - with #include <algorithm>
New build.log after manually adding #include <algorithm> to src/libstat/backends/http_backend.cxx
try adding <algorithm> to mime_string.hxx too Added #include <algorithm> to both src/libstat/backends/http_backend.cxx src/libmime/mime_string.hxx And it compiles fine. (In reply to Sam James from comment #4) > (arkamar, do you fancy coming up with some small example of this where it > gives that horrible error with no suggestion to include algorithm? cvise > should be able to help) I will give it a shot in following days. 3.7.3 has the same issue. I was able to minimize it to this: ``` #include <functional> #include <stdexcept> struct test; std::vector<test *> v; auto f(test *t) { auto it = std::remove(begin(v), end(v), t); } ``` It builds fine with gcc-13 but gcc-14 produces similar error to original one: test.cxx: In function _auto f(test*)_: test.cxx:6:30: error: cannot convert _std::vector<test*>::iterator_ to _const char*_ 6 | auto it = std::remove(begin(v), end(v), t); | ~~~~~^~~ | | | std::vector<test*>::iterator In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/cstdio:42, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/ext/string_conversions.h:45, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/basic_string.h:4158, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/string:54, from /usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/stdexcept:39, from test.cxx:2: /usr/include/stdio.h:157:32: note: initializing argument 1 of _int remove(const char*)_ 157 | extern int remove (const char *__filename) __THROW; | Thanks. The failing to build is fine (libstdc++ changes transitive includes regularly between releases - see e.g. https://gcc.gnu.org/gcc-13/porting_to.html (page for 14 isn't there yet)), but the terrible error message without a fixit is not. Do you want me to report it, requesting a better error message + fixit, or do you want to? I will report it. reported to gcc Thanks! jwakely has added https://gcc.gnu.org/git/?p=gcc-wwwdocs.git;a=commit;h=f83141b2c816b09a2dd44ea5a84d868b7f0e50e7 -> https://gcc.gnu.org/gcc-14/porting_to.html now too so we can link to that in upstream commit msgs. Issue is fixed in upstream https://github.com/rspamd/rspamd/commit/249939dfcb2244ba83d5ceb2b50a0429f53b23f1 The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ba1af88fd6f662102ff33d552461b8045ec0a9bf commit ba1af88fd6f662102ff33d552461b8045ec0a9bf Author: Petr Vaněk <arkamar@atlas.cz> AuthorDate: 2023-11-14 15:48:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-11-17 11:07:57 +0000 mail-filter/rspamd: add 3.7.4 Unneeded dependencies detected by qa-vdb: - sys-apps/file - Upstream does not use it since version 2.0, see [1]. - dev-libs/libev - Upstream bundles this library since version 2.0, see [2]. It contains few incompatible changes [3-5], which make unbundling currently unfeasible. dev-libs/libfmt and dev-libs/xxhash are DEPEND only, detected by qa-vdb. Upstream uses them both in inline mode, see [6] and [7], respecitvely. Upstream bundles backward-cpp [8] since version 3.7.1. It was necessary to disable its auto-detection property. The last release was in 2021, so I decided to keep it bundled for now. This version also contains the fix for GCC 14, see bug 916438. [1] https://github.com/rspamd/rspamd/commit/56e236efa012c4be6b3893314ce4d3a570e16327 [2] https://github.com/rspamd/rspamd/commit/5376c8a25208ae4c7c21c2ff1894a5ebb2df6340 [3] https://github.com/rspamd/rspamd/commit/7c4eb706c124806d254af6033c7023ee488b2c6c [4] https://github.com/rspamd/rspamd/commit/b3713de7cefa87af9ed95d091db497cef63502d0 [5] https://github.com/rspamd/rspamd/commit/0194245dcdbecfb34088339689668fd6c1111cb8 [6] https://github.com/rspamd/rspamd/blob/3.7.3/CMakeLists.txt#L264 [7] https://github.com/rspamd/rspamd/blob/3.7.3/src/libcryptobox/cryptobox.c#L30-L31 [8] https://github.com/bombela/backward-cpp Closes: https://bugs.gentoo.org/916438 Closes: https://bugs.gentoo.org/916488 Signed-off-by: Petr Vaněk <arkamar@atlas.cz> Signed-off-by: Sam James <sam@gentoo.org> mail-filter/rspamd/Manifest | 1 + mail-filter/rspamd/rspamd-3.7.4.ebuild | 152 +++++++++++++++++++++++++++++++++ 2 files changed, 153 insertions(+) |