Bug 2165211

Summary: cppcheck-2.12.0 is available
Product: [Fedora] Fedora Reporter: Upstream Release Monitoring <upstream-release-monitoring>
Component: cppcheckAssignee: c72578
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: c72578, gaul, mtasaka, sgrubb, susi.lehtola, tdawson
Target Milestone: ---Keywords: FutureFeature, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cppcheck-2.12.0-2.fc39 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-09-13 17:46:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Update to 2.10 (#2165211)
none
Update to 2.11 (#2165211)
none
Update to 2.12.0 (#2165211) none

Description Upstream Release Monitoring 2023-01-28 13:29:15 UTC
Releases retrieved: 2.10
Upstream release that is considered latest: 2.10
Current version/release in rawhide: 2.9-4.fc38
URL: http://sourceforge.net/projects/cppcheck

Please consult the package updates policy before you issue an update to a stable branch: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/


More information about the service that created this bug can be found at: https://docs.fedoraproject.org/en-US/package-maintainers/Upstream_Release_Monitoring


Please keep in mind that with any upstream change, there may also be packaging changes that need to be made. Specifically, please remember that it is your responsibility to review the new version to ensure that the licensing is still correct and that no non-free or legally problematic items have been added upstream.


Based on the information from Anitya: https://release-monitoring.org/project/357/


To change the monitoring settings for the project, please visit:
https://src.fedoraproject.org/rpms/cppcheck

Comment 1 Upstream Release Monitoring 2023-01-28 13:29:22 UTC
Created attachment 1940877 [details]
Update to 2.10 (#2165211)

Comment 2 Upstream Release Monitoring 2023-01-28 13:34:47 UTC
the-new-hotness/release-monitoring.org's scratch build of cppcheck-2.10-1.fc36.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=96802033

Comment 3 Steve Grubb 2023-02-02 23:13:35 UTC
The build was failing because upstream switched to python 3. Removing the python 3 patch fixes the build.

Comment 4 Steve Grubb 2023-02-02 23:48:07 UTC
In rawhide, the build ultimately fails with a very longwinded error message. (It builds fine on F36 and F37 so this might be related to gcc 13 C++ changes.) Here's the build:

https://kojipkgs.fedoraproject.org//work/tasks/1981/97021981/build.log

And the error message:

In file included from /usr/include/c++/13/ext/alloc_traits.h:34,
                 from /usr/include/c++/13/bits/basic_string.h:39,
                 from /usr/include/c++/13/string:54,
                 from /builddir/build/BUILD/cppcheck-2.10/lib/config.h:84,
                 from /builddir/build/BUILD/cppcheck-2.10/lib/precompiled.h:20,
                 from /builddir/build/BUILD/cppcheck-2.10/redhat-linux-build/lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<TaggedAllocator<ReferenceToken, 3>, ReferenceToken, void>':
/usr/include/c++/13/bits/alloc_traits.h:94:11:   required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = TaggedAllocator<ReferenceToken, 3>; _Up = ReferenceToken]'
/usr/include/c++/13/bits/alloc_traits.h:228:8:   required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = ReferenceToken; _Alloc = TaggedAllocator<ReferenceToken, 3>]'
/usr/include/c++/13/ext/alloc_traits.h:126:65:   required from 'struct __gnu_cxx::__alloc_traits<TaggedAllocator<ReferenceToken, 3>, ReferenceToken>::rebind<ReferenceToken>'
/usr/include/c++/13/bits/stl_vector.h:88:21:   required from 'struct std::_Vector_base<ReferenceToken, TaggedAllocator<ReferenceToken, 3> >'
/usr/include/c++/13/bits/stl_vector.h:423:11:   required from 'class std::vector<ReferenceToken, TaggedAllocator<ReferenceToken, 3> >'
/builddir/build/BUILD/cppcheck-2.10/lib/smallvector.h:47:7:   required from 'class SmallVector<ReferenceToken>'
/builddir/build/BUILD/cppcheck-2.10/lib/astutils.cpp:1158:58:   required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
   70 |                         _Tp>::value,
      |                               ^~~~~
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: 'std::integral_constant<bool, false>::value' evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<TaggedAllocator<const Token*, 9>, const Token*, void>':
/usr/include/c++/13/bits/alloc_traits.h:94:11:   required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = TaggedAllocator<const Token*, 9>; _Up = const Token*]'
/usr/include/c++/13/bits/alloc_traits.h:228:8:   required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = const Token*; _Alloc = TaggedAllocator<const Token*, 9>]'
/usr/include/c++/13/ext/alloc_traits.h:126:65:   required from 'struct __gnu_cxx::__alloc_traits<TaggedAllocator<const Token*, 9>, const Token*>::rebind<const Token*>'
/usr/include/c++/13/bits/stl_vector.h:88:21:   required from 'struct std::_Vector_base<const Token*, TaggedAllocator<const Token*, 9> >'
/usr/include/c++/13/bits/stl_vector.h:423:11:   required from 'class std::vector<const Token*, TaggedAllocator<const Token*, 9> >'
/builddir/build/BUILD/cppcheck-2.10/lib/smallvector.h:47:7:   required from 'class SmallVector<const Token*, 9>'
/usr/include/c++/13/bits/stl_stack.h:140:47:   required from 'class std::stack<const Token*, SmallVector<const Token*, 9> >'
/builddir/build/BUILD/cppcheck-2.10/lib/astutils.h:59:46:   required from 'void visitAstNodes(T*, const TFunc&) [with T = const Token; TFunc = extractForLoopValues(const Token*, int*, bool*, MathLib::bigint*, bool*, MathLib::bigint*, MathLib::bigint*)::<lambda(const Token*)>; <template-parameter-1-3> = void]'
/builddir/build/BUILD/cppcheck-2.10/lib/astutils.cpp:887:18:   required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: 'std::integral_constant<bool, false>::value' evaluates to false

