Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 933120 - kde-plasma/kwin-6.0.90.1[systemd] w/ llvm(?)/libcxx(?): src/watchdog.cpp:47:141: error: use of undeclared identifier 'geteuid' on clang
Summary: kde-plasma/kwin-6.0.90.1[systemd] w/ llvm(?)/libcxx(?): src/watchdog.cpp:47:1...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard: fixed in git master, cherry-pick to P...
Keywords: PATCH, UPSTREAM
: 933131 (view as bug list)
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2024-05-29 13:58 UTC by Gonçalo Negrier Duarte
Modified: 2024-06-13 00:46 UTC (History)
4 users (show)

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


Attachments
kwin-6.9.90.1-build.log.gz (kwin-6.0.90.1.log.gz,80.82 KB, application/gzip)
2024-05-29 13:59 UTC, Gonçalo Negrier Duarte
Details
emerge_info.txt (emerge_info.txt,22.56 KB, text/plain)
2024-05-29 14:00 UTC, Gonçalo Negrier Duarte
Details
includes.patch (includes.patch,312 bytes, patch)
2024-06-01 00:40 UTC, Sam James
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gonçalo Negrier Duarte 2024-05-29 13:58:50 UTC
Compiling kde-plasma/kwin-6.0.90.1 in the llvm profile giving the follow error bellow:
```
FAILED: src/CMakeFiles/kwin_wayland.dir/watchdog.cpp.o
(truncated)
error: use of undeclared identifier 'geteuid'
   47 |             qCInfo(KWIN_WATCHDOG) << "Watchdog: enabled. Interval:" << watchdogIntervalInUs << t->interval() << qgetenv("NOTIFY_SOCKET") << geteuid();
      |                                                                                                                                             ^
1 error generated.
```

Kwin was compiled with the follow useflags: caps handbook lock screencast shortcuts systemd

I gonna compile with gcc to check if changes anything.
Comment 1 Gonçalo Negrier Duarte 2024-05-29 13:59:46 UTC
Created attachment 894607 [details]
kwin-6.9.90.1-build.log.gz
Comment 2 Gonçalo Negrier Duarte 2024-05-29 14:00:17 UTC
Created attachment 894608 [details]
emerge_info.txt
Comment 3 Gonçalo Negrier Duarte 2024-05-29 14:08:05 UTC
Compiling with gcc it did worse (I was expecting that).
I notice that systemd flag was added, gonna try compile kwin without to see if the problem is there.

