Details
-
Improvement
-
Resolution: Fixed
-
Major - P3
-
None
-
None
-
None
-
Fully Compatible
-
Dev Platform 2022-05-02, Dev Platform 2022-05-16
Description
If a header file is not found, force includes will fail with an ambiguous error message about (ironically) missing attribute "disambiguate".
It should print the header files that are having problems along with the cpppath its looking through.
example code:
fis = [env.FindFile(f, path) for f in env.get('FORCEINCLUDES', [])] |
|
|
if not all(fis): |
missing_headers = [] |
for index, fis_header in enumerate(fis): |
if not fis_header: |
missing_headers.append(env.get('FORCEINCLUDES')[index]) |
|
|
errstring = f"Could not find header{'s' if len(missing_headers)>1 else ''}: {missing_headers} in any path in CPPPATH:\n" |
for cpppath in env.get('CPPPATH', []): |
errstring += f" {env.Dir(cpppath).path}\n" |
|
|
raise SCons.Errors.SConsEnvironmentError(errstring) |
which looks like this:
build/opt/mongo/shell/fle_shell_options_gen.dyn.o failed: Could not find header: ['js-config.h'] in any path in CPPPATH: |
src/third_party/mozjs-60/include |
src/third_party/mozjs-60/mongo_sources |
src/third_party/mozjs-60/platform/aarch64/macOS/include |
src/third_party/variant-1.4.0/include |
src/third_party/SafeInt
|
src/third_party/pcre-8.42 |
src/third_party/fmt/dist/include
|
src/third_party/boost
|
src/third_party/abseil-cpp-master/abseil-cpp
|
build/opt
|