Bug 1181874

Summary: GCC 11: libzypp package fails
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Liška <martin.liska>
Component: libzyppAssignee: E-mail List <zypp-maintainers>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 1181859    

Description Martin Liška 2021-02-06 11:15:23 UTC
Fails here:
https://build.opensuse.org/build/openSUSE:Factory:Staging:Gcc7/standard/x86_64/libzypp/_log

with:
[   72s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/parser/IniDict.h:120: warning: argument 'key' of command @param is not found in the argument list of zypp::parser::IniDict::deleteSection(const std::string &section)
[   72s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/parser/IniDict.h:120: warning: argument 'value' of command @param is not found in the argument list of zypp::parser::IniDict::deleteSection(const std::string &section)
[   72s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/base/Exception.h:291: warning: Found unknown command '\overrload'
[   73s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/url/UrlBase.cc:171:12: error: 'optional' in namespace 'std' does not name a template type
[   73s]   171 |       std::optional<std::string> _safeQuerytsr; ///<.
[   73s]       |            ^~~~~~~~
[   73s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/url/UrlBase.cc:26:1: note: 'std::optional' is defined in header '<optional>'; did you forget to '#include <optional>'?
[   73s]    25 | #include <iostream>
[   73s]   +++ |+#include <optional>
[   73s]    26 | 
[   73s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/parser/RepoFileReader.h:61: warning: unable to resolve reference to 'AbortRequestException' for \ref command
[   73s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/parser/RepoindexFileReader.h:81: warning: Found unknown command '@ttl'
[   73s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/url/UrlBase.cc: In member function 'const string& zypp::url::SafeQuerystr::safeStr() const':
[   73s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.6/zypp/url/UrlBase.cc:146:16: error: '_safeQuerytsr' was not declared in this scope; did you mean 'SafeQuerystr'?
[   73s]   146 |       { return _safeQuerytsr ? _safeQuerytsr.value() : _fullQuerytsr; }
[   73s]       |                ^~~~~~~~~~~~~
[   73s]       |                SafeQuerystr
Comment 1 Martin Liška 2021-02-26 13:58:50 UTC
May I please ping this?
Comment 2 Martin Liška 2021-03-26 09:57:49 UTC
May I please ping this as GCC 11 release is approaching?
Comment 4 Michael Andres 2021-04-07 07:16:06 UTC
@Martin, this was fixed 2021-02-11 for libzypp 17.25.7
Comment 5 Martin Liška 2021-04-15 11:15:06 UTC
Unfortunately, there are more issues that needs to be addressed:

[  266s] cd /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/build/tests/zypp && /usr/bin/cmake -E cmake_link_script CMakeFiles/UserData_test.dir/link.txt --verbose=1
[  266s] /usr/bin/c++ -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -fno-strict-aliasing -fPIC -g -Wall -Wp,-D_GLIBCXX_ASSERTIONS -fvisibility-inlines-hidden -Woverloaded-virtual -Wnon-virtual-dtor -Werror=format-security -rdynamic -Wl,-as-needed -DOPENSSL_LOAD_CONF -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -fno-strict-aliasing -fPIC -g -Wall -Wp,-D_GLIBCXX_ASSERTIONS -fvisibility-inlines-hidden -Woverloaded-virtual -Wnon-virtual-dtor -O3 -DZYPP_NDEBUG -rdynamic CMakeFiles/UserData_test.dir/UserData_test.cc.o -o UserData_test  /usr/lib64/libboost_unit_test_framework.so.1.75.0 ../lib/libzypp_test_utils.a ../../zypp/libzypp-allsym.so.1722.3.8 -lutil -lrpm -lcurl -lxml2 -lz -Wl,-Bstatic -lsolv -lsolvext -lsolv -lsolvext -Wl,-Bdynamic -lssl -lcrypto /usr/lib64/libboost_thread.so.1.75.0 -lpthread -lgpgme -lassuan -lgpg-error -lsigc-2.0 -lglib-2.0 /usr/lib64/libyaml-cpp.so.0.6.3 -lzstd -lzck -ludev -lproxy -lfcgi -lfcgi++ -lpthread 
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:18:58: error: 'optional' in namespace 'std' does not name a template type
[  266s]    18 |   std::ostream & outsopt( std::ostream & str, const std::optional<T> & v )
[  266s]       |                                                          ^~~~~~~~
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:5:1: note: 'std::optional' is defined in header '<optional>'; did you forget to '#include <optional>'?
[  266s]     4 | #include <zypp/base/StringV.h>
[  266s]   +++ |+#include <optional>
[  266s]     5 | 
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:18:66: error: expected ',' or '...' before '<' token
[  266s]    18 |   std::ostream & outsopt( std::ostream & str, const std::optional<T> & v )
[  266s]       |                                                                  ^
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc: In function 'std::ostream& tools::outsopt(std::ostream&, int)':
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:21:10: error: 'v' was not declared in this scope
[  266s]    21 |     if ( v.has_value() )
[  266s]       |          ^
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc: At global scope:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:30:14: error: 'std::optional' has not been declared
[  266s]    30 |              std::optional<std::string_view> w = std::optional<std::string_view>(),
[  266s]       |              ^~~
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:30:27: error: expected ',' or '...' before '<' token
[  266s]    30 |              std::optional<std::string_view> w = std::optional<std::string_view>(),
[  266s]       |                           ^
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc: In function 'void tools::outs(std::ostream&, int)':
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:33:17: error: 'w' was not declared in this scope
[  266s]    33 |   { outsopt(str,w); outsopt(str,i); outsopt(str,f) << endl; }
[  266s]       |                 ^
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:33:33: error: 'i' was not declared in this scope
[  266s]    33 |   { outsopt(str,w); outsopt(str,i); outsopt(str,f) << endl; }
[  266s]       |                                 ^
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:33:49: error: 'f' was not declared in this scope
[  266s]    33 |   { outsopt(str,w); outsopt(str,i); outsopt(str,f) << endl; }
[  266s]       |                                                 ^
[  266s] In file included from /usr/include/boost/test/test_tools.hpp:45,
[  266s]                  from /usr/include/boost/test/unit_test.hpp:18,
[  266s]                  from /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:1:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc: In lambda function:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:48:113: error: cannot convert 'std::string_view' {aka 'std::basic_string_view<char>'} to 'int'
[  266s]    48 |   BOOST_CHECK_EQUAL( 2, splitRx( l, r, [&str](std::string_view w, unsigned i, bool f) -> bool { tools::outs(str,w,i,f); return tools::False(); } ) );
[  266s]       |                                                                                                                 ^
[  266s]       |                                                                                                                 |
[  266s]       |                                                                                                                 std::string_view {aka std::basic_string_view<char>}
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:30:14: note:   initializing argument 2 of 'void tools::outs(std::ostream&, int)'
[  266s]    30 |              std::optional<std::string_view> w = std::optional<std::string_view>(),
[  266s]       |              ^~~~~~~~~~~~~
[  266s] In file included from /usr/include/boost/test/test_tools.hpp:45,
[  266s]                  from /usr/include/boost/test/unit_test.hpp:18,
[  266s]                  from /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:1:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc: In lambda function:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:49:105: error: cannot convert 'std::string_view' {aka 'std::basic_string_view<char>'} to 'int'
[  266s]    49 |   BOOST_CHECK_EQUAL( 2, splitRx( l, r, [&str](std::string_view w, unsigned i) -> bool { tools::outs(str,w,i); return tools::False(); } ) );
[  266s]       |                                                                                                         ^
[  266s]       |                                                                                                         |
[  266s]       |                                                                                                         std::string_view {aka std::basic_string_view<char>}
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:30:14: note:   initializing argument 2 of 'void tools::outs(std::ostream&, int)'
[  266s]    30 |              std::optional<std::string_view> w = std::optional<std::string_view>(),
[  266s]       |              ^~~~~~~~~~~~~
[  266s] In file included from /usr/include/boost/test/test_tools.hpp:45,
[  266s]                  from /usr/include/boost/test/unit_test.hpp:18,
[  266s]                  from /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:1:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc: In lambda function:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:50:93: error: cannot convert 'std::string_view' {aka 'std::basic_string_view<char>'} to 'int'
[  266s]    50 |   BOOST_CHECK_EQUAL( 2, splitRx( l, r, [&str](std::string_view w) -> bool { tools::outs(str,w); return tools::False(); } ) );
[  266s]       |                                                                                             ^
[  266s]       |                                                                                             |
[  266s]       |                                                                                             std::string_view {aka std::basic_string_view<char>}
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:30:14: note:   initializing argument 2 of 'void tools::outs(std::ostream&, int)'
[  266s]    30 |              std::optional<std::string_view> w = std::optional<std::string_view>(),
[  266s]       |              ^~~~~~~~~~~~~
[  266s] In file included from /usr/include/boost/test/test_tools.hpp:45,
[  266s]                  from /usr/include/boost/test/unit_test.hpp:18,
[  266s]                  from /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:1:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc: In lambda function:
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:51:70: error: too few arguments to function 'void tools::outs(std::ostream&, int)'
[  266s]    51 |   BOOST_CHECK_EQUAL( 2, splitRx( l, r, [&str]() -> bool { tools::outs(str); return tools::False(); } ) );
[  266s]       |                                                           ~~~~~~~~~~~^~~~~
[  266s] /home/abuild/rpmbuild/BUILD/libzypp-17.25.8/tests/zypp/StringV_test.cc:29:8: note: declared here
[  266s]    29 |   void outs( std::ostream & str,
[  266s]       |        ^~~~


Can you please take a look?
Comment 6 Michael Andres 2021-04-19 08:19:56 UTC
Fixed in libzpp-17.25.9
Comment 7 Martin Liška 2021-04-22 13:50:00 UTC
(In reply to Michael Andres from comment #6)
> Fixed in libzpp-17.25.9

Can you please make a submit request for zypp:Head/libzypp to openSUSE:Factory?
Comment 8 Michael Andres 2021-04-22 14:13:40 UTC
created request id 887809
SR: zypp:Head - libzypp -> openSUSE:Factory
Comment 10 Swamp Workflow Management 2021-05-07 19:18:46 UTC
SUSE-RU-2021:1544-1: An update that has 6 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1180851,1181874,1182936,1183628,1184997,1185239
CVE References: 
JIRA References: 
Sources used:
SUSE MicroOS 5.0 (src):    libsolv-0.7.19-3.23.1, libzypp-17.25.10-3.36.1
SUSE Linux Enterprise Module for Development Tools 15-SP2 (src):    libsolv-0.7.19-3.23.1
SUSE Linux Enterprise Module for Basesystem 15-SP2 (src):    libsolv-0.7.19-3.23.1, libzypp-17.25.10-3.36.1
SUSE Linux Enterprise Installer 15-SP2 (src):    libsolv-0.7.19-3.23.1, libzypp-17.25.10-3.36.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 11 Swamp Workflow Management 2021-05-11 01:16:11 UTC
openSUSE-RU-2021:0709-1: An update that has 6 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1180851,1181874,1182936,1183628,1184997,1185239
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    libsolv-0.7.19-lp152.2.22.1, libzypp-17.25.10-lp152.2.28.1
Comment 12 Swamp Workflow Management 2021-05-13 19:19:12 UTC
SUSE-RU-2021:1602-1: An update that has 6 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1180851,1181874,1182936,1183628,1184997,1185239
CVE References: 
JIRA References: 
Sources used:
SUSE Manager Server 4.0 (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Manager Retail Branch Server 4.0 (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Manager Proxy 4.0 (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Linux Enterprise Server for SAP 15-SP1 (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Linux Enterprise Server 15-SP1-LTSS (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Linux Enterprise Server 15-SP1-BCL (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Linux Enterprise Installer 15-SP1 (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Linux Enterprise High Performance Computing 15-SP1-LTSS (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Linux Enterprise High Performance Computing 15-SP1-ESPOS (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE Enterprise Storage 6 (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1
SUSE CaaS Platform 4.0 (src):    libsolv-0.7.19-3.37.1, libzypp-17.25.10-3.51.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 13 Swamp Workflow Management 2021-05-25 16:28:51 UTC
SUSE-RU-2021:1757-1: An update that has 6 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1180851,1181874,1182936,1183628,1184997,1185239
CVE References: 
JIRA References: 
Sources used:
SUSE Linux Enterprise Server for SAP 15 (src):    libsolv-0.7.19-3.45.1, libzypp-17.25.10-3.69.1
SUSE Linux Enterprise Server 15-LTSS (src):    libsolv-0.7.19-3.45.1, libzypp-17.25.10-3.69.1
SUSE Linux Enterprise Installer 15 (src):    libsolv-0.7.19-3.45.1, libzypp-17.25.10-3.69.1
SUSE Linux Enterprise High Performance Computing 15-LTSS (src):    libsolv-0.7.19-3.45.1, libzypp-17.25.10-3.69.1
SUSE Linux Enterprise High Performance Computing 15-ESPOS (src):    libsolv-0.7.19-3.45.1, libzypp-17.25.10-3.69.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 14 Swamp Workflow Management 2021-06-02 19:24:57 UTC
SUSE-RU-2021:1833-1: An update that has 10 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1153687,1180851,1181874,1182372,1182936,1183268,1183589,1183628,1184997,1185239
CVE References: 
JIRA References: 
Sources used:
SUSE MicroOS 5.0 (src):    libzypp-17.25.10-6.1, zypper-1.14.44-7.1
SUSE Linux Enterprise Module for Basesystem 15-SP3 (src):    libzypp-17.25.10-6.1, zypper-1.14.44-7.1
SUSE Linux Enterprise Module for Basesystem 15-SP2 (src):    libzypp-17.25.10-6.1, zypper-1.14.44-7.1
SUSE Linux Enterprise Installer 15-SP2 (src):    libzypp-17.25.10-6.1

NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
Comment 15 Swamp Workflow Management 2021-06-05 22:17:52 UTC
openSUSE-RU-2021:0842-1: An update that has 10 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1153687,1180851,1181874,1182372,1182936,1183268,1183589,1183628,1184997,1185239
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.2 (src):    libzypp-17.25.10-lp152.2.31.1, zypper-1.14.44-lp152.2.21.1
Comment 16 Swamp Workflow Management 2021-07-10 23:06:04 UTC
openSUSE-RU-2021:1833-1: An update that has 10 recommended fixes can now be installed.

Category: recommended (moderate)
Bug References: 1153687,1180851,1181874,1182372,1182936,1183268,1183589,1183628,1184997,1185239
CVE References: 
JIRA References: 
Sources used:
openSUSE Leap 15.3 (src):    libzypp-17.25.10-6.1, zypper-1.14.44-7.1