Issue 1255 in include-what-you-use: file not found for time.h

1 view
Skip to first unread message

notifi...@include-what-you-use.org

unread,
May 5, 2023, 7:54:47 AM5/5/23
to include-wh...@googlegroups.com
New issue 1255 by PiggyChen: file not found for time.h
https://github.com/include-what-you-use/include-what-you-use/issues/1255

When use include-what-you-use, it get error with file not found, can see below details info.

And I understand that this issue is because there are no file in /usr/local/bin/../include/c++/v1/ directory, so I copy Xcode's c++ include file(/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++) to /usr/local/include directory, but this still can not resolve this problem.
what can I do next?

`In file included from /Users/allen.chen/Desktop/RC/ringcentral/Glip/Pods/core-common/core-common/common/src/service/profile/handler/abstract_account_profile_handler.cpp:9:
In file included from /Users/allen.chen/Desktop/RC/ringcentral/Glip/Pods/core-common/core-common/common/src/service/profile/handler/../../../../api/interface/service/profile/handler/abstract_account_profile_handler.hpp:11:
In file included from /Users/allen.chen/Desktop/RC/ringcentral/Glip/Pods/core-common/core-common/common/src/service/profile/handler/../../../../api/interface/service/profile/handler/../../../common/i_factory.hpp:11:
In file included from /usr/local/bin/../include/c++/v1/memory:684:
In file included from /usr/local/bin/../include/c++/v1/__memory/shared_ptr.h:35:
In file included from /usr/local/bin/../include/c++/v1/atomic:523:
In file included from /usr/local/bin/../include/c++/v1/__threading_support:15:
In file included from /usr/local/bin/../include/c++/v1/chrono:684:
/usr/local/bin/../include/c++/v1/ctime:49:10: fatal error: 'time.h' file not found
#include <time.h>`


notifi...@include-what-you-use.org

unread,
May 5, 2023, 8:09:07 AM5/5/23
to include-wh...@googlegroups.com
Comment #1 on issue 1255 by PiggyChen: file not found for time.h
https://github.com/include-what-you-use/include-what-you-use/issues/1255

How do I set a custom search path?

I have solve this issue, but new issue appears:

`/Users/allen.chen/Desktop/RC/ringcentral/Glip/Pods/core-common/core-common/common/src/service/profile/handler/../../../../api/interface/service/profile/handler/../../../common/../utils/./glip_typeid.hpp:12:10: fatal error: 'foundation/utils/stl.hpp' file not found
#include <foundation/utils/stl.hpp>
^~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/allen.chen/Desktop/RC/ringcentral/Glip/Pods/core-common/core-common/common/src/service/profile/handler/../../../../api/interface/service/profile/handler/../../../common/../utils/./glip_typeid.hpp:12:10: note: did not find header 'utils/stl.hpp' in framework 'foundation' (loaded from '/System/Library/Frameworks')`



notifi...@include-what-you-use.org

unread,
May 11, 2023, 2:37:58 PM5/11/23
to include-wh...@googlegroups.com
Comment #3 on issue 1255 by kilroyd: file not found for time.h
https://github.com/include-what-you-use/include-what-you-use/issues/1255

From the other issue you raised, I believe that you've compiled LLVM+clang from source. Make sure you've configured them with `-DDEFAULT_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk`. IWYU should then be able to find the MacOS headers (at least it does for me using homebrew).

Note that MacOSX.sdk is a symlink, and it seems that CMake dereferences the symlink and stores it. When MacOS upgrades itself you'll probably find you have to redo the CMake configuration


Reply all
Reply to author
Forward
0 new messages