Command line tools - headers missing

Hi,


In 10.14 last year, Apple stopped installing headers with the command line tools, but it was possible to get them via a separate .pkg installer which they placed at /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg.


This appears to be completely missing in 10.15 and I'm unable to compile 3rd party software using the command line tools because of missing headers like zlib and libxml2


Anyone know where to get them for macOS 10.15 Catalina?


Thanks

Replies

The headers are still there, what was removed is the package that installed them outside the SDK.


Nowadays the SDK is part of the Xcode.app bundle, you can find the root with

xcrun --sdk macosx --show-sdk-path


If they rely on the compiler to find includes, it should work automatically, but in some cases adding something like this to CFLAGS/CXXFLAGS helps:

-isysroot $(xcrun --show-sdk-path) -I/usr/include -L/usr/lib


But this is specifically for projects that do detect macOS and do use the compiler for these tests, but explicitly specify outdated paths for includes and libraries.

I am using macos 10.15.7 and python 3.6 but i am getting the below error -

Code Block
File "/usr/local/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/local/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/ensurepip/main.py", line 5, in <module>
sys.exit(ensurepip._main())
File "/usr/local/lib/python3.6/ensurepip/init.py", line 204, in _main
default_pip=args.default_pip,
File "/usr/local/lib/python3.6/ensurepip/init.py", line 117, in _bootstrap
return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
File "/usr/local/lib/python3.6/ensurepip/init.py", line 27, in _run_pip
import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available

Below is the SDk path -
sanjeev.rohila@Sanjeev-Rohilas-MacBook-Pro run3 % xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk

How can I make my python3.6 to use the zlib ?
Add a Comment