Comment 5 Steve Grubb 2023-02-03 00:03:41 UTC
Commit 2fd9c198 was reverted so cppcheck at least builds.

Comment 6 c72578 2023-03-08 04:56:27 UTC
Status 2023-03-08
Tested with Cppcheck 2.10.2
Scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=98433397

[ 27%] Building CXX object lib/CMakeFiles/cppcheck-core.dir/build/mc_astutils.cpp.o
cd /builddir/build/BUILD/cppcheck-2.10.2/redhat-linux-build/lib && /usr/bin/g++ -DFILESDIR=\"/usr/share/Cppcheck\" -DHAVE_RULES -DTIXML_USE_STL -I/builddir/build/BUILD/cppcheck-2.10.2/redhat-linux-build/lib -I/builddir/build/BUILD/cppcheck-2.10.2/lib -I/builddir/build/BUILD/cppcheck-2.10.2/externals -I/builddir/build/BUILD/cppcheck-2.10.2/externals/picojson -I/builddir/build/BUILD/cppcheck-2.10.2/externals/simplecpp -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64  -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -DNDEBUG -std=gnu++11 -O2 -pedantic -Wall -Wextra -Wcast-qual -Wfloat-equal -Wmissing-declarations -Wmissing-format-attribute -Wno-long-long -Wpacked -Wredundant-decls -Wundef -Wno-missing-field-initializers -Wno-missing-braces -Wno-sign-compare -Wno-multichar -pipe -Woverloaded-virtual -Wno-maybe-uninitialized -Wsuggest-attribute=noreturn -Wno-shadow -Winvalid-pch -include /builddir/build/BUILD/cppcheck-2.10.2/redhat-linux-build/lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx -MD -MT lib/CMakeFiles/cppcheck-core.dir/build/mc_astutils.cpp.o -MF CMakeFiles/cppcheck-core.dir/build/mc_astutils.cpp.o.d -o CMakeFiles/cppcheck-core.dir/build/mc_astutils.cpp.o -c /builddir/build/BUILD/cppcheck-2.10.2/redhat-linux-build/lib/build/mc_astutils.cpp
In file included from /usr/include/c++/13/ext/alloc_traits.h:34,
                 from /usr/include/c++/13/bits/basic_string.h:39,
                 from /usr/include/c++/13/string:54,
                 from /builddir/build/BUILD/cppcheck-2.10.2/lib/config.h:84,
                 from /builddir/build/BUILD/cppcheck-2.10.2/lib/precompiled.h:20,
                 from /builddir/build/BUILD/cppcheck-2.10.2/redhat-linux-build/lib/CMakeFiles/cppcheck-core.dir/cmake_pch.hxx:5,
                 from <command-line>:
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of 'struct std::__allocator_traits_base::__rebind<TaggedAllocator<ReferenceToken, 3>, ReferenceToken, void>':
/usr/include/c++/13/bits/alloc_traits.h:94:11:   required by substitution of 'template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = TaggedAllocator<ReferenceToken, 3>; _Up = ReferenceToken]'
/usr/include/c++/13/bits/alloc_traits.h:228:8:   required by substitution of 'template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = ReferenceToken; _Alloc = TaggedAllocator<ReferenceToken, 3>]'
/usr/include/c++/13/ext/alloc_traits.h:126:65:   required from 'struct __gnu_cxx::__alloc_traits<TaggedAllocator<ReferenceToken, 3>, ReferenceToken>::rebind<ReferenceToken>'
/usr/include/c++/13/bits/stl_vector.h:88:21:   required from 'struct std::_Vector_base<ReferenceToken, TaggedAllocator<ReferenceToken, 3> >'
/usr/include/c++/13/bits/stl_vector.h:423:11:   required from 'class std::vector<ReferenceToken, TaggedAllocator<ReferenceToken, 3> >'
/builddir/build/BUILD/cppcheck-2.10.2/lib/smallvector.h:47:7:   required from 'class SmallVector<ReferenceToken>'
/builddir/build/BUILD/cppcheck-2.10.2/lib/astutils.cpp:1158:58:   required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
   70 |                         _Tp>::value,
      |                               ^~~~~
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: 'std::integral_constant<bool, false>::value' evaluates to false

