Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 739036 - dev-util/source-highlight-3.1.9 fails tests
Summary: dev-util/source-highlight-3.1.9 fails tests
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-08-26 05:16 UTC by Agostino Sarubbo
Modified: 2020-08-27 07:00 UTC (History)
0 users

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


Attachments
build.log (build.log,122.40 KB, text/plain)
2020-08-26 05:16 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 2020-08-26 05:16:20 UTC
https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/

Issue: dev-util/source-highlight-3.1.9 fails tests.
Discovered on: amd64 (internal ref: tinderbox)

NOTE:
This machine uses a clang/LLVM toolchain.
If you think that this issue is strictly related to clang/LLVM please block bug 408963. If you think that this issue is strictly related to the LLD linker, please block bug 731004.
This machine uses also GLIBC-2.32. If you think that this issue is strictly related to GLIBC please block bug 736174.
Comment 1 Agostino Sarubbo gentoo-dev 2020-08-26 05:16:23 UTC
Created attachment 656778 [details]
build.log

build log and emerge --info
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-26 07:25:35 UTC
"""
In file included from test_exception_main.cpp:17:
./stdboosterror.h:7:72: error: parameter declarator cannot be qualified
        std_boost_exception(boost::regex_error(boost::regex_constants::error_bad...
                                               ~~~~~~~~~~~~~~~~~~~~~~~~^
./stdboosterror.h:14:31: error: member reference base type 'boost::regex_error
      (boost::regex_error)' is not a structure or union
    return std_boost_exception.what();
           ~~~~~~~~~~~~~~~~~~~^~~~~
2 errors generated.
"""

Fails here on clang as well.
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-26 07:37:13 UTC
Looks like 

"""
static boost::regex_error
        std_boost_exception(boost::regex_error(boost::regex_constants::error_bad_pattern));
"""

ambiguous parsing is resolved differently by gcc and clang. gcc resolves it as declaration of 'std_boost_exception' variable while clang tries to parse it as complex 'std_boost_exception()' function declaration.
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2020-08-26 18:19:39 UTC
Ended up being a gcc bug to accept invalid code: https://gcc.gnu.org/PR86564

Clang's bug report in case it's more complicated than that: https://bugs.llvm.org/show_bug.cgi?id=47316

dev-util/source-highlight will need a fix.
Comment 5 Larry the Git Cow gentoo-dev 2020-08-27 07:00:07 UTC
The bug has been closed via the following commit(s):

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

commit 6c936b92ef0757dbd6d46123124f4f898babadc8
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-08-27 06:59:46 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-08-27 07:00:03 +0000

    dev-util/source-highlight: fix tests on clang
    
    Reported-by: Agostino Sarubbo
    Closes: https://bugs.gentoo.org/739036
    Package-Manager: Portage-3.0.4, Repoman-3.0.1
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../source-highlight-3.1.9-test-clang-p1.patch     | 30 +++++++++++++++++
 .../source-highlight-3.1.9-test-clang-p2.patch     | 39 ++++++++++++++++++++++
 .../source-highlight/source-highlight-3.1.9.ebuild |  5 +++
 3 files changed, 74 insertions(+)