[llvm-bugs] [Bug 51395] New: Clang error "file not found" on include files when building with modules
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Aug 6 17:53:22 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51395
Bug ID: 51395
Summary: Clang error "file not found" on include files when
building with modules
Product: clang
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: Modules
Assignee: unassignedclangbugs at nondot.org
Reporter: akhuang at google.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
We saw this "file not found" error when trying to build with -fmodules. This
only happens when we use relative paths in the header search.
To repro:
$ cat t.cc
#include <cstddef>
$ ./<relative-path-to-clang>/clang -fmodules -nostdinc++ -no-canonical-prefixes
-isystem../../llvm-build/include/c++/v1 -E t.cc
# 1 "t.cc"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 385 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "t.cc" 2
<module-includes>:23:10: fatal error:
'../../llvm-build/lib/clang/14.0.0/include/stdint.h' file not found
#include "../../llvm-build/lib/clang/14.0.0/include/stdint.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t.cc:1:10: fatal error: could not build module 'std'
#include <cstddef>
~~~~~~~~^
(also, to repro, I had to remove a line `header "range"` from <build
dir>/include/c++/v1/module.modulemap to get the build to work)
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210807/45df5423/attachment.html>
More information about the llvm-bugs
mailing list