xml2-config with 10.12 and XCode 9 returns wrong paths

Originator:tobias.bussmann
Number:rdar://35102061 Date Originated:20.10.2017
Status:open Resolved:
Product:macOS + SDK Product Version:10.12
Classification:Bug Reproducible:always
 
Summary:
Builds of applications that link against libxml (for example PostgreSQL) fail because "xml2-config --cflags --libs" include a 
"-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib" which pulls in libSystem.B.tbd which refers to "/usr/lib/system/libsystem_darwin.dylib" which does not exist.

Steps to Reproduce:
On 10.12.6 install all available updates including Xcode 9 command line tools. Then try to configure postgresql.

Expected Results:
-I/usr/include/libxml2
-lxml2 -lz -lpthread -licucore -lm
These are returned both in 10.12 with Xcode8 and 10.13 with Xcode 9

Actual Results:
-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/include/libxml2
-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/usr/lib -lxml2 -lz -lpthread -licucore -lm

Version/Build:
xml2-config --version
2.9.4

Configuration:
macOS 10.12.6 with XCode 9 and command-line tools
$ xcode-select --version
xcode-select version 2347.
$ xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!