| Summary: | apt: ошибка сборки с GCC 13 | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Sisyphus | Reporter: | Alexey Sheplyakov <asheplyakov> | ||||||
| Component: | apt | Assignee: | placeholder <placeholder> | ||||||
| Status: | CLOSED FIXED | QA Contact: | qa-sisyphus | ||||||
| Severity: | normal | ||||||||
| Priority: | P5 | CC: | asheplyakov, boyarsh, glebfm, imz, iv, ldv, nir, placeholder, sin, vt | ||||||
| Version: | unstable | ||||||||
| Hardware: | all | ||||||||
| OS: | Linux | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 45802 | ||||||||
| Attachments: |
|
||||||||
Created attachment 13149 [details]
исправление
Created attachment 13151 [details]
исправление, часть 2
http.cc:1014:18: error: ignoring return value of 'const _CharT* std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with _CharT = char; _Traits = std::char_traits<char>;>
1014 | FailFile.c_str(); // Make sure we dont do a malloc in the signal handler
| ~~~~~~~~~~~~~~^~
In file included from /usr/include/c++/13/string:54,
from ../include/apt-pkg/fileutl.h:23,
from http.cc:29:
/usr/include/c++/13/bits/basic_string.h:2594:7: note: declared here
2594 | c_str() const _GLIBCXX_NOEXCEPT
| ^~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:622: http.o] Error 1
Similarly in ftp.cc and rsh.cc
(Ответ для Alexey Sheplyakov на комментарий #3) > http.cc:1014:18: error: ignoring return value of 'const _CharT* > std::__cxx11::basic_string<_CharT, _Traits, _Alloc>::c_str() const [with > _CharT = char; _Traits = std::char_traits<char>;> > 1014 | FailFile.c_str(); // Make sure we dont do a malloc in the > signal handler > | ~~~~~~~~~~~~~~^~ > In file included from /usr/include/c++/13/string:54, > from ../include/apt-pkg/fileutl.h:23, > from http.cc:29: > /usr/include/c++/13/bits/basic_string.h:2594:7: note: declared here > 2594 | c_str() const _GLIBCXX_NOEXCEPT > | ^~~~~ > cc1plus: all warnings being treated as errors > make[1]: *** [Makefile:622: http.o] Error 1 > > Similarly in ftp.cc and rsh.cc Спасибо за патч, включу его в следующий релиз, чтобы адаптироваться к требованиям gcc13. Правда, я там переписал сразу со static_cast: static_cast<void>(FailFile.c_str()); // Make sure we dont do a malloc in the signal handler (Ответ для Alexey Sheplyakov на комментарий #0) > contrib/mmap.cc:80:20: error: 'SIZE_MAX' was not declared in this scope > 80 | if (EndOfFile > SIZE_MAX) > | ^~~~~~~~ > contrib/mmap.cc:38:8: note: 'SIZE_MAX' is defined in header '<cstdint>'; did > you forget to '#include <cstdint>'? > 37 | #include <cassert> > +++ |+#include <cstdint> > 38 | > /*}}}*/ > contrib/mmap.cc:82:40: error: 'uintmax_t' does not name a type > 82 | static_cast<uintmax_t>(EndOfFile)); > | ^~~~~~~~~ > contrib/mmap.cc: In member function 'std::optional<long unsigned int> > DynamicMMap::WriteString(const char*, size_t)': > contrib/mmap.cc:363:15: error: 'SIZE_MAX' was not declared in this scope > 363 | if (Len == SIZE_MAX) > | ^~~~~~~~ > contrib/mmap.cc:363:15: note: 'SIZE_MAX' is defined in header '<cstdint>'; > did you forget to '#include <cstdint>'? > make[1]: *** [Makefile:775: contrib/mmap.lo] Error 1 Спасибо, это я тоже учёл приложенным патчем, и в дальнейших изменениях постарался подобные места отследить. Новый тег, который я собираю -- 0.5.15lorg2-alt84 в задании 320624 -- со всякими новыми изменениями, но я их с gcc13 не проверял, потому что у меня (в Сизифе) нет gcc13. Там может что-то ещё вылезти. apt-0.5.15lorg2-alt84 -> sisyphus:
Fri Jun 02 2023 Ivan Zakharyaschev <imz@altlinux> 0.5.15lorg2-alt84
- Fixed the display of descriptions in aptitude and packagekit (by making
the format closer to Debian's):
+ Fixed the display of the first line, which was not shown in packagekit.
+ Fixed the regression (from 0.5.15lorg2-alt72) in the display of
all but the first lines (in aptitude and packagekit). (ALT#40826)
+ This has also made packagekit show translated descriptions. (ALT#46251)
+ As a result, there is a cosmetic regression in synaptic: extra blanks.
- Increased the buf for reading to 32k for effectiveness in methods:
gzip (and other compression types), rsh, ftp.
- Avoid compilation errors with GCC 13 (thx Alexey Sheplyakov). (ALT#46105)
|
contrib/mmap.cc:80:20: error: 'SIZE_MAX' was not declared in this scope 80 | if (EndOfFile > SIZE_MAX) | ^~~~~~~~ contrib/mmap.cc:38:8: note: 'SIZE_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? 37 | #include <cassert> +++ |+#include <cstdint> 38 | /*}}}*/ contrib/mmap.cc:82:40: error: 'uintmax_t' does not name a type 82 | static_cast<uintmax_t>(EndOfFile)); | ^~~~~~~~~ contrib/mmap.cc: In member function 'std::optional<long unsigned int> DynamicMMap::WriteString(const char*, size_t)': contrib/mmap.cc:363:15: error: 'SIZE_MAX' was not declared in this scope 363 | if (Len == SIZE_MAX) | ^~~~~~~~ contrib/mmap.cc:363:15: note: 'SIZE_MAX' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? make[1]: *** [Makefile:775: contrib/mmap.lo] Error 1