Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919795 - media-libs/libv4l-1.26.0 - [clang] /.../_config: error: builtin feature check macro requires a parenthesized identifier
Summary: media-libs/libv4l-1.26.0 - [clang] /.../_config: error: builtin feature check...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: James Le Cuirot
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-12 20:41 UTC by Toralf Förster
Modified: 2024-02-09 22:23 UTC (History)
4 users (show)

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


Attachments
emerge-info.txt (emerge-info.txt,18.81 KB, text/plain)
2023-12-12 20:41 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,218.21 KB, text/plain)
2023-12-12 20:41 UTC, Toralf Förster
Details
environment (environment,158.01 KB, text/plain)
2023-12-12 20:42 UTC, Toralf Förster
Details
etc.clang.tar.xz (etc.clang.tar.xz,1.14 KB, application/x-xz)
2023-12-12 20:42 UTC, Toralf Förster
Details
etc.portage.tar.xz (etc.portage.tar.xz,28.98 KB, application/x-xz)
2023-12-12 20:42 UTC, Toralf Förster
Details
logs.tar.xz (logs.tar.xz,8.09 KB, application/x-xz)
2023-12-12 20:42 UTC, Toralf Förster
Details
media-libs:libv4l-1.26.0:20231212-203213.log (media-libs:libv4l-1.26.0:20231212-203213.log,124.83 KB, text/plain)
2023-12-12 20:42 UTC, Toralf Förster
Details
qlist-info.txt.xz (qlist-info.txt.xz,52.18 KB, application/x-xz)
2023-12-12 20:42 UTC, Toralf Förster
Details
temp.tar.xz (temp.tar.xz,57.48 KB, application/x-xz)
2023-12-12 20:42 UTC, Toralf Förster
Details
var.tmp.clang.tar.xz (var.tmp.clang.tar.xz,8.69 KB, application/x-xz)
2023-12-12 20:42 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2023-12-12 20:41:57 UTC
too long lines were shrinked:

clang++ -Iutils/v4l2-compliance/v4l2-compliance.p -Iutils/v4l2-compliance -I../v4l-utils-1.26.0/utils/v4l2-compliance -I../v4l-utils-1.26.0/utils/common -I../v4l-utils-1.26.0/lib/include -I../v4l-utils-1.26.0/include -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu++11 
In file included from ../v4l-utils-1.26.0/utils/v4l2-compliance/v4l2-test-time32-64.cpp:20:
In file included from ../v4l-utils-1.26.0/utils/v4l2-compliance/v4l2-compliance.h:24:
In file included from /usr/include/c++/v1/map:574:
In file included from /usr/include/c++/v1/__algorithm/equal.h:13:
In file included from /usr/include/c++/v1/__algorithm/comp.h:12:
/usr/include/c++/v1/__config:1262:27: error: builtin feature check macro requires a parenthesized identifier
 1262 | #  if __has_cpp_attribute(fallthrough)
      |                           ^

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_systemd_clang-20231210-041514

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10
 [2] x86_64-pc-linux-gnu-13 *
clang/llvm (if any):
clang version 17.0.6
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/17/bin
Configuration file: /etc/clang/x86_64-pc-linux-gnu-clang.cfg
/usr/lib/llvm/17
17.0.6+libcxx
Python 3.11.7
Available Rust versions:
  [1]   rust-bin-1.74.1 *
The following VMs are available for generation-2:
1)	Eclipse Temurin JDK 17.0.8.1_p1 [openjdk-bin-17]
*)	Eclipse Temurin JDK 21.0.1_p12 [openjdk-bin-21]
3)	Eclipse Temurin JDK 8.382_p05 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8 
  [2]   openjdk-bin-17 
  [3]   openjdk-bin-21  system-vm

The Glorious Glasgow Haskell Compilation System, version 9.0.2
php cli (if any):
go version go1.21.5 linux/amd64

  HEAD of ::gentoo
commit 289fe42643037d67065cf145125374545c60a15f
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Tue Dec 12 19:33:50 2023 +0000

    2023-12-12 19:33:49 UTC

