5

I have an issue with compiling gcc which can be traced back to Catalina having issues with xcode, so I referred to the link here "macOS_SDK_headers_for_macOS_10.14.pkg is incompatible with this version of macOS" while installing Haskell on OS X mojave and tried to solve the issue. However, although I reinstalled xcode, I cannot open macOS_SDK_headers_for_macOS_10.14.pkg, because the file is not in /Library/Developer/CommandLineTools/Packages/. My files look like;

MacBook-Pro:CommandLineTools myname$ ls
Library SDKs    usr

Where can I find the file? Should I manually add the pkg to the folder?

halo09876
  • 2,725
  • 12
  • 51
  • 71

2 Answers2

0

I'm on MacOS 10.14.6, and I had a similar problem today. I was missing an include file from the /Library/Developer/CommandLineTools folder. Here is how I fixed my problem, and I suspect it will also fix yours. This will install the missing folders and files in the CommandLineTools folder that are not installed by default in the version of xcode you're using.

  1. Start Finder
  2. Double Click Applications->Utilities->Terminal to start a terminal session on your Mac
  3. Type the following commands in your terminal window to install the missing command line tools
cd /Library/Developer/CommandLineTools
xcode-select --install
  1. List the files that got installed and see your missing Packages folder
ls -Fal

enter image description here

  1. Recompile your code to see if it fixes the compilation error
kevinATX
  • 11
  • 3
  • 1
    Thanks for answering, but this question is about Catalina (OS 10.15) so, I don't think this answer is relevant. Specifically, with OS 10.15, `xcode-select --install` does not create a `Packages` folder. – Jared Beck Apr 25 '20 at 00:13
  • Well, it's odd that you have a path for 10.14 given that you are running 10.15. I suspect that you have mismatched versions of Xcode and the macOS installed. Maybe you could provide more of a step-by-step explanation on the problem with images. I suspect there is an invalid assumption in there somewhere that's the cause of the problem. Hopefully, adding more information in the problem statement will help someone see/uncover the issue for you. Good luck! – kevinATX Apr 26 '20 at 14:08
0

Instead of being provided by a pkg you need to include them in CPATH

export CPATH="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include"

or

export CPATH='/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/'

if you have the command line tools only installed.