Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 812077 - dev-cpp/doctest-2.4.6 fails to compile (stringification.cpp:106:26: error: variable ‘bla2’ set but not > used [-Werror=unused-but-set-variable])
Summary: dev-cpp/doctest-2.4.6 fails to compile (stringification.cpp:106:26: error: va...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Petr Vaněk
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: gcc-11
  Show dependency tree
 
Reported: 2021-09-08 06:42 UTC by Agostino Sarubbo
Modified: 2021-09-18 03:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,129.66 KB, text/plain)
2021-09-08 06:42 UTC, Agostino Sarubbo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Agostino Sarubbo gentoo-dev 2021-09-08 06:42:28 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-cpp/doctest-2.4.6 fails to compile.
Discovered on: amd64 (internal ref: ci)

NOTE:
This machine uses GCC-11: https://gcc.gnu.org/gcc-11/porting_to.html
If you think this is a GCC-11 related issue, please block bug 732706.
Comment 1 Agostino Sarubbo gentoo-dev 2021-09-08 06:42:31 UTC
Created attachment 738112 [details]
build.log

build log and emerge --info
Comment 2 Agostino Sarubbo gentoo-dev 2021-09-08 06:42:32 UTC
Possible context of error(s):

-- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR MPI_CXX_WORKS) 
-- Could NOT find MPI (missing: MPI_CXX_FOUND CXX) 
/var/tmp/portage/dev-cpp/doctest-2.4.6/work/doctest-2.4.6/examples/all_features/stringification.cpp:106:26: error: variable ‘bla2’ set but not used [-Werror=unused-but-set-variable]
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-08 06:45:09 UTC
(In reply to Agostino Sarubbo from comment #2)
> Possible context of error(s):
> 
> -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR
> MPI_CXX_WORKS) 
> -- Could NOT find MPI (missing: MPI_CXX_FOUND CXX) 

I wonder why this is appearing all of a sudden.

> /var/tmp/portage/dev-cpp/doctest-2.4.6/work/doctest-2.4.6/examples/
> all_features/stringification.cpp:106:26: error: variable ‘bla2’ set but not
> used [-Werror=unused-but-set-variable]
Comment 4 Petr Vaněk gentoo-dev 2021-09-09 12:49:54 UTC
This bug affects test phase only, where the issue is in one example (all tests and examples are built only if use-flag test is set). The issue is related with gcc-11, it is already know in upstream with proposed fixes [1,2]. I think we can use one of those patches to fix this.

[1] https://github.com/onqtam/doctest/pull/505
[2] https://github.com/onqtam/doctest/pull/520

(In reply to Sam James from comment #3)
> (In reply to Agostino Sarubbo from comment #2)
> > Possible context of error(s):
> > 
> > -- Could NOT find MPI_CXX (missing: MPI_CXX_LIB_NAMES MPI_CXX_HEADER_DIR
> > MPI_CXX_WORKS) 
> > -- Could NOT find MPI (missing: MPI_CXX_FOUND CXX) 
> 
> I wonder why this is appearing all of a sudden.

The mpi example is built conditionally only if MPI is found. There is no dependency set in the ebuild, therefore, it depends only if mpi is already installed in the system or not. Again, this is checked and compiled only if test use-flag is set but it does not affect installation.
Comment 5 Larry the Git Cow gentoo-dev 2021-09-18 03:04:57 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c32b8a80a2f30e79dba6d53ec4da64285139a972

commit c32b8a80a2f30e79dba6d53ec4da64285139a972
Author:     Petr Vaněk <arkamar@atlas.cz>
AuthorDate: 2021-09-13 07:17:51 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2021-09-18 03:04:47 +0000

    dev-cpp/doctest: fix gcc-11 related compilation error
    
    Apply patch in order to fix gcc-11 related compilation error. The patch
    follows proposed fixes to upstream [1,2].
    
    [1] https://github.com/onqtam/doctest/pull/505
    [2] https://github.com/onqtam/doctest/pull/520
    
    Closes: https://bugs.gentoo.org/812077
    Signed-off-by: Petr Vaněk <arkamar@atlas.cz>
    Closes: https://github.com/gentoo/gentoo/pull/22280
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-cpp/doctest/doctest-2.4.6.ebuild               |  2 ++
 .../files/doctest-2.4.6-remove-unused-bla2.patch   | 23 ++++++++++++++++++++++
 2 files changed, 25 insertions(+)