Missing /usr/include w/ Xcode 10

Hi,


I've installed the Xcode 10 beta, including the command line tools and the MacOSX10.14 SDK, on my machine with an otherwise blank macOS 10.14 beta, but I don't have a /usr/include directory. Is this on purpose, am I missing something or is something broken? This makes it quite difficult to build a lot of open source projects.

Accepted Reply

From the latest Xcode 10 Beta 2 release notes.


The Command Line Tools package installs the macOS system headers inside the macOS SDK. Software that compiles with the installed tools will search for macOS headers at the standard include path: /Applications/Xcodebeta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.1 4.sdk/usr/include For legacy software that looks for the macOS headers in the base system under /usr/include, please install the package file located at: /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14. pkg

Replies

TheRealTroff wrote:


I've installed the Xcode 10 beta, including the command line tools and the MacOSX10.14 SDK, on my machine with an otherwise blank macOS 10.14 beta, but I don't have a /usr/include directory. Is this on purpose, am I missing something or is something broken? This makes it quite difficult to build a lot of open source projects.

The Command Line tools were unavailable for a while. I just tried it and it did install, but I don't have /usr/include either.


You can setup your own build scripts and set the appropriate arch, isysroot, I, and L compiler flags to point to the appropriate places inside the SDK directories. That is really the only option if you are doing any kind of cross-platform work as /usr/include is just for your Mac platform.

I've got the same issue. I've reported this as a bug to Apple. I haven't had a response yet.

Thanks for verifying. It’s just not feasible for me to “fix” every open source project I use that builds as-is on Xcode 9/macOS 10.13 (I’m traveling and haven’t had the bandwidth and time yet to install Xcode 9 on this machine).

The comand line tools ARE there in XCode 10 Beta but don't seem to be installed in the /usr folder any more. I had a need to get GIT working and after installed XCode 10 Beta the git command would not work and the prompt to install command line tools would report that they were not available.


However using the following command in terminal sets them up and GIT works as expected again, even though they still don't exist in the /usr folder.


xcode-select -s /Applications/Xcode-beta.app


Hope this helps.

That interesting, because I didn't have any problem getting git to work.

I was hoping to try an Xcode 9 installation but of course there is no command tool release for macOS 10.14.

You don't have to fix the projects. Just set the appropriate environment variables and then build as normal. It is beta software after all.

From the latest Xcode 10 Beta 2 release notes.


The Command Line Tools package installs the macOS system headers inside the macOS SDK. Software that compiles with the installed tools will search for macOS headers at the standard include path: /Applications/Xcodebeta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.1 4.sdk/usr/include For legacy software that looks for the macOS headers in the base system under /usr/include, please install the package file located at: /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14. pkg