Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 688730

Summary: dev-libs/flatbuffers-1.10.0 - CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:60 (message): The C compiler "/usr/bin/x86_64-pc-linux-gnu-clang" is not able to compile a simple test program. x86_64-pc-linux-gnu-clang: error: invalid argume
Product: Gentoo Linux Reporter: Michael Martis <martis>
Component: Current packagesAssignee: Gentoo KDE team <kde>
Status: RESOLVED OBSOLETE    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 408963    
Attachments: Output of `emerge dev-libs/flatbuffers`

Description Michael Martis 2019-06-26 06:18:13 UTC
Created attachment 580962 [details]
Output of `emerge dev-libs/flatbuffers`

Configuration of flatbuffers-1.10.0 with Clang fails with the following error:
> error: invalid argument '-std=c++11' not allowed with 'C'
when checking for a working C compiler.

IIUC this is because Clang is stricter than GCC with compile flags; it doesn't allow a C++ standard to be specified when compiling C code.

A fix would be to replace the line
> append-cppflags -std=c++11
with
> append-cxxflags -std=c++11
in src_configure, as CXX flags are passed exactly when C++ code is being compiled.

Attached are the emerge logs for Chromium OS (which uses Clang).
Comment 1 Andreas Sturmlechner gentoo-dev 2019-06-27 11:46:09 UTC
Just use 1.11.0 instead.