Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 917646 - sys-process/systemd-cron-2.2.0 does not build with clang
Summary: sys-process/systemd-cron-2.2.0 does not build with clang
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Richard Freeman
URL: https://github.com/systemd-cron/syste...
Whiteboard:
Keywords:
: 919410 (view as bug list)
Depends on:
Blocks: systemwide-clang
  Show dependency tree
 
Reported: 2023-11-20 20:05 UTC by Chris Pritchard
Modified: 2024-02-17 21:17 UTC (History)
2 users (show)

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


Attachments
gcc systemd-cron (systemd-cron-2.3.0-gcc.log,11.95 KB, text/x-log)
2023-11-26 00:29 UTC, Chris Pritchard
Details
build.log (clang) (systemd-cron-2.3.0-clang.log,10.80 KB, text/x-log)
2023-11-26 00:29 UTC, Chris Pritchard
Details
emerge --info (emerge-info,15.54 KB, text/plain)
2023-11-26 00:29 UTC, Chris Pritchard
Details
systemd-cron-2.3.0-r3.ebuild (file_917646.txt,4.00 KB, text/plain)
2024-02-17 14:55 UTC, Chris Pritchard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Pritchard 2023-11-20 20:05:39 UTC
When building sys-process/systemd-cron on a system with clang-17 installed using libcxx I receive the following error:

clang++ -march=native -O3 -pipe -flto=thin -Wall -Wextra -fno-exceptions -Wno-psabi  -std=c++20 -I /var/tmp/portage/sys-process/systemd-cron-2.2.0/work/systemd-cron-2.2.0/out/build/include            /var/tmp/portage/sys-process/systemd-cron-2.2.0/work/systemd-cron-2.2.0/out/build/include/libvoreutils.hpp -o /var/tmp/portage/sys-process/systemd-cron-2.2.0/work/systemd-cron-2.2.0/out/build/include/libvoreutils.hpp.gch
clang++: error: cannot specify -o when generating multiple output files
make: *** [Makefile:220: /var/tmp/portage/sys-process/systemd-cron-2.2.0/work/systemd-cron-2.2.0/out/build/include/libvoreutils.hpp.gch] Error 1

Reproducible: Always

Steps to Reproduce:
1. Have clang as a system compiler and use libcxx
2. Attempt to emerge systemd-cron
Actual Results:  
Package does not compile

Expected Results:  
Package compiles

As per upstream bug report, builds fine using GCC.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-11-26 00:25:54 UTC
Please always include the full build.log and emerge --info.
Comment 2 Chris Pritchard 2023-11-26 00:28:56 UTC
Sorry, they're attached upstream. Will add here
Comment 3 Chris Pritchard 2023-11-26 00:29:19 UTC
Created attachment 875666 [details]
gcc systemd-cron
Comment 4 Chris Pritchard 2023-11-26 00:29:35 UTC
Created attachment 875667 [details]
build.log (clang)
Comment 5 Chris Pritchard 2023-11-26 00:29:48 UTC
Created attachment 875668 [details]
emerge --info
Comment 6 Chris Pritchard 2023-11-26 00:32:27 UTC
These logs are from manual builds, but I had the same problem with portage on v2.2.0, the issue appears to have been resolved upstream for a future release.
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-01-14 17:10:25 UTC
*** Bug 919410 has been marked as a duplicate of this bug. ***
Comment 8 Larry the Git Cow gentoo-dev 2024-01-14 17:15:32 UTC
The bug has been closed via the following commit(s):

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

commit d77f5a3f40122879f39a97420f170fca226e6e58
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-01-14 17:10:48 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-01-14 17:15:20 +0000

    sys-process/systemd-cron: disable PCH
    
    By policy in Gentoo, we don't do PCH as it's too brittle.
    
    Closes: https://bugs.gentoo.org/917646
    Signed-off-by: Sam James <sam@gentoo.org>

 .../files/systemd-cron-2.3.0-pch.patch             |  46 ++++++++++
 .../systemd-cron/systemd-cron-2.3.0-r2.ebuild      | 100 +++++++++++++++++++++
 2 files changed, 146 insertions(+)
Comment 9 Chris Pritchard 2024-02-17 14:54:01 UTC
Sorry - need to reopen this bug as the fix doesn't work - PCH= also needs to be added to the call to emake in src_install.
Comment 10 Chris Pritchard 2024-02-17 14:55:10 UTC
Created attachment 885224 [details]
systemd-cron-2.3.0-r3.ebuild

Proposed new ebuild
Comment 11 Larry the Git Cow gentoo-dev 2024-02-17 21:17:28 UTC
The bug has been closed via the following commit(s):

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

commit d4c75bbeaccd78d51241734b277d3c2b6b176b54
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2024-02-17 18:28:09 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-02-17 21:14:50 +0000

    sys-process/systemd-cron: disable PCH harder
    
    Closes: https://bugs.gentoo.org/917646
    Fixes: d77f5a3f40122879f39a97420f170fca226e6e58
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-process/systemd-cron/systemd-cron-2.3.0-r2.ebuild | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)