I just updated to Xcode 8, and I can no longer build xml2-based applications. If I build a simple file and try to build it as follows:
c++ myapp.cc `xml2-config
For anyone uncomfortable with stripping out references to libsystem_symptoms.dylib
from various locations, I came up with another solution that's the opposite of removing references -- adding a fake empty libsystem_symptoms.dylib
in /usr/lib/system
!
mkdir ~/src/libempty
cd ~/src/libempty
touch empty.c
cc -dynamiclib empty.c -o libempty.dylib
sudo cp libempty.dylib /usr/local/lib/libempty.dylib
cd /usr/lib/system
sudo ln -s /usr/local/lib/libempty.dylib libsystem_symptoms.dylib
Except... that last step doesn't work because of OS X/macOS System Integrity Protection.
There's apparently more than one way of getting around that; you can disable it using csrutil
and rebooting (see the question Operation Not Permitted when on root El capitan). I don't really want to disable it (or forget to turn it back on), so I booted into recovery mode, and then opened a terminal window and finished the job this way:
cd /Volumes
cd MyHardDrive
cd usr/lib/system
ln -s ../../local/lib/libempty.dylib libsystem_symptoms.dylib
Before doing this, I was trying to build PostgreSQL 9.6 on El Capitan, and was getting that linker error ("ld: file not found: /usr/lib/system/libsystem_symptoms.dylib"
) at the configure
step when it checked for the readline or zlib libraries. After doing this, PostgreSQL configured and built smoothly!