* gcc 14 and modules
@ 2023-05-02 12:02 Wilhelm Meier
2023-05-02 12:28 ` Jonathan Wakely
0 siblings, 1 reply; 5+ messages in thread
From: Wilhelm Meier @ 2023-05-02 12:02 UTC (permalink / raw)
To: gcc-help
Hi all,
the following test program
import std;
int main() {}
compiled with
/usr/local/bin/g++ -g -std=c++23 -fconcepts -fmodules-ts -O3 -Wall
-Wextra test400.cc --output test400
gives the following errors:
std: error: failed to read compiled module: No such file or directory
std: note: compiled module file is 'gcm.cache/std.gcm'
std: note: imports must be built before being imported
std: fatal error: returning to the gate for a mechanical issue
The standard library module std should be available, but obviously is not.
Aside from header units: is the a way to create the std module by my own?
Will gcc be shipped with the module std?
Thanks,
Wilhelm
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 14 and modules
2023-05-02 12:02 gcc 14 and modules Wilhelm Meier
@ 2023-05-02 12:28 ` Jonathan Wakely
2023-05-02 17:47 ` Wilhelm Meier
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2023-05-02 12:28 UTC (permalink / raw)
To: Wilhelm Meier; +Cc: gcc-help
[-- Attachment #1: Type: text/plain, Size: 1009 bytes --]
On Tue, 2 May 2023, 13:03 Wilhelm Meier wrote:
> Hi all,
>
> the following test program
>
> import std;
> int main() {}
>
> compiled with
>
> /usr/local/bin/g++ -g -std=c++23 -fconcepts -fmodules-ts -O3 -Wall
> -Wextra test400.cc --output test400
>
> gives the following errors:
>
> std: error: failed to read compiled module: No such file or directory
> std: note: compiled module file is 'gcm.cache/std.gcm'
> std: note: imports must be built before being imported
> std: fatal error: returning to the gate for a mechanical issue
>
> The standard library module std should be available, but obviously is not.
>
Right. Just because you used -std=c++23 doesn't mean the compiler actually
supports all of C++23. It's still a work in progress.
> Aside from header units: is the a way to create the std module by my own?
>
Not very easily.
> Will gcc be shipped with the module std?
>
Eventually, yes, we will provide a std.cc module definition file, which you
will be able to compile and then import.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 14 and modules
2023-05-02 12:28 ` Jonathan Wakely
@ 2023-05-02 17:47 ` Wilhelm Meier
2023-05-02 18:09 ` Jonathan Wakely
0 siblings, 1 reply; 5+ messages in thread
From: Wilhelm Meier @ 2023-05-02 17:47 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-help
On 02.05.23 14:28, Jonathan Wakely wrote:
> Will gcc be shipped with the module std?
>
>
> Eventually, yes, we will provide a std.cc module definition file, which
> you will be able to compile and then import.
Is it possible to create the std.cc (or sort of) by my own?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 14 and modules
2023-05-02 17:47 ` Wilhelm Meier
@ 2023-05-02 18:09 ` Jonathan Wakely
2023-05-02 18:57 ` Wilhelm Meier
0 siblings, 1 reply; 5+ messages in thread
From: Jonathan Wakely @ 2023-05-02 18:09 UTC (permalink / raw)
To: Wilhelm Meier; +Cc: gcc-help
On Tue, 2 May 2023 at 18:47, Wilhelm Meier <wilhelm.meier@hs-kl.de> wrote:
>
> On 02.05.23 14:28, Jonathan Wakely wrote:
>
> > Will gcc be shipped with the module std?
> >
> >
> > Eventually, yes, we will provide a std.cc module definition file, which
> > you will be able to compile and then import.
>
> Is it possible to create the std.cc (or sort of) by my own?
You need to name pretty much everything from namespace std, and last
time I tried, it either crashed the compiler (see numerous bugs) or
failed to compile (e.g.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102345)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: gcc 14 and modules
2023-05-02 18:09 ` Jonathan Wakely
@ 2023-05-02 18:57 ` Wilhelm Meier
0 siblings, 0 replies; 5+ messages in thread
From: Wilhelm Meier @ 2023-05-02 18:57 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-help
On 02.05.23 20:09, Jonathan Wakely wrote:
> On Tue, 2 May 2023 at 18:47, Wilhelm Meier <wilhelm.meier@hs-kl.de> wrote:
>>
>> On 02.05.23 14:28, Jonathan Wakely wrote:
>>
>>> Will gcc be shipped with the module std?
>>>
>>>
>>> Eventually, yes, we will provide a std.cc module definition file, which
>>> you will be able to compile and then import.
>>
>> Is it possible to create the std.cc (or sort of) by my own?
>
> You need to name pretty much everything from namespace std, and last
> time I tried, it either crashed the compiler (see numerous bugs) or
> failed to compile (e.g.
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102345)
So, for the moment one should stick to import header-units?
But these need to be precompiled: how do I solve the dependency problem,
e.g. how do I precompile all imported header-unit a source-file mentions?
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-05-02 18:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-02 12:02 gcc 14 and modules Wilhelm Meier
2023-05-02 12:28 ` Jonathan Wakely
2023-05-02 17:47 ` Wilhelm Meier
2023-05-02 18:09 ` Jonathan Wakely
2023-05-02 18:57 ` Wilhelm Meier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).