[Aptitude-devel] Bug#1012895: aptitude: ftbfs with GCC-12

2022-07-25 Thread Paul Wise
On Tue, 2022-07-26 at 00:28 +0200, Axel Beckert wrote:
> Paul Wise wrote:
> > I tried to build aptitude, found it fails due to cwidget bug #1015925.
> 
> Do you intend to NMU that?

I'd prefer the cwidget team take care of it, since I don't have access
to their VCS, but if they don't have time right now, then I can do it.

> > and has debian/patches/
> 
> Correct, this is mostly used for short-term fixes.

Hmm, OK. I would have expected these would go into new upstream point
releases, like 0.8.13.1 or similar.

> > that seems to be unused.
> 
> Not really true. It's just that we haven't made a real "upstream"
> release for quite a while because Manuel is mostly busy with the RISC
> V port.
> ...

I see, thanks for the info.

> As far I understood, it doesn't make sense to upload a new aptitude
> package before #1015925 is fixed.

Agreed.

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part
___
Aptitude-devel mailing list
Aptitude-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/aptitude-devel


[Aptitude-devel] Bug#1012895: aptitude: ftbfs with GCC-12

2022-07-25 Thread Axel Beckert
Hi Paul,

Paul Wise wrote:
> I tried to build aptitude, found it fails due to cwidget bug #1015925.

Do you intend to NMU that?

> The issue is that the operator<< functions are not declared before the
> call site, so forward declarations before HelperMacros.h are needed:

Thanks for having looked into this.

> I'm not sure how to contribute this change to the package because this
> should be a native package but isn't

I'm not that sure about this. But it is probably historically grown.

> and has debian/patches/

Correct, this is mostly used for short-term fixes.

> but also an upstream master branch

Correct. This is where actual development and new "upstream" releases
happen.

> that seems to be unused.

Not really true. It's just that we haven't made a real "upstream"
release for quite a while because Manuel is mostly busy with the RISC
V port.

> I suggest merging the contents of debian/patches/ to the upstream
> master branch

IIRC this is partially already done.

> and then cherry-picking the FTBFS patches to a new minor
> release branch instead of using debian/patches/.

If it needs to be done quick, it will not happen that way.

> I've filed two merge requests with two different approaches, one is a
> commit for the master branch and one a patch for the debian-sid branch.

Thanks. Attaching the patch here would have sufficed, though.

As far I understood, it doesn't make sense to upload a new aptitude
package before #1015925 is fixed.

