<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/88653>88653</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
cyclic dependency in module 'std': std -> _Builtin_inttypes -> std
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
TheRustifyer
</td>
</tr>
</table>
<pre>
While building a project locally with the latest commit on main from the `llvm-project`, I am facing this issue:
```
zork++ -c -vv --match-files local_linux test +2/-1 🕙(09:46:30)
[2024-04-14T07:46:32.530Z INFO zork] Launching a new Zork++ program
[2024-04-14T07:46:32.530Z DEBUG zork::utils::reader] Searching for Zork++ configuration files...
[2024-04-14T07:46:32.530Z TRACE zork::worker] Config files found: [ConfigFile { dir_entry: DirEntry("./zork_config/zork_local_linux.toml"), path: "./zork_config/zork_local_linux.toml" }]
[2024-04-14T07:46:32.530Z DEBUG zork::worker] Launching a Zork++ work event for the configuration file: "zork_local_linux.toml", located at: "./zork_config/zork_local_linux.toml"
[2024-04-14T07:46:32.531Z INFO zork::compiler] Building the module interfaces and partitions...
[2024-04-14T07:46:32.531Z INFO zork::compiler] Building the module implementations...
[2024-04-14T07:46:32.531Z INFO zork::compiler] Building the source files...
[2024-04-14T07:46:32.531Z INFO zork::compiler] Generating the main command line...
[2024-04-14T07:46:32.531Z INFO zork::cli::output::commands] Proceeding to execute the generated commands...
[2024-04-14T07:46:32.531Z TRACE zork::cli::output::commands] [clang] - Executing command => "clang++ -std=c++2b -Werror -Wall -Wpedantic -pedantic -Wextra -Wconversion -Wfloat-conversion -Wsign-conversion -Wshadow -Wnon-virtual-dtor -Wold-style-cast -Wcast-align -Wunused -Woverloaded-virtual -Wmisleading-indentation -Wnull-dereference -Wdouble-promotion -Wformat=2 -Wimplicit-fallthrough -Weffc++ -stdlib=libc++ -fimplicit-modules -x c++-module --precompile -fimplicit-module-maps -fprebuilt-module-path=/home/pyzyryab/code/zero_day_code/Zero/zero/out/clang/modules/interfaces -o /home/pyzyryab/code/zero_day_code/Zero/zero/out/clang/modules/interfaces/typedefs.pcm /home/pyzyryab/code/zero_day_code/Zero/zero/ifc/commons/typedefs.cppm"
While building module 'std' imported from /home/pyzyryab/code/zero_day_code/Zero/zero/ifc/commons/typedefs.cppm:25:
While building module '_Builtin_inttypes' imported from /usr/include/c++/v1/inttypes.h:252:
In file included from <module-includes>:1:
In file included from /usr/local/lib/clang/19/include/inttypes.h:21:
/usr/include/inttypes.h:27:10: fatal error: cyclic dependency in module 'std': std -> _Builtin_inttypes -> std
27 | #include <stdint.h>
| ^
While building module 'std' imported from /home/pyzyryab/code/zero_day_code/Zero/zero/ifc/commons/typedefs.cppm:25:
In file included from <module-includes>:11:
/usr/include/c++/v1/inttypes.h:252:17: fatal error: could not build module '_Builtin_inttypes'
252 | # include_next <inttypes.h>
| ~~~~~~~~~~~~~^
/home/pyzyryab/code/zero_day_code/Zero/zero/ifc/commons/typedefs.cppm:25:12: fatal error: could not build module 'std'
25 | import std;
| ~~~~~~~^~~
3 errors generated.
[2024-04-14T07:46:33.659Z DEBUG zork::cache] Storing in the cache the last generated command lines...
[2024-04-14T07:46:33.659Z TRACE zork::cache::compile_commands] Generating the compilation database...
[2024-04-14T07:46:33.702Z ERROR zork] [FAILED] - The process failed, taking a total time in complete of: 1172 ms
Error:
0: Failed to build the project for the config file: "zork_local_linux.toml"
1: Ending the program, because the build of: "typedefs.cppm" wasn't ended successfully
```
I can confirm that those flags works with `Clang 15`, `Clang 16` and `Clang 17`.
Fails with `Clang 18`, but for other reasons, exposed on #88652
Tell me if you need any more information
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMWM1u4zgSfhr6UpAhUZYdH3zwnwYNDHYW2SwM9CWgqZLFbYoUSMqJ-9DPviApO87PTJLebWCCRluiyKqvqj4Wq8isFQeFuCDFihSbEetdo83irsHb3jpRn9CM9ro6LXaNkAj7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