Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 909316 - dev-cpp/cppgir-0_p20230606: Build failing 'experimental/filesystem' file not found - Clang16
Summary: dev-cpp/cppgir-0_p20230606: Build failing 'experimental/filesystem' file not ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Esteve Varela Colominas
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-06-28 03:26 UTC by James McGeehan IV
Modified: 2023-07-21 06:34 UTC (History)
2 users (show)

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


Attachments
build.log + emerge --info (build-and-info.txt,31.01 KB, text/plain)
2023-06-28 03:28 UTC, James McGeehan IV
Details

Note You need to log in before you can comment on or make changes to this bug.
Description James McGeehan IV 2023-06-28 03:26:33 UTC
Unable to emerge cppgir on clang/musl profile. I believe this has to do with clang/libc++ lacking <experimental/filesystem>, but that is not the only error message seen. 

Reproducible: Always

Steps to Reproduce:
1. musl/clang(16) profile
2. emerge -1 dev-cpp/cppgir
Actual Results:  
Clang fails with multiple errors. 

Expected Results:  
Build succeeds

See attachment for build.log and emerge --info
Comment 1 James McGeehan IV 2023-06-28 03:28:08 UTC
Created attachment 864743 [details]
build.log + emerge --info
Comment 2 Carlos 2023-06-28 18:49:06 UTC
I can reproduce this issue.

FreeBSD seems to fix this issue by setting the C++ standard to C++17 and replacing #include <experimental/filesystem> with just #include <filesystem>.

https://cgit.freebsd.org/ports/tree/net-im/telegram-desktop/files/patch-cmake_external_glib_cppgir_CMakeLists.txt
https://cgit.freebsd.org/ports/tree/net-im/telegram-desktop/files/patch-cmake_external_glib_cppgir_tools_genns.cpp

Another issue that will show up with Clang 17 is "error: too few template arguments for class template 'map'", which can be fixed by #include <map> in a few files: https://cgit.freebsd.org/ports/tree/net-im/telegram-desktop/files
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-28 18:51:46 UTC
Yeah, I helped OP with this on IRC but I don't remember if we got things building or not (I'd suggested both of those things).

The issue is that cppgir (for the experimental/filesystem) bit hasn't tested I guess w/ -std=c++17 which has <filesystem> proper.
Comment 4 Esteve Varela Colominas 2023-06-28 19:18:37 UTC
And there's no way to force an older standard so <experimental/filesystem> is valid? Or has it fully been removed from libc++?
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-06-28 19:23:39 UTC
(In reply to Esteve Varela Colominas from comment #4)
> And there's no way to force an older standard so <experimental/filesystem>
> is valid? Or has it fully been removed from libc++?

You can explicitly pass -std=c++14 or -std=gnu++14 if you want.
Comment 6 Carlos 2023-06-29 00:25:32 UTC
(In reply to Sam James from comment #3)
> Yeah, I helped OP with this on IRC but I don't remember if we got things
> building or not (I'd suggested both of those things).
> 
> The issue is that cppgir (for the experimental/filesystem) bit hasn't tested
> I guess w/ -std=c++17 which has <filesystem> proper.

For me, applying the FreeBSD patches worked (both cppgir and >=telegram-desktop-4.8.3 build and run successfully).

(In reply to Esteve Varela Colominas from comment #4)
> And there's no way to force an older standard so <experimental/filesystem>
> is valid? Or has it fully been removed from libc++?

It's been fully removed. The CMakeLists already forces C++14.
Comment 7 Esteve Varela Colominas 2023-06-29 00:45:31 UTC
Thanks, Carlos. That saves me a lot of time in setting up and testing a libc++ environment. I'll add these patches to the pending cppgir PR.
Comment 8 Larry the Git Cow gentoo-dev 2023-07-21 06:34:32 UTC
The bug has been closed via the following commit(s):

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

commit 1d9d862a0d6c3432fb976c665077a36ce453a789
Author:     Esteve Varela Colominas <esteve.varela@gmail.com>
AuthorDate: 2023-06-29 13:00:37 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2023-07-21 06:31:31 +0000

    dev-cpp/cppgir: Bump to 0_p20230625
    
    Upstreamed most patches, fixed libcxx 16
    
    Closes: https://bugs.gentoo.org/909316
    Thanks-to: James McGeehan IV <jfmfour22@gmail.com>
    Thanks-to: Carlos <carana2099@gmail.com>
    Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 dev-cpp/cppgir/Manifest                            |  1 +
 dev-cpp/cppgir/cppgir-0_p20230625.ebuild           | 48 +++++++++++++++++++
 .../files/cppgir-0_p20230625-fix-libcxx-16.patch   | 54 ++++++++++++++++++++++
 3 files changed, 103 insertions(+)