Regards, Axel
-- 
 ,''`.  |  Axel Beckert , https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-|  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

___
Aptitude-devel mailing list
Aptitude-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/aptitude-devel


[Aptitude-devel] Bug#1012895: aptitude: ftbfs with GCC-12

2022-07-24 Thread Paul Wise
Control: tags -1 + patch

On Thu, 16 Jun 2022 12:07:38 + Matthias Klose wrote:

> The package fails to build in a test rebuild on at least amd64 with
> gcc-12/g++-12, but succeeds to build with gcc-11/g++-11. The
> severity of this report will be raised before the bookworm release.

I tried to build aptitude, found it fails due to cwidget bug #1015925.

I tried to look at this failure, which also happens after fixing that.

I don't know enough C++ but seems that the operator<< function in the
test_parsers.cc file taking std::optional as a parameter is not being
found by GCC 12 even though it should be found.

The g++ output was verbose but the clang++ output was very clear.

The issue is that the operator<< functions are not declared before the
call site, so forward declarations before HelperMacros.h are needed:

   #include 
   
   template
   std::ostream <<(std::ostream , const std::optional o);
   
   template
   std::ostream <<(std::ostream , const std::vector v);
   
   #include 
   
I'm not sure how to contribute this change to the package because this
should be a native package but isn't and has debian/patches/ but also
an upstream master branch that seems to be unused.

I suggest merging the contents of debian/patches/ to the upstream
master branch and then cherry-picking the FTBFS patches to a new minor
release branch instead of using debian/patches/.

I've filed two merge requests with two different approaches, one is a
commit for the master branch and one a patch for the debian-sid branch.

https://salsa.debian.org/apt-team/aptitude/-/merge_requests/14
https://salsa.debian.org/apt-team/aptitude/-/merge_requests/13

-- 
bye,
pabs

https://wiki.debian.org/PaulWise


signature.asc
Description: This is a digitally signed message part
___
Aptitude-devel mailing list
Aptitude-devel@alioth-lists.debian.net
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/aptitude-devel


[Aptitude-devel] Bug#1012895: aptitude: ftbfs with GCC-12

2022-06-16 Thread Matthias Klose
Package: src:aptitude
Version: 0.8.13-4
Severity: normal
Tags: sid bookworm
User: debian-...@lists.debian.org
Usertags: ftbfs-gcc-12

[This bug is targeted to the upcoming bookworm release]

Please keep this issue open in the bug tracker for the package it
was filed for.  If a fix in another package is required, please
file a bug for the other package (or clone), and add a block in this
package. Please keep the issue open until the package can be built in
a follow-up test rebuild.

The package fails to build in a test rebuild on at least amd64 with
gcc-12/g++-12, but succeeds to build with gcc-11/g++-11. The
severity of this report will be raised before the bookworm release.

The full build log can be found at:
http://qa-logs.debian.net/2022/06/09/gcc12/aptitude_0.8.13-4_unstable_gcc12.log
The last lines of the build log are at the end of this report.

To build with GCC 11, either set CC=gcc-11 CXX=g++-11 explicitly,
or install the gcc, g++, gfortran, ... packages from experimental.

  apt-get -t=experimental install g++ 

Common build failures are new warnings resulting in build failures with
-Werror turned on, or new/dropped symbols in Debian symbols files.
For other C/C++ related build failures see the porting guide at
http://gcc.gnu.org/gcc-11/porting_to.html

GCC 11 defaults to the GNU++17 standard.  If your package installs
header files in /usr/include, please don't work around C++17 issues
by choosing a lower C++ standard for the package build, but fix these
issues to build with the C++17 standard.

[...]
/usr/include/cppunit/tools/StringHelper.h:25:9: note:   mismatched types ‘const 
_CharT*’ and ‘std::vector >’
   25 | ost << x;
  | ^~~~
/usr/include/c++/12/bits/ostream.tcc:302:5: note: candidate: ‘template std::basic_ostream<_Ch, _Tr>& 
std::operator<<(basic_ostream<_Ch, _Tr>&, const char*)’
  302 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
  | ^~~~
/usr/include/c++/12/bits/ostream.tcc:302:5: note:   template argument 
deduction/substitution failed:
/usr/include/cppunit/tools/StringHelper.h:25:9: note:   cannot convert ‘x’ 
(type ‘const std::vector >’) to type ‘const char*’
   25 | ost << x;
  | ^~~~
/usr/include/c++/12/ostream:615:5: note: candidate: ‘template 
std::basic_ostream& std::operator<<(basic_ostream&, const char*)’
  615 | operator<<(basic_ostream& __out, const char* __s)
  | ^~~~
/usr/include/c++/12/ostream:615:5: note:   template argument 
deduction/substitution failed:
/usr/include/cppunit/tools/StringHelper.h:25:9: note:   cannot convert ‘x’ 
(type ‘const std::vector >’) to type ‘const char*’
   25 | ost << x;
  | ^~~~
/usr/include/c++/12/ostream:628:5: note: candidate: ‘template 
std::basic_ostream& std::operator<<(basic_ostream&, const signed char*)’
  628 | operator<<(basic_ostream& __out, const signed char* 
__s)
  | ^~~~
/usr/include/c++/12/ostream:628:5: note:   template argument 
deduction/substitution failed:
/usr/include/cppunit/tools/StringHelper.h:25:9: note:   cannot convert ‘x’ 
(type ‘const std::vector >’) to type ‘const signed 
char*’
   25 | ost << x;
  | ^~~~
/usr/include/c++/12/ostream:633:5: note: candidate: ‘template 
std::basic_ostream& std::operator<<(basic_ostream&, const unsigned char*)’
  633 | operator<<(basic_ostream& __out, const unsigned 
char* __s)
  | ^~~~
/usr/include/c++/12/ostream:633:5: note:   template argument 
deduction/substitution failed:
/usr/include/cppunit/tools/StringHelper.h:25:9: note:   cannot convert ‘x’ 
(type ‘const std::vector >’) to type ‘const unsigned 
char*’
   25 | ost << x;
  | ^~~~
/usr/include/c++/12/ostream:754:5: note: candidate: ‘template _Ostream&& std::operator<<(_Ostream&&, const _Tp&)’
  754 | operator<<(_Ostream&& __os, const _Tp& __x)
  | ^~~~
/usr/include/c++/12/ostream:754:5: note:   template argument 
deduction/substitution failed:
/usr/include/c++/12/ostream: In substitution of ‘template _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = 
std::__cxx11::basic_ostringstream&; _Tp = std::vector >]’:
/usr/include/cppunit/tools/StringHelper.h:25:9:   required from ‘typename 
std::enable_if<(! std::is_enum<_Tp>::value), std::__cxx11::basic_string 
>::type CppUnit::StringHelper::toString(const T&) [with T = std::vector >; typename std::enable_if<(! std::is_enum<_Tp>::value), 
std::__cxx11::basic_string >::type = std::__cxx11::basic_string]’
/usr/include/cppunit/TestAssert.h:74:50:   required from ‘static std::string 
CppUnit::assertion_traits::toString(const T&) [with T = std::vector >; std::string = std::__cxx11::basic_string]’
/usr/include/cppunit/TestAssert.h:168:58:   required from ‘void 
CppUnit::assertEquals(const T&, const T&, SourceLine, const std::string&) [with 
T = std::vector >; std::string = 
std::__cxx11::basic_string]’
../../tests/test_parsers.cc:140:3:   required from ‘void verify_success(const