Xcode 10 beta 5 can't find headers

My project won't build in Xcode 10 beta 5 because it can't find headers. And yet when I open the same project in Xcode 9 it builds without issue.


I've checked the Header Search Paths and it looks fine.


Not sure what to do. Is this happening to anyone else?

Replies

Anyone?

This seems related to the issue we are having. Header search paths outside the project cannot be found anymore, although properly linked via HEADER_SEARCH_PATHS. I opened a radar (rdar://40906817) a few months ago, but Apple did not even respond so far.


There are reports about setting ALWAYS_SEARCH_USER_PATHS to NO, but that does not help either. I hope someone comes up with a workaround until Apple fixes it. The current workaround is to use the old build system which does not has this issue, but that cannot be a long-term solution.

I’m a little late to respond, but since this is still happening with the release version of Xcode 10—and since I just got around to installing it—I’m hoping this might help you. In my case, the new build system was passing relative paths to clang when composing -i and -isystem switches, which was causing it to choke. This was an oversight on my part, as I supplied relative paths in my .xcconfig files when generating SYSTEM_HEADER_SEARCH_PATHS and friends; apparently, the older build system would silently convert these to absolute paths before passing them on, thus masking the problem. Switching to absolute paths solved the problem (though it introduces a different problem re: .xcconfig sharing, but I’m giving up and moving to CMake, anyway—it gets tedious maintaining all these .xcconfigs, .props, and make files).

Posting because I'm in the same boat with the release version.


I'm personally having the issue with the PJSIP headers. Using the ipjsua project that comes with the PJSIP download, if I were to change the Header Search Paths to use an absolute path, the build is broken.


I have had to downgrade Xcode from 10 to 9 in order to have this working on my project since the headers need to be outside of the project.

I have the same problem with the released Xcode-10.0. So far only downgrading to Xcode-9.4.1 could help.

I missed your post—didn’t receive a notification for some reason.


Before you downgraded, did you try using the old build system from within Xcode 10? “File/[Workspace | Project] Settings…”, and change the “Build System” popup from “New Build System (Default)” to “Legacy Build System”. That was working for me before I found the absolute path workaround and switched over.

Similar problem here in Xcode 10.0. I had an entry in "Framework Search Paths" using the "~" character for my home directory. Apparently the new build system does not expand that into "/Users/name".