Comment 7 c72578 2023-04-01 04:50:43 UTC
Info at "Porting to GCC 13" concerning the error:
alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A

https://gcc.gnu.org/gcc-13/porting_to.html#alloc-rebind

Comment 8 Upstream Release Monitoring 2023-06-22 10:54:10 UTC
Releases retrieved: 2.11
Upstream release that is considered latest: 2.11
Current version/release in rawhide: 2.9-4.fc38
URL: http://sourceforge.net/projects/cppcheck

Please consult the package updates policy before you issue an update to a stable branch: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/


More information about the service that created this bug can be found at: https://docs.fedoraproject.org/en-US/package-maintainers/Upstream_Release_Monitoring


Please keep in mind that with any upstream change, there may also be packaging changes that need to be made. Specifically, please remember that it is your responsibility to review the new version to ensure that the licensing is still correct and that no non-free or legally problematic items have been added upstream.


Based on the information from Anitya: https://release-monitoring.org/project/357/


To change the monitoring settings for the project, please visit:
https://src.fedoraproject.org/rpms/cppcheck

Comment 9 Upstream Release Monitoring 2023-06-22 10:54:16 UTC
Created attachment 1972058 [details]
Update to 2.11 (#2165211)

Comment 10 Upstream Release Monitoring 2023-06-22 10:59:43 UTC
the-new-hotness/release-monitoring.org's scratch build of cppcheck-2.11-1.fc38.src.rpm for rawhide failed http://koji.fedoraproject.org/koji/taskinfo?taskID=102448762

Comment 11 Steve Grubb 2023-06-22 21:06:35 UTC
Cppcheck-2.11 was built for rawhide. The problem in 2.10 was fixed. This release is problematic, though. There are lots of compiler warnings and there's 2 style tests that failed (see koji TaskID 102463461 aarch64). The %check target was disabled for now. I presume there will be upstream fixes that can be cherry picked (or a new release).

I'd recommend letting this sit in rawhide a bit before building for F38.

Comment 12 c72578 2023-06-26 18:35:36 UTC
The python3 patch has been removed

diff --git a/cppcheck.spec b/cppcheck.spec
index 2d62a9a..4b14fbc 100644
--- a/cppcheck.spec
+++ b/cppcheck.spec
@@ -56,7 +56,7 @@ from xml files first generated using cppcheck.
 %prep
 %setup -q
 %patch -P0 -p1 -b .translations
-%patch -P1 -p1 -b .python3
+%patch -P1 -p1 -b .versions
 # Make sure bundled tinyxml2 is not used
 rm -r externals/tinyxml2
 # Generate the Qt online-help file

Comment 13 Steve Grubb 2023-06-26 18:57:12 UTC
There are build problems on F38. The act of compiling the test cases causes the build to fail mysteriously (as in no clue why). To get it to build, you have to disable testing completely by removing -DBUILD_TESTS=yes. I'm not sure that is a good idea since we've had to disable running make check for 2 failing tests.

Comment 14 Upstream Release Monitoring 2023-09-10 11:50:41 UTC
Releases retrieved: 2.12.0
Upstream release that is considered latest: 2.12.0
Current version/release in rawhide: 2.11-2.fc39
URL: http://sourceforge.net/projects/cppcheck

Please consult the package updates policy before you issue an update to a stable branch: https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/


More information about the service that created this bug can be found at: https://docs.fedoraproject.org/en-US/package-maintainers/Upstream_Release_Monitoring


Please keep in mind that with any upstream change, there may also be packaging changes that need to be made. Specifically, please remember that it is your responsibility to review the new version to ensure that the licensing is still correct and that no non-free or legally problematic items have been added upstream.


Based on the information from Anitya: https://release-monitoring.org/project/357/


To change the monitoring settings for the project, please visit:
https://src.fedoraproject.org/rpms/cppcheck

Comment 15 Upstream Release Monitoring 2023-09-10 11:50:45 UTC
Created attachment 1987972 [details]
Update to 2.12.0 (#2165211)

Comment 16 Upstream Release Monitoring 2023-09-10 12:11:00 UTC
the-new-hotness/release-monitoring.org's scratch build of cppcheck-2.12.0-1.fc38.src.rpm for rawhide completed http://koji.fedoraproject.org/koji/taskinfo?taskID=105992105

Comment 17 c72578 2023-09-10 17:37:40 UTC
(In reply to Steve Grubb from comment #11)
> Cppcheck-2.11 was built for rawhide. The problem in 2.10 was fixed. This
> release is problematic, though. There are lots of compiler warnings and
> there's 2 style tests that failed (see koji TaskID 102463461 aarch64). The
> %check target was disabled for now. I presume there will be upstream fixes
> that can be cherry picked (or a new release).
> 
> I'd recommend letting this sit in rawhide a bit before building for F38.

Here is a link to the upstream bug tracker concerning the 2 failing style tests under aarch64, ppc64le, s390x, which are still present in Cppcheck 2.12.0:

TestCondition::alwaysTrueContainer fails on some platforms
https://trac.cppcheck.net/ticket/11537

From one of the current build logs (aarch64) [1]:

Testing Complete
Number of tests: 4426
Number of todos: 331
Tests failed: 2
/builddir/build/BUILD/cppcheck-2.12.0/test/testcondition.cpp:4501(TestCondition::alwaysTrue): Assertion failed. 
Expected: 
[test.cpp:6]: (style) Condition 'o[1]=='\0'' is always false\n
Actual: 
[test.cpp:4] -> [test.cpp:6]: (style) Condition 'o[1]=='\0'' is always false\n
_____
/builddir/build/BUILD/cppcheck-2.12.0/test/testcondition.cpp:5014(TestCondition::alwaysTrueContainer): Assertion failed. 
Expected: 
[test.cpp:5]: (style) Condition 'buffer.back()=='\0'' is always false\n
Actual: 
[test.cpp:3] -> [test.cpp:5]: (style) Condition 'buffer.back()=='\0'' is always false\n
_____


[1] https://koji.fedoraproject.org/koji/taskinfo?taskID=105994092

Comment 18 Fedora Update System 2023-09-13 17:39:48 UTC
FEDORA-2023-b215648a28 has been submitted as an update to Fedora 39. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b215648a28

Comment 20 Fedora Update System 2023-09-14 01:47:19 UTC
FEDORA-2023-b215648a28 has been pushed to the Fedora 39 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-b215648a28`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-b215648a28

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 21 Fedora Update System 2023-09-22 00:18:38 UTC
FEDORA-2023-b215648a28 has been pushed to the Fedora 39 stable repository.
If problem still persists, please make note of it in this bug report.