Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 800197 - app-office/libreoffice-7.1.4.2 claims clang++ doesn't support C++17 and fails to build
Summary: app-office/libreoffice-7.1.4.2 claims clang++ doesn't support C++17 and fails...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-03 18:27 UTC by Althorion
Modified: 2021-07-04 00:26 UTC (History)
2 users (show)

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


Attachments
config.log (config.log,106.24 KB, text/x-log)
2021-07-03 18:29 UTC, Althorion
Details
full build log (build.log,19.33 KB, text/x-log)
2021-07-03 18:30 UTC, Althorion
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Althorion 2021-07-03 18:27:40 UTC
When I try to build app-office/libreoffice-7.1.4.2 it fails during the configure step with:

checking whether x86_64-pc-linux-gnu-clang++ supports C++17... configure: error: no

$ clang++ --version
clang version 12.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/12/bin

I also have no problems using clang++ as my day-to-day compiler for C++17 stuff.

Reproducible: Always

Steps to Reproduce:
1. Install sys-devel/clang-12.0.0-r1
2. Try to emerge app-office/libreoffice-7.1.4.2 with the [clang] USE-flag
Actual Results:  
Compilation fails at the configure phase

Expected Results:  
Make is capable of noticing that clang++ is, in fact, capable of supporting C++17 and proceeds with compilation
Comment 1 Althorion 2021-07-03 18:29:12 UTC
Created attachment 721294 [details]
config.log
Comment 2 Althorion 2021-07-03 18:30:00 UTC
Created attachment 721297 [details]
full build log
Comment 3 Mike Gilbert gentoo-dev 2021-07-04 00:26:26 UTC
From the build log;

> configure:18961: checking whether x86_64-pc-linux-gnu-clang++ supports C++17
> configure:19023: x86_64-pc-linux-gnu-clang++ -c -march=native -pipe -Wl,-O1 -Wl,--as-needed -O2 -std=c++17 -Werror -DSYSTEM_LIBCMIS -I/usr/include/libcmis-0.5 -I/usr/include/libxml2   conftest.cpp >&5
> clang-12: error: -Wl,-O1: 'linker' input unused [-Werror,-Wunused-command-line-argument]
> clang-12: error: -Wl,--as-needed: 'linker' input unused [-Werror,-Wunused-command-line-argument]

You should remove "-Wl,-O1 -Wl,--as-needed" from your CFLAGS and CXXFLAGS; these options only belong in LDFLAGS.