I think is better to add this bug as block to BUG 926828
Comment 4 Gonçalo Negrier Duarte 2024-05-29 14:22:47 UTC
Ok, disabling systemd useflag on kwin results in a successful compiled, but very strange the build switch is failing.
Comment 5 unhappy-ending 2024-05-29 17:56:29 UTC
Can confirm. Also ended up figuring the systemd USE flag was turning on the new watchdog option, so I turned it off and kwin built fine.
Comment 6 Gonçalo Negrier Duarte 2024-05-29 18:28:42 UTC
(In reply to unhappy-ending from comment #5)
> Can confirm. Also ended up figuring the systemd USE flag was turning on the
> new watchdog option, so I turned it off and kwin built fine.

I didn’t analyze the issue further because plasma-workspace is broke after the update and now I rebuild all plasma-meta dependencies, maybe some missing dependencie.
Comment 7 Andreas Sturmlechner gentoo-dev 2024-05-30 09:53:27 UTC
Is everyone currently CCed using systemwide-libcxx?
Comment 8 Gonçalo Negrier Duarte 2024-05-30 10:28:27 UTC
(In reply to Andreas Sturmlechner from comment #7)
> Is everyone currently CCed using systemwide-libcxx?

At least me and unhappy-ending are
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-01 00:40:53 UTC
Created attachment 894761 [details, diff]
includes.patch

https://invent.kde.org/plasma/kwin/-/commit/05a3e2bad9a3baf27293f0b5ed4bef4f38952804

This adds use of geteuid without the needed headers. Please try the attached untested patch.
Comment 10 unhappy-ending 2024-06-01 08:30:40 UTC
Patch is all good!
Comment 11 Gonçalo Negrier Duarte 2024-06-01 23:15:10 UTC
*** Bug 933131 has been marked as a duplicate of this bug. ***
Comment 12 Gonçalo Negrier Duarte 2024-06-01 23:21:35 UTC
Can confirm this patch work and solves BUG 933131
See also: https://bugs.gentoo.org/933131#c7
Comment 13 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-01 23:24:39 UTC
The libcxx type thing is separate and I think upstream KDE have done all they can there really. We just need to figure out something on the Gentoo side which we're already discussing in another bug, right?

Anyway, thanks for testing, I'll submit it.
Comment 14 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-01 23:29:15 UTC
(C++ doesn't have implicit function declarations so I would be very surprised if includes for C functions like this could make any runtime difference.)
Comment 15 Gonçalo Negrier Duarte 2024-06-01 23:40:49 UTC
(In reply to Sam James from comment #14)
> (C++ doesn't have implicit function declarations so I would be very
> surprised if includes for C functions like this could make any runtime
> difference.)

Sam this will be a bit off topic but what are the problems of using `MYCMAKEARGS="-DLIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION=2"`?

For now to solve the right click BUG 923292 on plasma cause by qtwayland, I recompile both with the `MYCMAKEARGS` and then recompile libcxx without the `MYCMAKEARGS` to not interfere with other packages.
Comment 16 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-06-01 23:41:42 UTC
(In reply to Gonçalo Negrier Duarte from comment #15)
> (In reply to Sam James from comment #14)
> > (C++ doesn't have implicit function declarations so I would be very
> > surprised if includes for C functions like this could make any runtime
> > difference.)
> 
> Sam this will be a bit off topic but what are the problems of using
> `MYCMAKEARGS="-DLIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION=2"`?
> 
> For now to solve the right click BUG 923292 on plasma cause by qtwayland, I
> recompile both with the `MYCMAKEARGS` and then recompile libcxx without the
> `MYCMAKEARGS` to not interfere with other packages.

I don't know, I'm afraid. I have no idea if it breaks ABI or what the consequences of setting it are. I (or someone) needs to ask some C++ gurus.
Comment 17 Gonçalo Negrier Duarte 2024-06-01 23:45:16 UTC
(In reply to Sam James from comment #16)
> (In reply to Gonçalo Negrier Duarte from comment #15)
> > (In reply to Sam James from comment #14)
> > > (C++ doesn't have implicit function declarations so I would be very
> > > surprised if includes for C functions like this could make any runtime
> > > difference.)
> > 
> > Sam this will be a bit off topic but what are the problems of using
> > `MYCMAKEARGS="-DLIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION=2"`?
> > 
> > For now to solve the right click BUG 923292 on plasma cause by qtwayland, I
> > recompile both with the `MYCMAKEARGS` and then recompile libcxx without the
> > `MYCMAKEARGS` to not interfere with other packages.
> 
> I don't know, I'm afraid. I have no idea if it breaks ABI or what the
> consequences of setting it are. I (or someone) needs to ask some C++ gurus.

Ok thanks anyway, until futher notice I will use my method at least qtwayland compiles fast and I don't risk breaking my system.
Comment 18 Larry the Git Cow gentoo-dev 2024-06-13 00:46:43 UTC
The bug has been closed via the following commit(s):

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

commit abbe800563fc9c87b9072e14387cab15feb9ab8a
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-06-13 00:45:36 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-06-13 00:46:15 +0000

    kde-plasma/kwin: fix USE=systemd w/ libcxx
    
    Already merged upstream in https://invent.kde.org/plasma/kwin/-/merge_requests/5811
    but filed a backport MR which is pending at https://invent.kde.org/plasma/kwin/-/merge_requests/5892.
    
    Closes: https://bugs.gentoo.org/933120
    Signed-off-by: Sam James <sam@gentoo.org>

 kde-plasma/kwin/files/kwin-6.0.90.1-libcxx.patch | 27 ++++++++++++++++++++++++
 kde-plasma/kwin/kwin-6.0.90.1-r3.ebuild          |  4 ++++
 2 files changed, 31 insertions(+)