emerge -qpvO media-libs/libv4l
[ebuild  N    ] media-libs/libv4l-1.26.0  USE="jpeg utils -bpf -doc -dvb -qt5 -tracer" ABI_X86="(64) -32 (-x32)"
Comment 1 Toralf Förster gentoo-dev 2023-12-12 20:41:58 UTC
Created attachment 878978 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2023-12-12 20:41:59 UTC
Created attachment 878979 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2023-12-12 20:42:01 UTC
Created attachment 878980 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2023-12-12 20:42:01 UTC
Created attachment 878981 [details]
etc.clang.tar.xz
Comment 5 Toralf Förster gentoo-dev 2023-12-12 20:42:03 UTC
Created attachment 878982 [details]
etc.portage.tar.xz
Comment 6 Toralf Förster gentoo-dev 2023-12-12 20:42:03 UTC
Created attachment 878983 [details]
logs.tar.xz
Comment 7 Toralf Förster gentoo-dev 2023-12-12 20:42:05 UTC
Created attachment 878984 [details]
media-libs:libv4l-1.26.0:20231212-203213.log
Comment 8 Toralf Förster gentoo-dev 2023-12-12 20:42:06 UTC
Created attachment 878985 [details]
qlist-info.txt.xz
Comment 9 Toralf Förster gentoo-dev 2023-12-12 20:42:07 UTC
Created attachment 878986 [details]
temp.tar.xz
Comment 10 Toralf Förster gentoo-dev 2023-12-12 20:42:08 UTC
Created attachment 878987 [details]
var.tmp.clang.tar.xz
Comment 11 James Le Cuirot gentoo-dev 2023-12-12 23:49:41 UTC
I've just bumped this to 1.26.1, but I couldn't reproduce this with that version or 1.26.0. I did switch to clang/clang++.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-12-13 00:38:52 UTC
(In reply to James Le Cuirot from comment #11)
> I've just bumped this to 1.26.1, but I couldn't reproduce this with that
> version or 1.26.0. I did switch to clang/clang++.

I think this is libcxx specific, so you need CXXFLAGS="... -stdlib=libc++" to hit it.
Comment 13 cyrillic 2023-12-14 17:36:51 UTC
(In reply to Sam James from comment #12)
> I think this is libcxx specific, so you need CXXFLAGS="... -stdlib=libc++"
> to hit it.

I hit this bug too using clang-common[default-libcxx]
No problem compiling with gcc
Comment 14 Andy 2023-12-18 02:00:46 UTC
Only want to reconfirm, it also breaks on arm64, similar setup for clang-common with
default-compiler-rt default-libcxx default-lld llvm-libunwind
Comment 15 James Le Cuirot gentoo-dev 2024-01-01 23:31:36 UTC
Need to work out the exact fix, but so I don't forget. It's because compiler.h, which checks _LIBCPP_VERSION, is included from a .cpp file that doesn't include any C++ headers. It works when you add one.
Comment 16 David Carlos Manuelda 2024-02-07 08:24:46 UTC
Is there any news regarding this? Or can we have a temporary workaround just to make it compile? (it is a bit annoying to be adding --exclude libv4l to updates or binpkgs to new installs).

Thanks.
Comment 17 James Le Cuirot gentoo-dev 2024-02-07 09:16:42 UTC
Sorry, I haven't been able to prioritise this yet.
Comment 18 Larry the Git Cow gentoo-dev 2024-02-09 22:23:36 UTC
The bug has been closed via the following commit(s):

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

commit f9c320c49081d55184f4852be82b56c9e0275f84
Author:     James Le Cuirot <chewi@gentoo.org>
AuthorDate: 2024-02-09 22:23:09 +0000
Commit:     James Le Cuirot <chewi@gentoo.org>
CommitDate: 2024-02-09 22:23:09 +0000

    media-libs/libv4l: Patch to fix building against libc++
    
    This has been submitted upstream.
    
    Closes: https://bugs.gentoo.org/919795
    Signed-off-by: James Le Cuirot <chewi@gentoo.org>

 media-libs/libv4l/files/libv4l-1.26.1-libcxx.patch | 58 ++++++++++++++++++++++
 media-libs/libv4l/libv4l-1.26.1.ebuild             |  1 +
 2 files changed, 59 insertions(+)