Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 925241 - dev-libs/elfutils-0.190: ./stack:1:1: error: expected unqualified-id with libcxx-18 and clang
Summary: dev-libs/elfutils-0.190: ./stack:1:1: error: expected unqualified-id with lib...
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: PullRequest
Depends on:
Blocks: 926505
  Show dependency tree
 
Reported: 2024-02-22 09:52 UTC by Alfred Wingate
Modified: 2024-08-31 01:38 UTC (History)
7 users (show)

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


Attachments
emerge --info (emerge--info.txt,8.29 KB, text/plain)
2024-02-22 09:52 UTC, Alfred Wingate
Details
dev-libs/elfutils-0.190 build.log (xz compressed) (elfutils-0.190:20240221-104304.log.xz,18.05 KB, application/x-xz)
2024-02-22 09:53 UTC, Alfred Wingate
Details
efutils build log and gcc-full.conf env file (efutils-0.192-gcc.tar.gz,38.98 KB, application/gzip)
2024-03-04 01:26 UTC, Gonçalo Negrier Duarte
Details
build log (build.log,751.53 KB, text/x-log)
2024-05-05 05:48 UTC, Amit Ugol
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alfred Wingate 2024-02-22 09:52:32 UTC
Created attachment 885696 [details]
emerge --info

libcxx-18 added stack system header to its imported header leading to this unusual behaviour with clang accepting executables in include paths to happen.
https://github.com/llvm/llvm-project/commit/82d21814e6556480a71c83a2f8da350d0c8cadf6

$ cat test.cxx
#include <iostream>

$ ls
stack # executable
test.cxx

$ clang++ -I. -c -o test.o test.cxx
# failure
$ clang++ -c -o test.o test.cxx
# success
$ g++ -I. -c -o test.o test.cxx
# success

Id argue this is a bug with clang rather than elfutils.
Comment 1 Alfred Wingate 2024-02-22 09:53:02 UTC
Created attachment 885697 [details]
dev-libs/elfutils-0.190 build.log (xz compressed)
Comment 2 Gonçalo Negrier Duarte 2024-03-04 01:23:38 UTC
I can also reproduce this using gcc-full.conf on package.env I gonna include my logs and env file
Comment 3 Gonçalo Negrier Duarte 2024-03-04 01:26:36 UTC
Created attachment 886633 [details]
efutils build log and gcc-full.conf env file
Comment 4 Amit Ugol 2024-05-05 05:48:05 UTC
Created attachment 892277 [details]
build log

Adding build log for dev-libs/elfutils-0.191 using llvm profile and # clang --version = clang version 18.1.4+libcxx
Comment 5 Larry the Git Cow gentoo-dev 2024-06-09 16:25:03 UTC
The bug has been closed via the following commit(s):

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

commit 631d30345702f6c5aa323808f8ebbae1c0fbd5ea
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2024-03-11 08:03:00 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-06-09 16:21:56 +0000

    dev-libs/elfutils: avoid overriding libcxx system header
    
    Closes: https://bugs.gentoo.org/925241
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Closes: https://github.com/gentoo/gentoo/pull/35707
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/elfutils/elfutils-0.191-r1.ebuild         | 123 +++++++++++++++++++++
 ...191-avoid-overriding-libcxx-system-header.patch |  28 +++++
 2 files changed, 151 insertions(+)
Comment 6 Larry the Git Cow gentoo-dev 2024-08-31 01:38:03 UTC
The bug has been referenced in the following commit(s):

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

commit 0998c45f60570c31e5833e333f226056f974202c
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-08-31 01:36:13 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-08-31 01:36:13 +0000

    dev-libs/elfutils: bring back USE=static-libs
    
    I dropped it in 8d06a4aeffc377c8e4edd58e0e7b085ba20b16f6 and while
    it _was_ broken, it was only broken recently by the autoreconf added
    for the libcxx patch, so let's bring it back. I had assumed it was
    been broken for longer.
    
    Bug: https://bugs.gentoo.org/925241
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-libs/elfutils/elfutils-0.191-r2.ebuild | 141 +++++++++++++++++++++++++++++
 dev-libs/elfutils/elfutils-9999.ebuild     |  16 ++--
 2 files changed, 151 insertions(+), 6 deletions(-)