Bug 111458 - g++: error: unrecognized command line option ‘-std=c++14’
Summary: g++: error: unrecognized command line option ‘-std=c++14’
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: 19.2
Hardware: x86-64 (AMD64) All
: not set not set
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2019-08-21 18:22 UTC by Vinson Lee
Modified: 2019-09-18 20:19 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2019-08-21 18:22:22 UTC
Build error with GCC 4.8 and older LLVM.

  Compiling src/gallium/auxiliary/gallivm/lp_bld_debug.cpp ...
g++: error: unrecognized command line option ‘-std=c++14’


commit 1abe87383e1529a14498d70a0cf445728b9c338d
Author: Kai Wasserbäch <kai@dev.carbon-project.org>
Date:   Sat Aug 17 10:59:43 2019 +0200

    build: Bump C++ standard requirement to C++14 to fix FTBFS with LLVM 10
    
    When building Mesa against a recent LLVM 10 with C++11, the build fails
    if the AMD common code is built as well due to "std::index_sequence"
    being undeclared.
    
    LLVM requires a minimum of C++14.
    
    Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
    Acked-by: Eric Engestrom <eric@engestrom.ch>
Comment 1 Kai 2019-08-21 19:24:35 UTC
This is known and was discussed in the MR for this change, see the thread starting at https://gitlab.freedesktop.org/mesa/mesa/merge_requests/1706#note_210239

GCC 4.8 is no longer supported upstream (last release was in 2015), just as GCC 5 and GCC 6 are no longer supported upstream. Therefore I would be inclined to close this bug as "wontfix", though I guess this is not up to me. I'll leave this decision up to somebody like Dave, who merged my MR, and has more seniority within Mesa.

Personally I will not prepare any patch to fix this since GCC 4.8 is no longer supported upstream and you would have to run at least an Distribution like Debian oldoldstable (Jessie), which is on its last stretch of LTS. IMHO the burden to keep such ancient software working has to fall on people choosing to run unsupported versions of eg. GCC. Because reverting this change would mean that the users of a current toolchain would be required to carry local patches instead, which doesn't seem like a sensible solution to me.

I hope this doesn't come across too strongly. You have commit rights AFAIR, therefore you could always supersede me and revert my patch. Though I'd really like to know how building with a current toolchain is meant to happen then. AFAIK Mesa is meant to be built against LLVM 10 as there are special cases for LLVM 10 in the code for RadeonSI and Clover.
Comment 2 GitLab Migration User 2019-09-18 20:19:40 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/948.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.